Thanks for the link.
What I ended up doing was using calibre to convert epub -> mobi -> epub (I backed up my original copy in case this ruined things). This made Calibre create an inline TOC at the end of the ebook which I then, in Sigil, moved to the front of the book (in place of the original TOC), edited it to my liking, told Sigil it was the TOC, and converted back to mobi again.
However, given Ldolse's link, I will have to try this next time:
Quote:
Originally Posted by DMSmillie
I don't know of any way to do what you want, medwatt, without doing some manual editing of the XML/XHTML files used to create the EPUB and MOBI files. I was hoping someone might come up with a suggestion that didn't involve that, but it looks like it isn't currently possible.
One possible route might be:
- Create a bookmark at the start of your inline TOC (could do that in Word before creating the EPUB version).
- Use Calibre's "tweak epub" facility to open up the EPUB and edit the OPF file (using a plain text editor), and add a Guide item of type "toc" to point to that bookmark. E.g.:
Code:
<guide>
<reference type="toc" title="Table of Contents" href="filename.html#bookmark"/>
</guide>
- Save and reform the EPUB file.
- Convert to MOBI format.
I haven't tested this, so I don't know what issues it might throw up, but it might be worth trying.
|