Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 03-30-2020, 08:48 PM   #1
nindotza
Member
nindotza began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Mar 2020
Device: Moon+ Reader
nav.xhtml error shown in file browser for toc

In Calibre 4.13 I am having problems linking up the table of contents page and seeing an error with a file generated by calibre. When I run the check book function there are no errors. However, at the bottom of the File Browser in the left side bar under Miscellaneous. 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. When I hover over that it says

This file contains the metadata table of contents. This file is a text file not referenced in spine.

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>

<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?
nindotza is offline   Reply With Quote
Old 03-31-2020, 12:18 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes you should.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-01-2020, 06:57 AM   #3
thiago.eec
Guru
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: 927
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
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
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
using nav.xhtml for TOC hobnail Sigil 40 11-12-2021 02:00 PM
Link to nav.xhtml in TOC cges30901 Sigil 11 01-22-2020 12:01 PM
TOC nav.xhtml issue ebookscovers Conversion 1 05-06-2017 11:12 AM
ToC help needed: nav.xhtml Phssthpok Editor 10 04-14-2017 04:58 AM
Error with Calibre Toc.xhtml file wDr Calibre 1 01-03-2015 06:13 PM


All times are GMT -4. The time now is 10:46 AM.


MobileRead.com is a privately owned, operated and funded community.