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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 01-27-2011, 09:11 PM   #1
stevent10993
Junior Member
stevent10993 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2011
Location: New York
Device: ipad, kindle DX, color nook
epub to mobi loses page breaks

I'm hand coding epubs, and the page breaks work fine. But when I use Calibre to convert them to mobis, the page breaks disappear. Here, there are two separate problems.

[Problem 1]
All chapters are in separate .xhtml files. I've opened each chapter with a small image (150 x 121) above the h1 words "Chapter number" followed by the h2 words "title of the chapter" for each chapter. The problem is, the epub chapters open with the image and title together. But the Calibre mobi opens with the image on a page all by itself. Then the text begins on the next page.

For instance, here's chapter one:

<p class="image-center-then-nobreak"><img src="images/eB1-1-00-WiseMenYinYang3.png" alt="The Wise Men's Orange Map"/></p>
<h1 class="h1" id="toc-anchor">Chapter 1</h1>
<h2 class="h2" id="toc-anchor-1">Truth Seeking…<br/>We All Do It</h2>
<h3 class="h3" id="toc-anchor-2"><b>Are You A Truth Seeker?</b></h3>

The entire body is then wrapped in a single div with no css or styles added.

The css for "image-center-then-nobreak" is:

p.image-center-then-nobreak {
line-height: 1.33em;
text-indent: 0;
text-align: center;
margin-top: 50;
margin-bottom: 15;
page-break-after: avoid;
}

I've tried wrapping it all in a div, putting the image inside the opening h1, etc. Nothing seems to help.

[Problem 2]
In the last chapter of one book, there are fifteen examples, each separated by a small image (144 x 110). I want each example to start on a new page. They do in the epub. But in Calibre's converted mobi, all the images and text lose their page breaks.

<p class="image-icon-center"><span ><img src="images/WiseMenGameLayout-03.png" alt="The Wise Men's Game"/></span></p>
<h4 class="h4" id="toc-anchor-13">GAME THREE</h4>

Here, the css is:

p.image-icon-center {
line-height: 1.33em;
text-indent: 0;
text-align: center;
margin-top: 50;
margin-bottom: 15;
page-break-before: always;
}

Any input would be greatly appreciated as I'm ready to start tossing things at the screen.

Thanks

Steven

Last edited by stevent10993; 01-27-2011 at 09:14 PM.
stevent10993 is offline   Reply With Quote
Old 01-27-2011, 10:00 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,433
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Be aware that the calibre viewer does not support pagebreaks in MOBI. Use the kindle previewer instead.
kovidgoyal is online now   Reply With Quote
 
Advertisement
Old 01-28-2011, 08:47 AM   #3
stevent10993
Junior Member
stevent10993 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2011
Location: New York
Device: ipad, kindle DX, color nook
Yes, thanks, I am aware that the Calibre viewer doesn't support pagebreaks. But I've tried these files on both the Kindle for PC app, a Kindle 2, and a Kindle DX. All N.G. I've also tried looking at Calibre's debugging code. But unfortunately, Calibre removes any and all formatting from the content.opf and toc.ncx files. So it's a bit tough.

I'd still welcome any thoughts.
stevent10993 is offline   Reply With Quote
Old 01-28-2011, 08:53 AM   #4
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
What settings do you have under structure detection? Sounds like you may have the default option of 'insert page breaks' configured - default is to insert breaks before H1 and H2 tags. You need to delete that before converting, or possibly change it to 'h4' to try and fix the other issue - not sure of the cause of the problem there.
ldolse is offline   Reply With Quote
Old 01-29-2011, 10:10 AM   #5
stevent10993
Junior Member
stevent10993 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2011
Location: New York
Device: ipad, kindle DX, color nook
Thanks so much, Idolse. You've pointed me to the source of my page break problem. And given me a way to insert page breaks at other points. I simply inserted an empty h1 before each chapter image. Then I changed the chapter number text which follows these images from h1 to h2 tags. Finally, per your help, I changed the h2 in the structure settings to h5. Now all is well.

Thank you so much.
stevent10993 is offline   Reply With Quote
Old 07-20-2011, 01:43 AM   #6
jim.thornton
Junior Member
jim.thornton began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2011
Device: Aztec EZReader (w/ Hanlin firmware)
Sorry, posted in the wrong thread.
jim.thornton is offline   Reply With Quote
Reply

Tags
epub to mibi, page breaks in mobi

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page breaks in Mobi files HarryT Kindle Formats 4 02-24-2012 05:43 AM
Mobi page breaks in Calibre viewer DaleDe Calibre 3 04-04-2011 02:58 AM
PDF to EPUB - page breaks pops1959 Calibre 0 01-13-2011 08:28 PM
Page breaks - PDF input to ePub output JoTH Calibre 9 11-18-2010 05:35 PM
Opening ePub in Sigil breaks TOC and loses italics PatNY Sigil 15 08-25-2010 08:05 PM


All times are GMT -4. The time now is 04:39 AM.


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