View Single Post
Old 08-12-2013, 11:01 AM   #613
BobC
Guru
BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.
 
Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
Kepub Conversion oddity

I have just completed editing an EPUB to get the chapters etc right and then converted it to KEPUB. I then Exploded and Examined the Kepub and came across some strange results.

I had split the epub into Chapters which started with a h2 header with the text "CHAPTER n" followed by another h2 header with a subtitle text e.g. "Our Hero Goes Forth".

When I convert this to kepub the chapters are split so section_004.html becomes section_004_split_001.html and section_004_split_002.html with the first file containing just the CHAPTER n heading and the second one the rest of the original. Needless to say this means that when rendered on the Glo the combining I had done is undone and CHAPTER n will appear on a separate page.

I checked that I have nothing in the "Detect Chapters" xpath under "Stucture Detection" in the conversion options.

From the conversion log it appears that this is where the splitting is happening :

Code:
Splitting markup on page breaks and flow limits, if any...
Splitting on page-break at id=calibre_pb_18
Splitting on page-break at id=calibre_pb_19
Splitting on page-break at id=calibre_pb_20
This is the code in the original html which is triggering the split :

Code:
<h2 class="calibre23" id="calibre_pb_18"><span class="calibre18"><span class="bold"><span><a class="calibre15" href="../Text/Nation_002.html#filepos1740"><span class="calibre16"><span><span class="bold">CHAPTER 3</span></span></span></a></span></span></span></h2>
I'm unclear as to why these are being treated as pagebreaks - AIUI the id is just reference.

Is this a bug that needs reporting or have I missed some obscure option ?

BobC

EDIT: I've looked at another conversion and it looks like the page split is happening on all id= ocurrences

EDIT2 : Found the option for "Do Not Split on Page Breaks" - if selected this stops the unwanted splitting, however why all id's are being treated as page breaks is less than obvious. I suspect this is not a function of the Kepub conversion but of Calibre's EPUB routines.

Last edited by BobC; 08-12-2013 at 04:38 PM. Reason: Solution found.
BobC is offline   Reply With Quote