View Single Post
Old 12-24-2013, 02:30 PM   #104
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by stevelitt View Post
Hi Hitch,

As long as I have your ear, I need your opinion. I'm writing my ePubs in Xhtml, with Bluefish. I write the whole book as one Xhtml file, and then my converter (which isn't yet complete) splits it into files, making Manifest, Spine, NCX, and Guide as necessary entries for each page. The converter has a YAML config file that defines relationship between <h?> and Part, Chapter, Section, etc, and which levels get their own page. I typically page break on Part and Chapter, but it's configurable.

Here's my question: Some non-hierarchical entities, such as Acknowledgements, Apendix, etc, need their own pages, so there needs to be a way, in the full book Xhtml source, to indicate a new page. I *could* make things like the appendix title an <h?> tag of a special class indicating it's not in the hierarchy and therefore don't call it "Chapter" and don't increment the Chapter number, but for various reasons, that would be messy.

What I was thinking of was having a <div class=pagebreak/>, which would tell the converter to break here, without implying this is a Part, chapter, etc. In the multichapter source file it would look like a bunch of dashes, but in the individual ePub Xhtml file it would look like nothing at all, with margins of 0, and would gain an id value of "toppage". Yeah, it's a kludge, but it's a darned convenient kludge, both for the book author, and for the guy who programs the converter (me in both cases).

What do you think?

Thanks,

SteveT
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
Hitch is offline   Reply With Quote