View Single Post
Old 09-30-2011, 02:25 PM   #3
therealjoeblow
Connoisseur
therealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfolded
 
Posts: 96
Karma: 52102
Join Date: Jun 2010
Device: Kobo Touch; Blackberry w/MobiPocket Reader
Convert it to .mobi first. If your headings are <h1> <h2> or <h3> and the text in the headings includes any of the words:chapter, part, epilogue, prologue, section or book; then the default structure detection will catch those and create a TOC at the end of the book (you can tweak the Xpath expression if it doesn't to to include the appropriate trigger words, or make it use various <p> classes instead to get the TOC created).

Then convert the .mobi back to HTMLZ, and you can then move the TOC part from the end to wherever you want it.

That's the simplest automatic method I've found.

Cheers
The REAL Joe
therealjoeblow is offline   Reply With Quote