Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-02-2019, 04:39 AM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Can nav be a TOC?

I was working on an epub3 file.
(I know my way around epub2, but 3 I'm still stumbling.)

There wasn't a HTML contents page, and the NAV file looked OK in Sigil, so I thought I could use that.

But if I add the semantic tag "Table of contents" in Sigil, I get an error in ePubCheck:

ERROR(RSC-011): Found a reference to a resource that is not a spine item.


And when I used Calibre to view the file, the NAV file was not displayed.

I used Kindlegen to make AZW3, and it gave this error:
Warning(prcgen):W14001: Hyperlink not resolved: \OEBPS\Text\toc.xhtml
Warning(prcgen):W14002: Some hyperlinks could not be resolved.


That is certainly the location of the NAV file, as I confirmedd by opening the epub as a zip file.

However, it isn't listed in the OPF manifest section.

I gave up and copied the NAV and tagged the copy as TOC, that worked.

Can the NAV file be used as a visible Contents file or is it only an invisible system file?

Last edited by AlanHK; 09-02-2019 at 06:18 AM.
AlanHK is offline   Reply With Quote
Old 09-02-2019, 09:00 AM   #2
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,062
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
An EPUB 3 navigation document is to allowed to be part of the spine of the book. From the EPUB 3 spec:

Quote:
Note that the navigation document is not exclusively for machine processing. Formulating the document as an XHTML Content Document enables its reuse in the linear reading order of an EPUB Publication, avoiding the creation of additional tables of contents (i.e., it can also be added to the spine [Publications301] ).
I suspect the problem has to do with Sigil or your use of it.
jhowell is online now   Reply With Quote
Advert
Old 09-02-2019, 10:32 AM   #3
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by jhowell View Post
An EPUB 3 navigation document is to allowed to be part of the spine of the book.
In many commercial epub3 fiction books, the navigation document is indeed also the TOC.

However, since epub3 landmarks can only refer to spine items, it's not possible to link a TOC landmarks item to a navigation document that is not in the spine.

To test this, create a blank epub3 book with Sigil, manually delete

Code:
<itemref idref="nav.xhtml" linear="no"/>
from the spine and then run EPUBCheck.

This will trigger the following error message:

Code:
ERROR(RSC-011) nav.xhtml: Found a reference to a resource that is not a spine item.
Doitsu is offline   Reply With Quote
Old 09-02-2019, 11:28 PM   #4
AliceWonder
Connoisseur
AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.
 
Posts: 97
Karma: 200000
Join Date: Aug 2019
Device: none
This is why my nav.xhtml has two ToC - one that uses the 'nav' element with 'epub:type="toc"' - it has everything in spine order but has CSS property of display:none;

Then I have several (though one is enough for most use cases) 'section role="navigation"' where I have table of contents intended for the end user to see, and I don't have to worry about the ePub3 rules of them being in the spine order or what not.

Have to use 'section role="navigation"' rather than 'nav' because ePub3 expect all 'nav' nodes to specify an 'epub:type'

This gives me the visual ToC that I want for users while at same time providing a spine order ToC for eBook software to parse.

Works in every reader I tested (limited to calibre and android)
AliceWonder is offline   Reply With Quote
Old 02-25-2020, 02:41 PM   #5
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,586
Karma: 14328510
Join Date: Nov 2019
Device: none
I always use the nav.xhtml file for the TOC the user sees when they page through the book. Simply open the epub in Calibre's editor and drag it to the top of the list of files (or more likely after the cover page). Doing this in Sigil (0.9.18 is what I'm using) does not work; it stays at the end of the book in the ereader.
hobnail is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
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
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 08:44 PM.


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