How to generate functional TOC in ePub 3?

When I compile a book to ePub 2, Scrivener automatically builds the TOC. Everything works fine.

When I compile the same book to ePub 3, Scrivener builds the TOC with extraneous text. And the TOC itself is non-functional (non-clickable within the ebook reader). I admit I don’t fully understand the ePub 3 protocol, but would appreciate some help in getting the TOC to come out correctly.

Attached is my test file. Thank you.


Test.scriv.zip (121 KB)

You’re not doing anything wrong here - this is a bug. Internally, to generate the HTML5 necessary for ePub 3, Scrivener goes through a complex process of converting the rich text to MultiMarkdown and then the MultiMarkdown to HTML5 (this produces very nice and clean HTML5). In this case, the hash character you have before the chapter number is breaking MultiMarkdown’s ability to generate an HTML link, so you end up seeing the raw MultiMarkdown code (the square brackets and parentheses) - something you should never see, of course.

I have fixed this for the next update. In the meantime, you can work around it by removing the hash character from the start of your chapter names if that is acceptable.

All the best,
Keith

Thank you Keith. I look forward to the fix in the next release. And to dark mode!