Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-16-2014, 02:43 PM   #1
iaw4
Junior Member
iaw4 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2010
Device: kindle
weird page break in html->epub conversion

I am a novice to calibre and epub generation. I do know a little about html. I am trying to create consecutive color boxes that show up nicely in browsers and epub. alas, the following html works nicely, but when converted with ubuntu-linux based calibre 1.0, it sets the first title-h1 onto its own page in the linux e-book viewer. any idea why (and how to change this)?

help appreciated.

Code:
<!DOCTYPE html>
<html>

<body>

  <div style="background-color: blue; color:white;">
    <h1 style="font-size: xx-large; margin-top: 1em; margin-bottom:0em;">A Test Title</h1>
  </div>
  <div style="background-color:yellow; color:black;">
    <h1 style="font-size: small; margin-top:0em;">that should continue with adjaced test author</h1>
  </div>
	 
  <div style="margin:3em">

    <p>This is the time for all good men to come to the aid of their country. This is the time for all good men to come to the aid of their country. This is the time for all good men to come to the aid of their country. </p>

  </div>

</body>
</html>
it seems to be unique to being an h1 header. if I use a span instead of an h1, it works as expected...
iaw4 is offline   Reply With Quote
Old 01-16-2014, 03:09 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
h1 is used to semantically mark chapter headers. During a conversion, this gets split into different pages.

You can use other header tags (h2,h3,h4,h5,h6) to mark different stuff, and set the xpath to detect however you set it up. Kovid already explained it better, though, so why don't you take a look at the manual, here: http://manual.calibre-ebook.com/conv...nd-page-breaks
eschwartz is offline   Reply With Quote
Reply

Tags
calibre, epub


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
display adjoining html files without page break weberr Sigil 13 11-10-2012 03:43 AM
ePub conversion not adding page breaks on separate HTML files neonbible Conversion 1 11-06-2012 11:36 AM
PDF to HTML page break questions michaelbr PDF 3 01-27-2011 08:49 PM
Un-wanted page break information after conversion miztiik Calibre 1 10-21-2010 11:09 AM
How Do I Create A HTML jetBook Page Break? galavanter Ectaco jetBook 21 10-29-2009 12:05 PM


All times are GMT -4. The time now is 01:58 AM.


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