View Single Post
Old 05-29-2013, 01:48 AM   #1
waynn
Member
waynn began at the beginning.
 
Posts: 12
Karma: 10
Join Date: May 2013
Device: Kindle
MOBI to EPUB conversion in calibre adds page breaks

I currently have this HTML that I'm passing into kindlegen to create a mobi:

Code:
<h4 id='foo' class='chapter'>Here's my heading</h4>
where the CSS for "chapter" is

Code:
page-break-before: always;
All is well and good in my MOBI, but when I convert to EPUB and then unzip the underlying EPUB (because I noticed extra page breaks), I see this.

Code:
<div class="calibre3"></div><h4 class="calibre6" id="foo">
Where calibre3 and calibre6 both have page-break-before: always set. When I preview this in iBooks, it leads to a few blank pages before hitting the chapter tag.

Is there something I can do to make sure that extra <div> isn't added? Or, alternately, is there any way I can collapse multiple empty <div> tags that have page-break-before so that there's only one page break?
waynn is offline   Reply With Quote