View Single Post
Old 03-11-2011, 05:10 PM   #5
chyron8472
Groupie
chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.chyron8472 ought to be getting tired of karma fortunes by now.
 
chyron8472's Avatar
 
Posts: 180
Karma: 558490
Join Date: Jan 2011
Device: Kindle 5, Amazon Fire 5th Gen, Moto Z Play Droid
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 View Post
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:
  1. Create a bookmark at the start of your inline TOC (could do that in Word before creating the EPUB version).
  2. 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>
  3. Save and reform the EPUB file.
  4. 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.
chyron8472 is offline   Reply With Quote