html - Prevent Orphan Lines in ePub export through Pages -


i've been editing book in pages , when export epub document line breaks have inserted document seem ignored.

i've resigned messing formatting in pages , have started editing epub sigil. parameters need edit prevent orphan lines or insert page breaks epub document?

after researching ibook documentation found inserting css tag: page-break-before:always;

specifically, i'm working on cookbook , wanted have each recipe on own page. using iwork not able achieve effect without little tinkering. opened exported epub document calibre (sigil seemed mess books formatting) after first creating header tag first recipe , separate header tag other recipes in chapter. located tag generated iwork , added h1.s4 { page-break-before:always; } css file.

do mean "line breaks", not "page breaks"?

the reliable way enforce page breaks prepare separate xhtml files.

beyond that, you're on own. you've entered "ios new ie6" hell. you'll find people telling put page-break-before on header tag, or page-break-after on last bit of previous page, or wrap go 1 page in block property display: inline-block. or of these might or might not work depending on reader, version, or time of day, , might not work , start working magically in future, or work , stop working magically in future. suggestion stop trying reverse-engineer ibooks see works or doesn't, , go separate xhtml files.

depending on needs , skill level, can write xsl-based tools split apart xhtml files separate files (perhaps based on custom attribute such myns:page-break='yes') ensure page breaks want them.

i strongly recommend against manual insertion of page-break-* properties handle orphans. @ point, ebook readers support css orphans property. until then, it's fools errand. if intent on obtaining precise layout want, you'll need go fixed-layout.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -