View Full Version : Formatting ePubs


dynabook
09-22-2008, 05:54 PM
I am working on a project for moving a large document to an electronic medium for reading purposes. I started with iSilo on a Palm and was getting pretty good results but the document was so large and the Palm was so small I got tired of the conversion process.

I have since gotten a Sony Reader and with the advent of ePub capabilities have been drawn back to this project to try and produce an ePub version. I basically have html which needs a lot of formatting. I am working on a chapter at a time.

The results so far are pretty good but I can't seem to get page breaks where I want them. I would like the top of the page to start right after the break. I am using the following statement:

<br clear="all" style='page-break-before:always' />

Should I add the style to my Chapter title? How do I add multiple styles since the chapter title is already style='text-align:center'? span tag?

Sorry for the newbie html questions but this is annoying.

zelda_pinwheel
09-22-2008, 06:35 PM
i believe epub uses an external stylesheet, which will allow you to add whatever (as many) css styles you like.

it might be helpful to look at a finished epub document : you could try formatting a sample document using the wysiwyg editor on feedbooks.com, then just download the preview rather than publishing the document. an epub file can be opened using winzip or winrar to see the different files that compose it. you could also use this editor to make your entire book. books in progress are saved between sessions.

Hadrien
09-22-2008, 07:12 PM
I am working on a project for moving a large document to an electronic medium for reading purposes. I started with iSilo on a Palm and was getting pretty good results but the document was so large and the Palm was so small I got tired of the conversion process.

I have since gotten a Sony Reader and with the advent of ePub capabilities have been drawn back to this project to try and produce an ePub version. I basically have html which needs a lot of formatting. I am working on a chapter at a time.

The results so far are pretty good but I can't seem to get page breaks where I want them. I would like the top of the page to start right after the break. I am using the following statement:

<br clear="all" style='page-break-before:always' />

Should I add the style to my Chapter title? How do I add multiple styles since the chapter title is already style='text-align:center'? span tag?

Sorry for the newbie html questions but this is annoying.

I'm not sure that you're allowed this CSS property here. Try the same thing on a div, it'll probably work.

kovidgoyal
09-22-2008, 08:24 PM
<h2 style="page-break-before: always">Chapter title</h2>

And you can use html2epub to create epubs for the sony.

EDIT; And you can always force a page break by splitting the HTML file into two separate files.