View Single Post
Old 04-01-2020, 06:57 AM   #3
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,220
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by nindotza View Post
I see a file that Calibre created "nav.xhtml" perhaps that got created while I made a TOC and generated a TOC using the function insert inline table of contents. There is an icon displayed there of a human person slipping, like a sign for "Slippery when Wet", it is orange color.
Is this a EPUB 3 file? If that's the case, your MUST have an XHTML TOC (your nav.xhtml file). You can still have the NCX TOC, for backwards compatibility.

No worries about the slipping guy yet. Keep reading.

Quote:
Originally Posted by nindotza View Post
Is the "spine" in the metadata.opf file? The node for manifest shows as:
<manifest>
...
<item href="toc.ncx" id="toc" media-type="application/x-dtbncx+xml"/>
<item href="toc.xhtml" id="id67" media-type="application/xhtml+xml"/>
</manifest>

On the code above, you have a "toc.xhtml" file with an id "id67". Did you renamed the "nav.xhtml" to that? Also, in a EPUB 3 book, the XHTML TOC should be marked like this:
Code:
<item href="toc.xhtml" id="id67" media-type="application/xhtml+xml" properties="nav"/>
Quote:
Originally Posted by nindotza View Post
<spine toc="toc">
<itemref idref="titlepage"/>
<itemref idref="id64"/>
<itemref idref="id65"/>
<itemref idref="id67"/>
<itemref idref="id66"/>
<itemref idref="id62"/>
<itemref idref="id63"/>
...

So, should I add <itemref idref="toc"/> to the spine node?
According to your example, absolutely NOT. The file with id "toc" is your NCX TOC, and this one should not be in the spine. Actually, your NCX file is referenced right on the spine tag: <spine toc="toc">.

Now, about the nav.xhtml. This file has a double purpose: it is a machine readable file, so your reader uses it to display the TOC; also, it is a text file, and can be used normally inside your book.

So, if you want your TOC to be presented on the normal text flow, like a page on your book, you have to add it to the spine. But, you DON'T NEED to. This file can be left out of the spine, if it will be used only as the TOC file (showing the TOC when you active this tool on your reader). Calibre will show you that slipping guy warning. But that's just an alert, and you can ignore it.
thiago.eec is offline   Reply With Quote