View Single Post
Old 05-24-2011, 08:33 PM   #5
ryy8
Junior Member
ryy8 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2011
Device: Kindle
(replying to an old thread, because this is the first hit that came up on Google and the question wasn't really answered).

This is answered in the Calibre FAQ: What’s the deal with Table of Contents in MOBI files?

Quote:
The first thing to realize is that most ebooks have two tables of contents. One is the traditional Table of Contents, like the TOC you find in paper books. This Table of Contents is part of the main document flow and can be styled however you like. This TOC is called the content TOC.

Then there is the metadata TOC. A metadata TOC is a TOC that is not part of the book text and is typically accessed by some special button on a reader. For example, in the calibre viewer, you use the Show Table of Contents button to see this TOC. This TOC cannot be styled by the book creator. How it is represented is up to the viewer program.

In the MOBI format, the situation is a little confused. This is because the MOBI format, alone amongst mainstream ebook formats, does not have decent support for a metadata TOC. A MOBI book simulates the presence of a metadata TOC by putting an extra content TOC at the end of the book. When you click Goto Table of Contents on your Kindle, it is to this extra content TOC that the Kindle takes you.

Now it might well seem to you that the MOBI book has two identical TOCs. Remember that one is semantically a content TOC and the other is a metadata TOC, even though both might have exactly the same entries and look the same. One can be accessed directly from the Kindle’s menus, the other cannot.

When converting to MOBI, calibre detects the metadata TOC in the input document and generates an end-of-file TOC in the output MOBI file. You can turn this off by an option in the MOBI Output settings. You cannot control where this generated TOC will go. Remember this TOC is semantically a metadata TOC, in any format other than MOBI it cannot not be part of the text. The fact that it is part of the text in MOBI is an accident caused by the limitations of MOBI. If you want a TOC at a particular location in your document text, create one by hand.

If you have a hand edited TOC in the input document, you can use the TOC detection options in calibre to automatically generate the metadata TOC from it. See the conversion section of the User Manual for more details on how to use these options.

Finally, I encourage you to ditch the content TOC and only have a metadata TOC in your ebooks. Metadata TOCs will give the people reading your ebooks a much superior navigation experience (except on the Kindle, where they are essentially the same as a content TOC).
ryy8 is offline   Reply With Quote