View Single Post
Old 04-10-2012, 09:08 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sorry to be unclear. It's an either/or situation. If you have a separate html file for your TOC (and it's already listed in the Manifest and the Spine), all you need to do is add the one reference item to the guide section of the OPF:
Code:
<reference href="Text/your_file_name.xhtml" title="Table Of Contents" type="toc" />
You won't need to add any other code in that situation. The rest of the stuff I mentioned is only used if your TOC is NOT a completely separate html file in the ePub.

The Guide section usually appears after the Spine section, but I doubt if that's a requirement.
Code:
  .
  .
  .
  </spine>
  <guide>
    <reference href="Text/your_file_name.xhtml" title="Table Of Contents" type="toc" />
  </guide>
</package>
Also, rather than unzipping your epub and editing and then rezipping... you make want to consider using Sigil to do the final tweaking of your ePub before using Kindlegen/Calibre on it to build the MOBI. Sigil makes it pretty trivial to edit metadata, and mark a certain file as the TOC (which will create the proper OPF entries).

As to the actual content/formatting of the HTML ToC, you'd indicated that you already created it. But it's nothing more than a bunch of html links to different points in the ebook. Nothing special is really needed. If the links were working properly (with the exception of the "Go to ToC" functionality), then you've already done that part correctly.
DiapDealer is offline   Reply With Quote