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 09-29-2012, 01:11 PM   #1
jackibar
Enthusiast
jackibar began at the beginning.
 
Posts: 38
Karma: 12
Join Date: May 2010
Device: iPhone apps
Sigil Adding Page Breaks in TOC!

Hi, everyone... I've done several books into Kindle format now with no problems. The "method" I'm using is:

1. Create a "clean" html file manually (yeah, I know - but I'm a programmer at heart!).
2. Import this file into Sigil (I'm on a Mac).
3. Create the chapter breaks, ncx TOC, etc.
4. Open in Calibre and convert to .mobi format.

So far, this has been working fine! However, I have a book I'm working on now that for some reason the "inline" TOC is rendering a page break after each Chapter Heading text when previewing in Kindle, as well as Kindle Previewer. I've checked the .ePub version previewing in Calibre, and it's not doing it there. When I look at the file within Sigil, I can see NOTHING that would be causing this weird "page break" behavior - the preview window in Sigil also shows the text flowing on a single "page" with no breaks. Also, the "ncx TOC" that Sigil generates is displaying just fine.

So I just used "MobiUnpack" on that mobi file to see what had happened to my code. And there it is, plain as day - <mbpagebreak></mbpagebreak> after every Chapter heading in the TOC. The only thing "different" between this particular book and the others I've done is I have the inline TOC set up like:

(h2) - Chapter One (for example).
(h3) - Subtitle for Chapter One (that is NOT hyperlinked - just there for descriptive purposes).

Would this be causing things to get confused?! Is this coming from Sigil or Calibre? And which program is changing all my headers into p tags with font sizes and bolds instead?!! Looks like a big mess

So - what on earth could cause this to happen?! And how do I fix it?!

(BTW, please don't tell me there's no need for an inline TOC!! I realize that - but in certain books, I believe it is helpful, and this is one of them...!)
jackibar is offline   Reply With Quote
Old 09-29-2012, 01:52 PM   #2
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
Join Date: Feb 2010
Device: none
My first guess would be that Calibre is doing this. It may be seeing the <h2> and/or <h3> tags and trying to make pagebreaks before them.

Look in the Calibre conversion settings on the "structure detection" tab, and see if you can turn off that behavior. (e.g. modify the xpath expression to ignore h3, or change the "chapter mark" dropdown selection.)

Or, try using kindlegen for the mobi conversion.

Or maybe just use <p> tags for your subtitles.

Last edited by st_albert; 09-29-2012 at 01:55 PM.
st_albert is offline   Reply With Quote
Old 09-29-2012, 05:31 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,267
Karma: 42123822
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by st_albert
My first guess would be that Calibre is doing this. It may be seeing the <h2> and/or <h3> tags and trying to make pagebreaks before them.
That's the only guess necessary.

@OP: Check your structure detection settings in calibre's conversion dialog. Something in your toc's (x)html is matching the "Detect chapters at" xpath expression and the "Chapter mark" combo is set to "pagebreak." That's where the problem lies.

I've had that fool me so many times I've lost count. It's not Sigil, trust me.

If you have your chapter breaks exactly how you want them in your epub, just disable calibre's chapter detection by changing the "Detect chapters at" xpath expression to "/" (without the quotes of course).
DiapDealer is online now   Reply With Quote
Old 09-30-2012, 04:00 PM   #4
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
Quote:
Originally Posted by jackibar View Post
Hi, everyone... I've done several books into Kindle format now with no problems. The "method" I'm using is:

1. Create a "clean" html file manually (yeah, I know - but I'm a programmer at heart!).
2. Import this file into Sigil (I'm on a Mac).
3. Create the chapter breaks, ncx TOC, etc.
4. Open in Calibre and convert to .mobi format.
Why not upload the epub to the KDP, and leave Calibre out of the loop?
Oldpilot is offline   Reply With Quote
Old 10-05-2012, 07:55 PM   #5
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,504
Karma: 13830371
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by Oldpilot View Post
Why not upload the epub to the KDP, and leave Calibre out of the loop?
"Oldpilot"

I suspect the OP doesn't want to create the html toc by hand, and lets Calibre do this for him. Otherwise, I agree, doesn't make a lot of sense. He mentioned the ncx, not a hand-crafted inline TOC, so that's my guess.

Hitch
Hitch is offline   Reply With Quote
Old 10-05-2012, 08:50 PM   #6
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by Hitch View Post
"Oldpilot"

I suspect the OP doesn't want to create the html toc by hand, and lets Calibre do this for him. Otherwise, I agree, doesn't make a lot of sense. He mentioned the ncx, not a hand-crafted inline TOC, so that's my guess.

Hitch
Just for completeness, the recent betas, .905 and .906 are very good at creating inline HTML TOC's.
st_albert is offline   Reply With Quote
Old 10-05-2012, 09:38 PM   #7
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,504
Karma: 13830371
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by st_albert View Post
Just for completeness, the recent betas, .905 and .906 are very good at creating inline HTML TOC's.
I admit I've not tried it yet. I'm a wee bit cautious, as we're, also as are you, in a production environment. When my sweetie Ducky tells me it's ready, I'll install it. (Just kidding you, Ol' Moderator Ducks).

Hitch
Hitch is offline   Reply With Quote
Old 10-05-2012, 10:07 PM   #8
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by Hitch View Post
I admit I've not tried it yet. I'm a wee bit cautious, as we're, also as are you, in a production environment. When my sweetie Ducky tells me it's ready, I'll install it. (Just kidding you, Ol' Moderator Ducks).

Hitch
Well, on Linux (actually Ubuntu Precise) I have not had problems producing a finished product. I expect the same on Debian linux, though in that case I'm going to wait for the 0.6 release. This baby is solid, IMHO!
st_albert is offline   Reply With Quote
Old 10-05-2012, 10:34 PM   #9
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,854
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Hitch View Post
I admit I've not tried it yet. I'm a wee bit cautious, as we're, also as are you, in a production environment. When my sweetie Ducky tells me it's ready, I'll install it. (Just kidding you, Ol' Moderator Ducks).

Hitch
Try it
You'll like it


They are pretty plain,
but I believe you can figure something to jazz'm up
theducks is offline   Reply With Quote
Old 10-05-2012, 10:54 PM   #10
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 544
Karma: 64420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by theducks View Post
T
They are pretty plain,
but I believe you can figure something to jazz'm up
Plain inline TOC? I agree, and not the styling I would have decreed. (actually I'd have used a much simpler HTML because, really who cares what it looks like as long as it's functional?) Yet, it seems to work fine in (my main concern) Mobi7 and KF8 (and Apple has not yet complained) so...

And if you don't like the styling, there's always the powerful PCRE engine to fix things relatively easily. Not that I've run into problems yet, w/r to kindlegen conversion for example.
st_albert is offline   Reply With Quote
Old 10-07-2012, 04:55 PM   #11
Man Eating Duck
Addict
Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.Man Eating Duck juggles neatly with hedgehogs.
 
Posts: 253
Karma: 69784
Join Date: May 2006
Location: Oslo, Norway
Device: Kobo Aura, Sony PRS-650
Quote:
Originally Posted by jackibar View Post
Would this be causing things to get confused?! Is this coming from Sigil or Calibre? And which program is changing all my headers into p tags with font sizes and bolds instead?!! Looks like a big mess

So - what on earth could cause this to happen?! And how do I fix it?!
I also suspect calibre. FWIW we don't do the epub->epub conversion trick in calibre anymore, it makes a lot of changes both to the css and html, and you don't really have fine-grained control over it. For personal use it's fine, but I would advise against it in a production setting.

The wonderful new beta of Sigil has the features needed for splitting and TOC (make sure that your headings are proper h tags, and that things that are not headings are *not*, but it seems you already do that). You can automate most of your workflow with for instance grouped saved searches.

We use calibre for metadata (with the neat Modify Epub plugin kiwidude wrote, that guy is on fire) and storage. You *can* overwrite the epub file in the calibre directory [I know, I know ], this is actually very handy as it'll retain metadata from the existing entry.

Our workflow is currently:

Indesign -> calibre, add metadata.
Sigil: Replace the Indesign-generated CSS with a custom one.
Split files at chapter breaks (we use a dedicated p style as a marker, which we then S/R with the Sigil hr marker), generate toc, de-obfuscate fonts (if embedded fonts are needed), a few saved formatting searches (for "textboxes" and some stylistic flourishes) and validation. Up until recently we did all this with an extremely messy perl script written by myself.
We then give the file a quick page-through in ADE, and run it through ebpucheck since our distributor demands it. I haven't seen an invalid file from this workflow in a long time, though.

With this workflow I currently spend about three minutes to generate a finished epub from an Indesign document when we need to update content. The Sigil beta is amazing, I can't praise the dev team enough. I am also a bit cautious about using a beta in production, but if anything it seems more reliable than 0.5.3, and we inspect our files thoroughly.

Quote:
Originally Posted by jackibar View Post
(BTW, please don't tell me there's no need for an inline TOC!! I realize that - but in certain books, I believe it is helpful, and this is one of them...!)
We also go the epub->mobi route, and you need to have an inline TOC to make a proper mobi since the KindlePreview mobi builder amazingly doesn't generate one from toc.ncx. I don't particularly like inline TOCs myself, but of course you need them for that

You can also easily style the Sigil-generated HTML TOC if you want, since the different divs are nicely classed.
Man Eating Duck is offline   Reply With Quote
Old 10-07-2012, 06:15 PM   #12
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
My ears were burning

I just wanted to add that if someone wants to come up with an alternative styling for the Sigil generated inline TOC (as a single html page with inline CSS) please feel free to either PM it to me or put as an attachment. We can always consider making it the Sigil default so all users of this feature get the benefit over the current one? Though it wasn't me who added it I'm pretty sure most of the development effort on that particular feature didn't go into the styling .

Perhaps one day Sigil may have some sort of templates feature (a bit like word) where you could choose from a range of "Inline TOC" styles, as well as of course templates for other content page types etc. Just a random thought...
kiwidude is offline   Reply With Quote
Old 10-07-2012, 07:40 PM   #13
ElMiko
Addict
ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.ElMiko actually enjoys Vogon poetry.
 
ElMiko's Avatar
 
Posts: 299
Karma: 56788
Join Date: Jun 2011
Device: Kindle
Quote:
Originally Posted by Man Eating Duck View Post
We also go the epub->mobi route, and you need to have an inline TOC to make a proper mobi since the KindlePreview mobi builder amazingly doesn't generate one from toc.ncx. I don't particularly like inline TOCs myself, but of course you need them for that
I, too, find inline TOCs an eyesore... unfortunately, they are frequently an indispensible eyesore. If you are converting to MOBI, and have a nested TOC, the embedded TOC in MOBI file produced will only recognize the first level items in your TOC. To get around this you can either forgo nested TOCs in the EPUB book, or you can add an inline TOC, so that reader on a Kindle device will have some way of navigating the full extent of the TOC you've designed, albeit not in an embedded way.
ElMiko is offline   Reply With Quote
Old 10-14-2012, 05:56 PM   #14
Dyspeptica
Member
Dyspeptica began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2012
Device: iPad
I ran into the page-break problem too.

Since you are wrangling html code yourself, add this, to the bottom of the <head> section:

<div style="page-break-before:always;"></div>

I was adding a 'frontispiece' after a title heading, and getting a page break. That fixed it.
Dyspeptica is offline   Reply With Quote
Old 10-19-2012, 10:01 AM   #15
jackibar
Enthusiast
jackibar began at the beginning.
 
Posts: 38
Karma: 12
Join Date: May 2010
Device: iPhone apps
Wow! I haven't been back on the forums in a while (been working on ebook formatting! - and just now came back to check on responses. Thanks SO much to everyone who responded! I'm learning a lot from all of you.

Okay question - what is "betas, .905 and .906" - I'm assuming these are beta releases of Sigil? If so, where can I find (and try) them?! Sounds very interesting...

Just wanted to also say a huge thank you to the developers - you're doing a VERY good thing here, and I for one really appreciate it
jackibar 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
Sigil: Chapter Breaks - Confusion? fructal Sigil 14 08-16-2012 09:00 AM
Converting to PDF help? Bad page breaks and no TOC produced. Jokerfwb Conversion 6 07-24-2012 10:36 PM
epub to mobi h1 page breaks not starting on new page wannabee Conversion 4 08-02-2011 12:46 AM
Adding page breaks in Calibre breaks ePubcheck validation bookraft Conversion 16 03-01-2011 01:23 PM
Opening ePub in Sigil breaks TOC and loses italics PatNY Sigil 15 08-25-2010 07:05 PM


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


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