Some text editors (e.g. MS Word, or Atlassian Confluence Wiki editor) make it trivial to add a table of contents to a text that was properly formatted (e.g. has headings/chapter titles), by merely doing a single "insert table of contents" operation, as opposed to manually creating all the links - and the TOC can be easily refreshed as the text structure changes.

Is there such a capability for EPUB books?

  • Is there a TOC concept in the format specification itself?

  • If so, does at least one popular EPUB editing software support that concept, including refreshing TOC to reflect text structure changes?

  • If the HTML files in the EPUB are using consistent styles/tags (e.g. H1, H2) for section headers, then generating an TOC can be done with a very simple program, outside of the EPUB generation software. – Anthon Dec 22 '13 at 15:30
  • @Anthon - in the scope of this question, DIY wasn't really considered. If the answer is "no", i'll probably ask DIY as a follow up – DVK Dec 22 '13 at 17:08
  • that is what I thought, that is why I posted as a comment, not as an answer. But it is of course an option with any program that provides consistent structure without explicit generation of a ToC. – Anthon Dec 22 '13 at 18:07

Both Sigil and Calibre can edit or create a TOC for .epub books.

In Sigil, once you have opened your ebook, press Ctrl+T , and you will open a window where you can generate the TOC from the various h1, h2, h3 (and so on) tags, you can manually select how deep to go in the header hierarchy.

Inside Calibre, select the ebook, press K, and you will get another window that will let you do something similar, but you have some more options if compared to Sigil, in example you can generate entries not only from html headings but also from single files inside the .epub, rearranging the list and the hierarchy, and so on. It's simplier to do it than to explain it.

  • Is the TOC just a bunch of links (e.g. same as creating one by hand for HTML document) or an actual TOC markup? – DVK Dec 22 '13 at 18:51
  • @DVk that should be a separate question – Mark Dec 22 '13 at 19:57
  • It's a special XML file. As Mark suggest, maybe this could be asked in a new question, where I can answer to you in more detail. Also see here ebooks.stackexchange.com/questions/192/… – Sekhemty Dec 22 '13 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.