View Single Post
Old 01-01-2010, 05:12 PM   #2
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
To have calibre insert TOC entries you will need to convert the existing EPUB to EPUB again.

Go to "Table of Contents" in the conversion dialog and select "Force use of auto-generated Table of Contents". You will then need to create at least a level 1 toc. Click the button next to the text input to open the wizard to help you. Unfortunately This requires you to know how the book itself is structured. The best thing to do is rename the input EPUB to book.zip and extract the book. Look though the html files for the tags that represent the items you want added to the TOC. Use that with the wizard to help you write an XPath for the TOC.

Your other option which may be a easier is to use Sigil to open the EPUB, change the places you want to be TOC entires to h1, h2, or h3 tags and use the TOC generator it includes. Save the file and you're done.
user_none is offline   Reply With Quote