I can create a clickable TOC for my chapter headings in the Windows version of Scrivener. But what I want is to be able to include the sub headings in the clickable TOC for Kindle. I have tried numerous options to no avail. Can it be done? If so, how? All help greatly appreciated!
First, there is a much better SE for this kind of question: https://ebooks.stackexchange.com/
This question needs to be unpacked. First, how can an epub file have two levels in the TOC?
Second, how can a Kindle file (which is loosely based on the epub standard and uses a tool to convert files from epub format) render this TOC as intended.
Here are some places to get you started:
https://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf You could also try the KDP forums on amazon.com https://kdp.amazon.com/community/forum.jspa?forumID=13
Paul Salvette's formatting guide (The eBook Design and Development Guide) would probably have the answer to this:
Matt Garrish's book EPUB 3 Best Practices definitely has an answer, but I remember it was extremely complicated. Oreilly ebooks all use these scripts to have have these expandable/collapsible TOC functionality which use scripting to hide and reveal entries.
Getting a two level TOC is not impossible to do, but you have to test it on various devices to make it work (keeping in mind that some displays are smaller or have less support for the standard).
Dumber solutions might work too. For example, at the top of each chapter you could put TOCs for just that chapter.
Keep in mind that human readers can't process more than 10-15 entries in a TOC very easily. (The oreilly books use about 100-150 entries, but they use expandable/collapsible menus).