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 05-03-2014, 01:39 PM   #1
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 469
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows XP, Windows7
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>
html:

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>
and css:

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
    }
Nothing I try makes any difference - after conversion first image has its own page. When I inspected the code (viewing mobi in calibre viewer), I saw 'mobipagebreak' and lots of of other crud there.
I'm using default > default settings.

Hopefully someone can spot what's wrong.
travger is offline   Reply With Quote
Old 05-03-2014, 02:41 PM   #2
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 469
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows XP, Windows7
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>
converts as I want it to. (I removed space after 'chapter')

Why won't the conversion accept empty space? Never had a problem with that before.
travger is offline   Reply With Quote
Old 05-04-2014, 03:25 AM   #3
Sunlite
Zealot
Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.Sunlite can program the VCR without an owner's manual.
 
Sunlite's Avatar
 
Posts: 122
Karma: 165452
Join Date: Mar 2008
Location: Berlin, Germany
Device: 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.
Sunlite is offline   Reply With Quote
Old 05-04-2014, 05:40 AM   #4
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 469
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows XP, Windows7
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']
But if this needs to be changed, then why does a heading without space (e.g. chapter1) work?

p.s. - I tried replacing class = 'chapter' with class = 'himg1'. Didn't work.
travger 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
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


All times are GMT -4. The time now is 06:35 AM.


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