View Full Version : How to avoid page break after heading/chapter


tkirke
01-17-2010, 05:01 PM
Hi,
I have a EPUB book with lots of Items that I'd like in the table of contents but I don't want a page break before or after each items. How do I do that?
Thanks

DaleDe
01-17-2010, 09:16 PM
Hi,
I have a EPUB book with lots of Items that I'd like in the table of contents but I don't want a page break before or after each items. How do I do that?
Thanks

EPUB does not automatically have page breaks anywhere and certainly not related to table of contents. However, some tools may assume H1 and H2 headers want page breaks. Try H3 headers. What tool are you using to create the ePUB? You may want to ask the tool vendor.

Dale

tkirke
01-22-2010, 04:30 AM
EPUB does not automatically have page breaks anywhere and certainly not related to table of contents. However, some tools may assume H1 and H2 headers want page breaks. Try H3 headers. What tool are you using to create the ePUB? You may want to ask the tool vendor.

Dale

Thanks. I'll try H3. I'm using a home-made tool to create the ePUB. So if it's not inherent in Epub it's either the way the Table of contents is created or what Adobe Digital Editions/EPUBReader do with it. Perhaps it's the fact that each table of contents items is the has a link to a different xhtml file? I tried setting page-break-after and page-break-before to avoid in the css for body, but it didn't do anything.

charleski
01-22-2010, 12:00 PM
Perhaps it's the fact that each table of contents items is the has a link to a different xhtml file?
Yes, that will force a page-break as the reader loads the file. If you don't want page-breaks then the next chapter needs to be part of the same file, give it a fragment identifier (<h2 id="chapter x">) and you can still reference it from the ToC.

Since MobileADE require each file to be under 300k when uncompressed, you'll need to have separate files (with inevitable page breaks) at some point if your book is long.

DaleDe
01-22-2010, 12:43 PM
Yes, that will force a page-break as the reader loads the file. If you don't want page-breaks then the next chapter needs to be part of the same file, give it a fragment identifier (<h2 id="chapter x">) and you can still reference it from the ToC.

Since MobileADE require each file to be under 300k when uncompressed, you'll need to have separate files (with inevitable page breaks) at some point if your book is long.

I believe only Sony readers still have the 300K limit, since they have not updated to the latest version.

Dale

afv011
01-22-2010, 12:56 PM
Hi,
I have a EPUB book with lots of Items that I'd like in the table of contents but I don't want a page break before or after each items. How do I do that?
Thanks

Check your CSS, you may have something like this:

h1 {page-break-before:always}

Valloric
01-22-2010, 03:12 PM
I believe only Sony readers still have the 300K limit, since they have not updated to the latest version.

Are you sure the limitation is in the software? It could be hardware related.