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 12-01-2016, 04:24 AM   #1
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
ToC help needed: nav.xhtml

I am trying to add a ToC to a book, but when I do I get two files: toc.ncx and nav.xhtml, both of which are marked with a ToC icon, and a warning that nav.xhtml isn't referenced. Annoyingly, nav.xhtml shows up as the last page of the book when I look at it in a reader.

The OPF file contains this:
Code:
    ...
    <item href="toc.ncx" id="toc" media-type="application/x-dtbncx+xml"/>
    <item href="nav.xhtml" id="nav" media-type="application/xhtml+xml" properties="nav"/>
  </manifest>
  <spine toc="toc">
    ...
I tried moving the properties="nav" attribute to the entry for toc.ncx, and then I get an error: "missing ToC in navigation document". I've looked at other books and can't see what the problem is... they just have toc.ncx marked as the ToC with properties="nav", and the id referenced as the toc in the <spine> tag.

Can anyone tell me what is going on here, why the nav.xhtml is created, and how I can get rid of it?
Phssthpok is offline   Reply With Quote
Old 12-01-2016, 04:25 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,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
nav.xhtml is needed for EPUB 3 books. You dont want it change your book back to EPUB 2.
kovidgoyal is offline   Reply With Quote
Old 12-01-2016, 04:33 AM   #3
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by kovidgoyal View Post
nav.xhtml is needed for EPUB 3 books. You dont want it change your book back to EPUB 2.
Thanks; changing version="3.0" to version="2.0" in the <package> tag fixed it.

Am I the only one who thinks that EPUB 3 is the work of the Devil?
Phssthpok is offline   Reply With Quote
Old 12-01-2016, 04:37 AM   #4
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,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I am certainly no fan of EPUB 3.
kovidgoyal is offline   Reply With Quote
Old 12-01-2016, 06:38 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
ePub 3 is a mistake. What ePub 3 should have been is ePub 2+ meaning don;t change things that don't need to be changed and make the changes logical. Also, do away with audio and video. They don't need to exist in eBooks.
JSWolf is offline   Reply With Quote
Old 12-02-2016, 09:54 PM   #6
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: 928
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by Phssthpok View Post
Thanks; changing version="3.0" to version="2.0" in the <package> tag fixed it.

Am I the only one who thinks that EPUB 3 is the work of the Devil?

Lol....

The nav.xhtml is a required file for epub3 books, as Kovid Goyal explained. But it was not necessary to change the version on the package, as now your book probably won't pass epubcheck.

If you don't want the nav.xhtml appearing in the book, just leave it out of the spine. Forget about the warning saying it is not referenced. It just calls your attention to the fact that there is an xhtml file being left out of the spine.
thiago.eec is offline   Reply With Quote
Old 12-10-2016, 06:10 AM   #7
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by thiago.eec View Post
Lol....

The nav.xhtml is a required file for epub3 books, as Kovid Goyal explained. But it was not necessary to change the version on the package, as now your book probably won't pass epubcheck.

If you don't want the nav.xhtml appearing in the book, just leave it out of the spine. Forget about the warning saying it is not referenced. It just calls your attention to the fact that there is an xhtml file being left out of the spine.
Problem is that it still seems to show up as the last page when I look at the book in a reader, which is really annoying. And why should it not pass epubcheck if it's a valid EPUB 2?
Phssthpok is offline   Reply With Quote
Old 12-10-2016, 06:50 AM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
If you are creating an ePub 2 eBook, you do not need a nav file. You don't even need an HTML ToC. All you need is the NCX.
JSWolf is offline   Reply With Quote
Old 04-09-2017, 12:00 PM   #9
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: 928
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by Phssthpok View Post
Problem is that it still seems to show up as the last page when I look at the book in a reader, which is really annoying. And why should it not pass epubcheck if it's a valid EPUB 2?

The toc.xhtml shows up even if it is not on the spine? I'm not talking about marking it as "non-linear". I've never seen that happen. What reader do you use?

As for being a valid EPUB2, I was led to believe that you had a EPUB3 file and just changed the version from "3.0" to "2.0". If you just did that, the epub wouldn't be a valid EPUB2, since there are other diferences between the formats.

Last edited by thiago.eec; 04-09-2017 at 12:13 PM.
thiago.eec is offline   Reply With Quote
Old 04-09-2017, 05:18 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by thiago.eec View Post
The toc.xhtml shows up even if it is not on the spine? I'm not talking about marking it as "non-linear". I've never seen that happen. What reader do you use?

As for being a valid EPUB2, I was led to believe that you had a EPUB3 file and just changed the version from "3.0" to "2.0". If you just did that, the epub wouldn't be a valid EPUB2, since there are other diferences between the formats.
Verify the ePub with Calibre's error checker and fix whatever is said to be wrong. Once that's done, check the ePub with epubcheck and once both say the ePub is OK, then it's structurally OK.
JSWolf is offline   Reply With Quote
Old 04-14-2017, 04:58 AM   #11
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: 928
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by JSWolf View Post
Verify the ePub with Calibre's error checker and fix whatever is said to be wrong. Once that's done, check the ePub with epubcheck and once both say the ePub is OK, then it's structurally OK.
Well, what you are suggesting is to change it back to the epub2 format. Then, why not just create an epub2, from the beginning?
thiago.eec is offline   Reply With Quote
Reply

Tags
toc error


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EPUBTEST 0150 - EPUB Navigation Document Tests: toc nav not supported quiris Marvin 3 07-06-2016 02:11 PM
Ibooks epub 3 error : exactly one 'toc' nav element must be present Firebrand007 ePub 6 01-02-2015 10:00 PM
TOC xhtml giosa Sigil 3 01-17-2012 09:12 PM
Bug Report: Mobi Conversion puts TOC Nav in wrong spot therealjoeblow Conversion 4 12-02-2011 09:56 AM


All times are GMT -4. The time now is 11:35 PM.


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