Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 09-26-2011, 10:23 AM   #1
jfs999
Junior Member
jfs999 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2011
Device: Kindle 2
Question adding table of contents to html files

I have a (very) large HTML file that has a very large number of :hx headings that I need to include in a table of contents. Is there an easy way to build the table? Normally, we'd use our HTML editor, but we're having problems with it - it keeps inserting tons of extra, unnecessary code into the file that has to be stripped out before we can process the final file.

I want to keep the file output as HTML so that we can continue to edit it.

Thanks!!
John
jfs999 is offline   Reply With Quote
Old 09-26-2011, 10:38 AM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Moderator Notice
I'm assuming you want to do this via the Calibre conversion process, so I moved it to the appropriate subforum. If you don't want to use Calibre, you're probably better off asking here or here.
Manichean is offline   Reply With Quote
Advert
Old 09-30-2011, 02:25 PM   #3
therealjoeblow
Zealot
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: 106
Karma: 52102
Join Date: Jun 2010
Device: Samsung Android Tablet w/Moon+ Pro 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
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Table of Contents denmarks Conversion 4 08-14-2011 10:54 PM
ePub or HTML to Mobi Table of Contents problem Dark123 Conversion 2 05-08-2011 03:43 PM
Adding a Table of Contents for PRS-650 daviestown Recipes 6 12-31-2010 10:39 PM
Adding Table of Contents to ePub problems... cates Calibre 2 10-10-2010 04:18 PM
Table of Contents - html to Mobi problem thames Calibre 3 06-02-2010 07:24 PM


All times are GMT -4. The time now is 05:04 PM.


MobileRead.com is a privately owned, operated and funded community.