![]() |
#1 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 14328510
Join Date: Nov 2019
Device: none
|
using nav.xhtml for TOC
(I don't know if it's different with epub 2 since I'm only making epub 3 books.) I create a book with Sigil and when it's finished I generate the table of contents. In the Book Browser I move the nav.xhtml file to the top, just after the book's cover. When I open the book in an e-reader the nav.xhtml is still at the end of the book. If I instead open the book in the Calibre editor and drag the nav.xhtml file to the top in its File Browser and then open the book in an e-reader the nav.xhtml is at the front of the book.
Is there a reason Sigil forces it to stay at the end of the book? |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,884
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
No reason,
because it doesn't force you to. In fact Sigil puts the HTML TOC at the front (If you use the tool that makes one from the NCX) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Being away from any testing resources, I assume that Sigil's default NAV is not included in the OPF spine (hence why moving it in Book Browser has no effect in your reading app) and calibre DOES include the NAV in the spine. Both approaches are equally correct. I've just never been a real fan of combining the logical NAV document with a visible html toc, myself. but you're certainly permitted to do so within the EPUB specs, so I don't think Sigil will stop you from manually adding the NAV to the spine if you so choose (again: I cannot test that right now. Someone else may need to fact-check me). It just doesn't automatically do it for you.
|
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
If the users changes the position of the NAV document in the Book Browser, it'll be automatically added to the spine. @hobnail 1. What's your Sigil version and your operating system? 2. Did you also generate a secondary TOC via Create HTML Table Of Contents? |
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Thanks for the clarification. I would have thought we would have made allowances for the NAV in the spine (otherwise there's no reason for it to be movable). I was basing my guesses off of the symptoms alone. But like you mentioned, I think there may be some confusion between the NAV and secondary html tocs going on here.
Perhaps the OP's epub doesn't include the NAV in the spine, and the secondary Toc that calibre may have created is what's appearing at the end of the book. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 14328510
Join Date: Nov 2019
Device: none
|
Quote:
2: No, I didn't know about that. I was clicking the Generate Table of Contents button, between the Metadata Editor and Spellcheck buttons. If I use Create HTML Table Of Contents then in the e-reader that one is in the right place but the nav.xhtml is displayed after the last chapter so then I have two displayed TOCs. If I only move the nav.xhtml file up in Calibre's editor that gives me one TOC that's functionally appears to be the same as the one created by Create HTML Table Of Contents while also providing a TOC that the e-reader displays when you click on its TOC button. Having two TOCs isn't a big problem but I'm wondering why being able to use the nav.xhtml as the displayed TOC (by moving it in Calibre's editor) would be a problem. |
|
![]() |
![]() |
![]() |
#7 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,581
Karma: 14328510
Join Date: Nov 2019
Device: none
|
In Sigil the nav.xhtml is only movable in the Book Browser but that doesn't change where it's displayed when you look at the book in an e-reader; it's still at the end of the book. There is no secondary TOC. Here's what Calibre Editor's File Browser looks like after dragging the nav.xhtml to the top:
I'm also wondering why a secondary TOC is needed since the nav.xhtml file functions as one, after it's moved to the top in Calibre. The epub 3.2 spec says "But the EPUB Navigation Document is not exclusively for machine processing. Because it is an XHTML Content Document, it can be part of the linear reading order, avoiding the need for duplicate tables of contents. Content which is only destined for machine processing, such as page lists, can be hidden from visual rendering with the hidden attribute." https://www.w3.org/publishing/epub3/epub-packages.html |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Maybe your e-reader always displays the NAV document at the end of a book? To test this open the EPUB3 book that I've linked to with Sigil, move the NAV document after the cover, save the book and open it with your e-reader. If it displays the NAV document at the end of the book, it's the e-reader that causes this problem. |
|
![]() |
![]() |
![]() |
#9 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
Could it be linear="no" attribute on the nav in the spine.
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2019
Location: Japan
Device: iPad
|
eReader displays in the order described in OPF's spine.
Is nav.xhtml at the bottom? When nav.xhtml is used as a document table of contents, please arrange in order by spine. If you have another document table of contents and you do not want to display nav.xhtml, you do not have to write it in spine. Even if linear = "no", it will not be displayed. However, linear = "no" is used for auxiliary display sheets such as popups. |
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2019
Location: Japan
Device: iPad
|
When nav.xhtml is used as a table of contents page, it cannot be decorated.
So it is recommended to create another document table of contents and hide nav.xhtml. |
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
If you're interested in creating epub2-compatible epubs for Amazon KDP, you can take advantage of this fact and move the nav document after the cover and add a linear=no attribute and toc landmark/guide items. Since all major epub3 apps honor linear=no, the nav document will only be shown as an HTML TOC in epub2 books. I disagree. IMHO, an additional HTML TOC with the same TOC links as the NAV document would be redundant. |
|
![]() |
![]() |
![]() |
#13 | |
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2019
Location: Japan
Device: iPad
|
I haven't created it with epub2, so I don't know its specifications.
Adjustments are required to use both epub2 and epub3. However, the table of contents page may have italics, bold, and other text decorations. If we want to reproduce it, we need to prepare it separately. I will return to the question. Quote:
When moving with the calibre book browser, it is automatically rewritten. Does that mean that? ![]() |
|
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It does seem to be what they were saying. It's absolutely untrue, however. Reordering files in both programs reorders the spine.
|
![]() |
![]() |
![]() |
#15 |
Bookmaker
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 427
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
I've been working with some files in Sigil and Calibre, and it seems like Sigil now automatically puts the nav.xhtml in the spine, and at the very beginning of the book. Is this a new behavior? Is it intended? And where is it best practices to put the nav.xhtml in an EPUB3 file, because I'm pretty sure I don't want it at the very beginning.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
nav.xhtml and search & replace | lumpynose | Sigil | 3 | 06-10-2019 03:55 PM |
Doubt about nav.xhtml and editor | Terisa de morgan | Editor | 5 | 08-12-2018 11:51 AM |
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 |