02-12-2024, 09:55 PM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: none
|
Trouble making navigation appear
Hello,
I am on the adventure of creating my first ebook. I think there is something wrong with the structure of my book but not sure what. Please see the attachment. I need to make a navigation file so that the TOC, landmarks and the page list appear in Apple Books, Kindle, Thorium and perhaps a few others. In Apple Books and Kindle Previewer the TOC appears in the navigation area but not the landmarks nor page list. In Thorium all is working fine. In my toc.nav I have the TOC, landmarks and the page list. In my toc.ncx only the TOC is present. Any ideas? Thanks, Tom |
02-12-2024, 10:22 PM | #2 |
Sigil Developer
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
|
There is no recognized file suffix ".nav"
Under epub2, the toc.ncx is used for toc and pagelists (though few epub2 readers support pagelists in the ncx). Under epub2 landmark (semantics) are stored in the opf guide. Under epub3 the nav is an xhtml document (typically named nav.xhtml or toc.xhtml) with a specified format. It stores the toc, landmarks, and pagelists. Some people add a toc.ncx and opf guide info to their epub3 to allow them to be read on older epub2 only e-readers. |
Advert | |
|
02-13-2024, 11:24 AM | #3 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: none
|
Thanks for the input. Changing the file name from toc.nav to nav.xhtml did not change anything. I'll need some detailed direction.
I am making an epub3 and have no intention of making it accessible to epub2 readers. Thanks, Tom |
02-13-2024, 11:29 AM | #4 |
Sigil Developer
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
|
I would have to see your nav xhtml file to make sure its links and landmarks are correct, and your opf file to check manifest links, guide, if any and spine to see if nav is set to linear="no" or not to be able to help.
One thing to try first is to use Sigil's epucheck plugin and run it on your epub and report back any errors. |
02-14-2024, 12:37 AM | #5 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: none
|
Hi Kevin,
Here are the files. The EpubCheck says the error is: Error: Expecting value: line 1 column 1 (char 0). Not sure how to interpret that. ******** Spoiler:
Last edited by theducks; 02-14-2024 at 10:14 AM. Reason: SPOILER LOG files |
Advert | |
|
02-14-2024, 11:01 AM | #6 |
Sigil Developer
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
|
Please provide the full epubcheck error message.
As for the nav it is included in the spine itself and therefore should appear in the epub as the last part. The pagelist has the "hidden" property, so even if the nav is shown as part of the book the pagelist will not be shown. Your nav and opf themselves look reasonable. Different reading systems handle pagelists in different ways. Other things: The first dc:language is German, so that should be the default language of every xhtml page unless a lang or xml:lang attribute exists on the html tag in those files. Your nav is written in English but no language attributes are provided. No empty lines or added space should exist before the xml header in your nav file. This may be the cause of the epubcheck error. The toc landmark in the nav should point to the nav itself or to a separate non-nav table of contents that is part of the spine, this is typically not the back cover. If you are not making an epub3 be backwards compatible with older epub2 only readers you should remove the entire toc.ncx as some readers will default to it if exists. Similar issues exist with having a guide in the opf if it is meant for epub3 only. Only add a toc.ncx and opf guide if you want to make the epub3 be backwards compatible with older epub2 only readers. Having the entire text body inside a single xhtml file is simply not an acceptable design unless there really are no chapters or section breaks. Last edited by KevinH; 02-14-2024 at 11:22 AM. |
02-14-2024, 11:03 AM | #7 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: none
|
Status: failed
Running EPUBCheck 5.1.0... please wait. Traceback (most recent call last): File "/Applications/Sigil.app/Contents/plugin_launchers/python/launcher.py", line 142, in launch self.exitcode = target_script.run(container) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/tomt/Library/Application Support/sigil-ebook/sigil/plugins/EpubCheck/plugin.py", line 506, in run parsed_json = json.loads(stdout) ^^^^^^^^^^^^^^^^^^ File "json/__init__.py", line 346, in loads File "json/decoder.py", line 337, in decode File "json/decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Error: Expecting value: line 1 column 1 (char 0) |
02-14-2024, 11:23 AM | #8 |
Sigil Developer
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
|
That means the epubcheck plugin is not running/working. You need to fix that first.
Have you installed the java sdk on your mac? Epubcheck requires java to run. I recommend getting the official Oracle version when using java on macOS. Last edited by KevinH; 02-14-2024 at 11:53 AM. |
02-14-2024, 02:15 PM | #9 |
Grand Sorcerer
Posts: 5,611
Karma: 23187563
Join Date: Dec 2010
Device: Kindle PW2
|
As KevinH has already mentioned, most likely Java isn't installed on your machine. However, it's also possible that the download of the EPUBCheck files failed.
Please go to the following folder: Code:
/Users/tomt/Library/Application Support/sigil-ebook/sigil/plugins/EpubCheck/ Code:
epubcheck.jar lib |
02-14-2024, 04:49 PM | #10 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: none
|
I installed Java and now I get useful information on errors, some of which I understand and can fix, others not:
|
02-14-2024, 04:58 PM | #11 |
Sigil Developer
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
|
In Sigil, double click on an error and Sigil should take you to the file and line with the error.
A fragment is the part of a url which may appear at the end that starts with # and the remainder of the string points to the id attribute value it should go to in that url. Some of your links have fragements but no where in the destination file is there an element with an id attribute value specified in the fragment. Once you fix all those, rerun epubcheck, then use Sigil to delete the toc.ncx file and retry. |
02-14-2024, 06:52 PM | #12 |
Junior Member
Posts: 9
Karma: 10
Join Date: Nov 2023
Device: none
|
Thanks Kevin and Doitsu,
I fixed all those errors and deleted the toc.ncx file. However, the same problem remains: The TOC, landmarks and page list appear in Thorium but the latter two are missing from Kindle Previewer and Apple Books. Tom |
02-14-2024, 07:09 PM | #13 |
Sigil Developer
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
|
Since the nav document's page-list has the attribute hidden, unless the reader itself chooses to build an interface to the pagelist, nothing will show. It seems Thorium handles that properly.
Did you check the ibooks app to see if it will automatically build an interface to a hidden page-list in the nav? I thought that you had to do something special inside ibooks app setting to tell it to use printed page numbers but that was a long time ago. You may have to create a standalone xhtml file with normal links to the pages for users of ibooks to see it if ibooks will not build the proper interface. Here is the only docs I could find: https://help.apple.com/itc/booksasse...for%20a%20book. Did you fix the multiple toc landmarks that do not point to the nav itself? Last edited by KevinH; 02-14-2024 at 07:19 PM. |
02-15-2024, 02:16 AM | #14 | |
Grand Sorcerer
Posts: 5,611
Karma: 23187563
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
In Apple Books, you'll need to enable the Print Edition option. Also have a look a my Gibran book with print edition page numbers. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble Making a Table of Contents? | KayLee | Calibre | 10 | 03-06-2016 03:07 PM |
Trouble making my own font set - help please. | bruck | Kindle Developer's Corner | 2 | 08-14-2011 11:41 AM |
Mac user having trouble making a decision - help! | bowiegirl1982 | Which one should I buy? | 19 | 07-23-2010 11:36 AM |
Navigation | cmbs | Feedback | 12 | 03-23-2008 11:39 AM |
Bible navigation? | jdavidse | Bookeen | 1 | 11-25-2007 09:53 PM |