Quote:
Originally Posted by JJ Joseph
Thanks, st_albert. This sounds useful. Is the "in-line TOC" simply another html (xml) file in the sequence of xml files that make up my book? I'm guessing that the links between the TOC and the chapters are name attributes or anchors? How do I "identify" this xml file in the <guide> section of the content.opf file (i.e. what is the syntax)?
|
Yes, you've got it. Suppose the content.opf file is in the /OEBPS directory, and the in-line TOC is in the file /OEBPS/Text/TOC.xhtml
Then the <guide> item would be
Code:
<reference href="Text/TOC.xhtml" title="Table Of Contents" type="toc" />
and the TOC.xhtml file just contains hyperlinks pointing to the start of the various chapters, or whatever you want in the table of contents. For example, a line in the TOC.xhtml might look like:
Code:
<div><a class="toc-item" href="../Text/Rendlesham07.xhtml">Chapter 3 New, Old Venues</a></div>
Note that in the above case, the chapter 3 starts at the beginning of the Rendlesham07.xhtml file. If you wanted to point to somewhere else in that same file (e.g. for subheadings, whatever) you would use the usual #anchor syntax, as in:
Code:
href="../Text/Rendlesham07.xhtml#sidebar"
like any hyperlink.