I have an established tool chain for building my ebooks up into large series ebooks, which all related books in a single file. I am moving this from the 0.5 tools to ebook-convert in 0.6, and cannot get the TOC behaviour that I want.
A simple TOC file is generated, looking like this:
Code:
<html><head>
<title>Series Title</title>
<meta name="author" content="Author" />
</head><body>
<em>Series Title</em><br/>
<em>Author</em><br/><br/>
<a href="01 xxx.html">01 xxx</a><br/>
<a href="02 yyy.html">02 yyy</a><br/>
</body></html>
With the 0.5 tools, this would generate a TOC in the output with entries called 01 xxx and 02 yyy, which led to the beginning of each book, exactly what I wanted.
I cannot reproduce this with ebook-convert. By default it seems to be using the title element from 01 xxx.html and 02 yyy.html for the TOC entry, regardless of the text I have specified in the link.
If I markup the <a with a suitable class, and force that class to be recognised as a chapter, I get the TOC entries I want, but the entries point to the link, not the actual book.
If I instead use --max-levels=1 --no-chapters-in-toc to have entries added based on links rather than chapters, I get the entries I want, but I also get entries based on links in 01 xxx and 02 yyy, even though I have specified --max-levels=1. If I specify --max-levels=0 I get tantalisingly close to what I want. The TOC is correct, all the files are includes in the epub, but they are not processed and cannot be accessed. (ticket 3376).
If I use --max-levels=1 and specify --max-toc-links=2 to get just the first two links, that does not work, I get all links (ticket 3375).
Can anyone suggest what combination of options I can use to get the same output as prior to 0.6?