View Single Post
Old 04-10-2012, 07:55 AM   #2
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,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
In order for the "Go to Table of Contents" functionality to work. There must be a reference item in the Guide section of the OPF file identifying the html ToC.

Code:
<guide>
  .
  .
  <reference href="Text/your_file_name.xhtml" title="Table Of Contents" type="toc" />
  .
  .
</guide>
The dots only indicate that there may be other reference tags before or after the one for the TOC.

Make sure the "href" attribute actually points to your html toc (correct file name/location). If your ToC is a single stand-alone html file, that's all you need to do. But if it's just a section of another HTML file, you'll have to identify it with an anchor (or any tag with an "id" attribute actually) and include that url fragment in the <reference /> tag's href attribute. In the HTML file:
Code:
<a id="toc"></a>
and in the OPF file:
Code:
<reference href="Text/your_file_name.xhtml#toc" title="Table Of Contents" type="toc" />
DiapDealer is offline   Reply With Quote