05-03-2014, 01:39 PM | #1 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
unwanted pagebreak
My epub looks nice in both Sigil and Calibre Viewer, links work, chapter headings are between 2 images. But when I convert to mobi, then after first image will be pagebreak. I just can't understand why, as far as I see there's nothing in the code to put pagebreak there. All the pagebreaks I have are in the end of every chapter.
pagebreak in prologue: Code:
<div class="mbppagebreak" id="calibre_pb_2"></div> Code:
<body class="calibre"> <div class="calibre1" id="filepos2561"> <p class="himg1"><img alt="" class="calibre20" src="../Images/00012.jpg" /></p> <h2 class="head"><a class="calibre14" href="../Text/toc.html#filepos650277"><span class="calibre5">C</span><span class="calibre6">HAPTER 1</span></a></h2> <p class="himg2"><img alt="" class="calibre20" src="../Images/00001.jpg" /></p> </div> Code:
h2 { display: block; font-size: 1em; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; text-align: center; text-indent: 0 } .calibre { display: block; line-height: 1.2; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; text-align: justify } .calibre1 { display: block } .himg1 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 2em; text-align: center; text-indent: 0 } .himg2 { display: block; margin-bottom: 1.4em; margin-left: 0; margin-right: 0; margin-top: 0; text-align: center; text-indent: 0 } .head { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; font-style: italic; font-weight: bold; text-align: center; text-indent: 0 } .calibre20 { height: 42px; vertical-align: baseline; width: 131px; page-break after: never; } .calibre14 { color: blue; cursor: pointer; text-decoration: underline } .calibre5 { font-size: 1.25em; line-height: 1 } .calibre6 { font-size: 1.125em; line-height: 1.2 } .mbppagebreak { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0 } I'm using default > default settings. Hopefully someone can spot what's wrong. |
05-03-2014, 02:41 PM | #2 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
Narrowed the culprit down:
Code:
<h2 class="head"><a class="calibre14" href="../Text/toc.html#filepos650277"><span class="calibre5">C</span><span class="calibre6">HAPTER</span><span class="calibre5">1</span></a></h2> Why won't the conversion accept empty space? Never had a problem with that before. |
Advert | |
|
05-04-2014, 03:25 AM | #3 |
Addict
Posts: 206
Karma: 547516
Join Date: Mar 2008
Location: Berlin, Germany
Device: KObo Clara, Kobo Aura, PRS-T1, PB602, CyBook Gen3
|
You should take a look at the option 'Detect chapters at (XPath expression)' on top of the conversion settings and the reaction to a detected 'chapter' (pagebreak, rule, both or none).
Maybe something there can tell you what goes wrong. |
05-04-2014, 05:40 AM | #4 |
Evangelist
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
|
The xpath expression is the one that came with Calibre. I don't even begin to understand it:
Code:
//*[((name()='h1' or name()='h2') and re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class = 'chapter'] p.s. - I tried replacing class = 'chapter' with class = 'himg1'. Didn't work. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
h1 pagebreak without h2 | bookdragon | Sigil | 5 | 03-03-2014 06:11 AM |
HELP from Pagebreak !! Smashword | Tara198 | Writers' Corner | 4 | 07-06-2013 06:22 PM |
Calibre Mobi Pagebreak Issue | burbleburble | Conversion | 7 | 06-02-2011 12:57 PM |
0.6.3 pagebreak before h2 only every second time? | flowoeB | Calibre | 4 | 07-31-2009 01:47 AM |
XPath Help and Pagebreak | emellaich | Calibre | 3 | 07-28-2009 02:17 PM |