View Single Post
Old 12-25-2013, 01:34 PM   #105
stevelitt
Member
stevelitt began at the beginning.
 
Posts: 13
Karma: 24
Join Date: Dec 2013
Location: Florida, USA
Device: Kindle
Quote:
Originally Posted by Hitch View Post
Hi, Steve:

I'd recommend that you look at Sigil, which works remarkably like this, and at Kovid's new Calibre add-in/add-on, etc. Sigil uses a pagebreak tag which subsequently separates the file.

I think you'll find that the frontmatter-type pages work best when they are in their own XHTML file, just like the chapters. This is also fairly crucial if you intend to use this same ePUB file for MOBI conversion, as Mobi won't give you any top-margin for chapter heads, etc., without it being a new file.

Check those out; those are better sources of information than I, in this particular matter, I'd say.

Hitch
Thanks Hitch,

You were more help than you think: The fact that you didn't get grossed out and say "Your top of page sentinels are a horrible idea" gives me a lot of information.

Five minutes ago, I used Sigil to parse apart a multi-h1 document, breaking it apart manually with "break at cursor". If Sigil uses a pagebreak tag, it doesn't survive into the Xhtml of the chapters, so I can't deduce what Sigil does in order to do the same thing in my program.

My current intent is to have my <div class="toppage"/> pagebreak tags get put into the actual Xhtml pages, with my parser inserting ids so everything can find them. That way the parser needn't mess with the IDs of my H1 or other tags.

One beauty of my current intent is that, although my parser will automatically insert these tags before every h1 or h1 and h2 (depending on config), if the author manually inserts one of these tags before his dedication, for instance, it will page break there, so the author has complete control. This addresses your admonition that frontmatter-type pages work best if they're in their own Xhtml file.

I think the time has come for me to quit asking questions and just try it and see if it works. Thanks for all your help, and I'll report back with any results.

SteveT
stevelitt is offline   Reply With Quote