Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-28-2019, 07:33 PM   #1
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,552
Karma: 14325282
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?
hobnail is offline   Reply With Quote
Old 11-28-2019, 09:42 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,763
Karma: 54401244
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)
theducks is offline   Reply With Quote
Advert
Old 11-29-2019, 09:15 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,540
Karma: 193191846
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.
DiapDealer is online now   Reply With Quote
Old 11-29-2019, 10:31 AM   #4
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,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
Being away from any testing resources, I assume that Sigil's default NAV is not included in the OPF spine [...]
By default, the NAV document of epub3 books created with Sigil is included in the OPF spine. Sigil supports also epub3 books with NAV documents that are not included in the spine and will display the NAV as the second file in the Book Browser.
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?
Doitsu is offline   Reply With Quote
Old 11-29-2019, 11:07 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,540
Karma: 193191846
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.
DiapDealer is online now   Reply With Quote
Advert
Old 11-29-2019, 01:20 PM   #6
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,552
Karma: 14325282
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by Doitsu View Post
By default, the NAV document of epub3 books created with Sigil is included in the OPF spine. Sigil supports also epub3 books with NAV documents that are not included in the spine and will display the NAV as the second file in the Book Browser.
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?
1: Sigil 0.9.18, Windows 10.

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.
hobnail is offline   Reply With Quote
Old 11-29-2019, 05:04 PM   #7
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,552
Karma: 14325282
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:

Click image for larger version

Name:	Annotation 2019-11-29 135422.jpg
Views:	412
Size:	25.8 KB
ID:	175239

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
hobnail is offline   Reply With Quote
Old 11-29-2019, 05:07 PM   #8
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,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by hobnail View Post
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.
You definitely can use the NAV document as a TOC. (For a proof of concept, see this simple MR EPUB3 book.)
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.
Doitsu is offline   Reply With Quote
Old 11-29-2019, 06:38 PM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,606
Karma: 5433388
Join Date: Nov 2009
Device: many
Could it be linear="no" attribute on the nav in the spine.
KevinH is online now   Reply With Quote
Old 12-02-2019, 06:20 PM   #10
slightfever
Member
slightfever began at the beginning.
 
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.
slightfever is offline   Reply With Quote
Old 12-02-2019, 07:02 PM   #11
slightfever
Member
slightfever began at the beginning.
 
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.
slightfever is offline   Reply With Quote
Old 12-03-2019, 02:36 AM   #12
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,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by slightfever View Post
When nav.xhtml is used as a table of contents page, it cannot be decorated.
Of course, you cannot link to nav.xhml in a toc landmark entry, if it's not in the spine. However, if it is in the spine, you can link to it. As for linear=no I don't know of a single epub2 app that actually honors it, which is not at all surprising, because the epub2 specs don't strictly require apps to hide spine items with a linear=no attribute.
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.

Quote:
Originally Posted by slightfever View Post
So it is recommended to create another document table of contents and hide nav.xhtml.
I disagree. IMHO, an additional HTML TOC with the same TOC links as the NAV document would be redundant.
Doitsu is offline   Reply With Quote
Old 12-03-2019, 04:09 AM   #13
slightfever
Member
slightfever began at the beginning.
 
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:
Originally Posted by hobnail View Post
(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?
Spine cannot be rewritten by moving files with sigil's book browser.
When moving with the calibre book browser, it is automatically rewritten.
Does that mean that?
slightfever is offline   Reply With Quote
Old 12-03-2019, 06:31 AM   #14
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,540
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by slightfever View Post
Spine cannot be rewritten by moving files with sigil's book browser.
When moving with the calibre book browser, it is automatically rewritten.
Does that mean that?
It does seem to be what they were saying. It's absolutely untrue, however. Reordering files in both programs reorders the spine.
DiapDealer is online now   Reply With Quote
Old 05-06-2020, 01:54 PM   #15
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 416
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.
Rand Brittain is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 05:16 PM.


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