Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-18-2012, 06:25 PM   #1
msmith65
Enthusiast
msmith65 began at the beginning.
 
msmith65's Avatar
 
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
Pages Not Breaking

I'm doing a recipe book - color photos, lots of lists - and the authors would like for each recipe to start on a new page.

I'm using this at the end of each recipe:

Code:
  <hr class="sigilChapterBreak" />
But when I open the .epub with the Kindle advanced previewer (converting to .mobi in the process), there's just a line where the chapter break should be. A forced page break doesn't appear to happen.

I have seen posts here that suggest breaking the file into multiple files, so the page breaks will be automatic. Whoo, I really don't want to do that, as it will make navigation while editing very difficult. Is there another way?
msmith65 is offline   Reply With Quote
Old 08-18-2012, 06:48 PM   #2
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,846
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by msmith65 View Post
I'm doing a recipe book - color photos, lots of lists - and the authors would like for each recipe to start on a new page.

I'm using this at the end of each recipe:

Code:
  <hr class="sigilChapterBreak" />
But when I open the .epub with the Kindle advanced previewer (converting to .mobi in the process), there's just a line where the chapter break should be. A forced page break doesn't appear to happen.

I have seen posts here that suggest breaking the file into multiple files, so the page breaks will be automatic. Whoo, I really don't want to do that, as it will make navigation while editing very difficult. Is there another way?
That is just a 'marker' for the F6 key (Split on chapter markers).
Just wait, knowing that is where it will hapen

Last edited by theducks; 08-18-2012 at 06:50 PM. Reason: continued thought
theducks is online now   Reply With Quote
Old 08-18-2012, 06:50 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,263
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Simply marking where the chapter breaks are supposed to occur will do nothing when converted to MOBI—as you've obviously discovered.

Now that you've marked the breaks, you're going to want to go ahead and utilize the "Split at Chapter Markers" feature if you want Kindlegen (Previewer) to create breaks. Kindlegen knows nothing about Sigil's hr classes—nor should it.

If you don't want to physically split up your html file, you can insert a div with a unique class and then use CSS to assign the "page-break-before: always;" attribute to that class. I believe kindlegen will honor that.
DiapDealer is online now   Reply With Quote
Old 08-20-2012, 03:27 PM   #4
msmith65
Enthusiast
msmith65 began at the beginning.
 
msmith65's Avatar
 
Posts: 31
Karma: 10
Join Date: Aug 2012
Device: Kindle
Quote:
Originally Posted by DiapDealer View Post
Simply marking where the chapter breaks are supposed to occur will do nothing when converted to MOBI—as you've obviously discovered.

Now that you've marked the breaks, you're going to want to go ahead and utilize the "Split at Chapter Markers" feature if you want Kindlegen (Previewer) to create breaks. Kindlegen knows nothing about Sigil's hr classes—nor should it.

If you don't want to physically split up your html file, you can insert a div with a unique class and then use CSS to assign the "page-break-before: always;" attribute to that class. I believe kindlegen will honor that.
Since I'm breaking a page before each h1 and h2, can I build something into their definitions in the CSS that will force the break before?
msmith65 is offline   Reply With Quote
Old 08-20-2012, 03:58 PM   #5
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,992
Karma: 4633978
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by msmith65 View Post
Since I'm breaking a page before each h1 and h2, can I build something into their definitions in the CSS that will force the break before?
Simply add the following line to the stylesheet:
Code:
h1, h2 {page-break-before: always;}
Doitsu is offline   Reply With Quote
Old 08-20-2012, 05:04 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,263
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by msmith65 View Post
Since I'm breaking a page before each h1 and h2, can I build something into their definitions in the CSS that will force the break before?
You bet. Just like Doitsu indicated, if you already have an element in your document that you consistently want a page break to precede, then by all means ... no need to add extra code. Just assign the page-break-before attribute to whatever element (or element class) works for you.
DiapDealer is online now   Reply With Quote
Old 08-21-2012, 12:46 AM   #7
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,004
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Beware. If you also put margins in the same elements in the stylesheet, the margins might be ignored in ADE.
Toxaris is offline   Reply With Quote
Old 08-21-2012, 03:33 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,193
Karma: 4800739
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Only the top margin, actually, and that's in accordance with the CSS spec (which says it may be ignored). That's at least with CSS2.1:

Quote:
Originally Posted by CSS2.1
When a forced page break occurs here, the used value of the relevant 'margin-bottom' property is set to '0'; the relevant 'margin-top' used value may either be set to '0' or retained.
And despite what the note says, the situation in CSS3 does not change in the right direction:

Quote:
Originally Posted by CSS3
the computed values of the relevant 'margin-top' and 'margin-bottom' properties are set to '0'.
EDIT: Ah, the future spec may say something different:

Quote:
When an unforced page break occurs here, both the adjoining ‘margin-top’ and ‘margin-bottom’ are set to zero. [...] When a forced page break occurs at (1), the used values of any adjoining ‘margin-bottom’ are set to zero.
(emphasis mine, it says nothing about margin-top in forced page break, meaning it is retained.) But this is CSS3, which is not applicable even for ePub3, I'm afraid.

Last edited by Jellby; 08-21-2012 at 03:56 AM.
Jellby is offline   Reply With Quote
Old 08-21-2012, 12:32 PM   #9
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,004
Karma: 3440001
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Hmm, did not check the specs. Sounds silly though.
Toxaris is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle pages vs. MS Word pages... joecap Workshop 14 02-18-2011 09:23 AM
Breaking DRM maurices5000 Sony Reader 40 02-02-2011 07:14 PM
Classic Split PDF pages into smaller pages (images into tiles) Astro Barnes & Noble NOOK 3 07-28-2010 03:55 PM
New hack PRS-505: multi status line with %read, time&pages reading, pages per minute. Car105 Sony Reader Dev Corner 5 01-03-2010 10:03 AM
Turning Scanned PDFs with facing pages into single pages jimteacher Workshop 5 11-09-2009 02:59 PM


All times are GMT -4. The time now is 08:38 AM.


MobileRead.com is a privately owned, operated and funded community.