Even aside from the question of manually making a working ToC, I’d like to know how the automatic generation works. For example, what is a “flat” ToC? What is a “landmark guide”? How do the five checkboxes interact? How can I predict which sections will get a ToC entry and which won’t? (It seems random.) Will the ToC be the same for ePub, mobi, and pdf? Is there any way at all to control anything about the formatting?
For ePub books, I think I can modify the HTML, either directly or using a tool like Sigil. For mobi, I have no idea what to do.
All of these settings are documented in a couple of pages, in §23.4.6, Table of Contents Tab, pg. 594.
Amazon’s recommended workflow is now ePub based anyway, so you can produce both copies simultaneously. Once the ePub if finalised, it can be dragged into Kindle Previewer to verify the formatting, and from there you can export to .mobi if you want to put a copy on your device for proofing.
PDF doesn’t have an automatic table of contents, but generally no they wouldn’t be much alike since one is based upon hyperlink navigation and the other on page numbers.
Refer to chapter 22 for further details on creating a table of contents.