01-19-2023, 10:46 PM | #436 | |
Guru
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
I didn't insert nbsp in the pre sections deliberately, but I do a global conversion of ellipses to spaced periods, so that must have created it. nbsp is not "preserved" in Sigil settings. New version, works, thanks. Last edited by AlanHK; 01-20-2023 at 01:03 AM. |
|
10-24-2024, 04:21 PM | #437 | |
Groupie
Posts: 188
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
After using ePub3-itizer to convert a 'no-fault-found' epub2 book to epub3, I've eliminated all the pink Validation Results (mostly involving image width being defined as %) except this one:
Code:
OEBPS/content.opf,127,9919,"Col: 92: ERROR(OPF-096): Non-linear content must be reachable, but found no hyperlink to "OEBPS/nav.xhtml"." I've seen KevinH's note in post #17 of this thread stating Quote:
I understand that nav.xhtml is required by the spec, but for reading purposes, none of the content files need to link to it—that sort of communication is satisfied for the human reader by the existing HTML table of contents file (chapter3.xhtml in the book), which has links back from chapter headings. I note, too, that for Kindles, I can simply remove nav.xhtml from the spine to avoid it being displayed as a duplicate of the HTML toc. If I understand correctly, the reading device will use and display nav.xhtml if it operates at the epub3 level. Otherwise, epub2 devices will use the everpresent toc.ncx file. So, do I understand that epub3-itizer has created the nav.xhtml file as an orphan? Which files should link to it? What is the best solution to avoid this error message? |
|
Advert | |
|
10-24-2024, 04:40 PM | #438 |
Grand Sorcerer
Posts: 28,098
Karma: 201052868
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Not sure. That might be the reference, but that spine entry itself won't produce an epubcheck error like that. An empty epub3 created by Sigil contains that same spine entry and does not trigger that particular EpubCheck error. It might be something else. What does the line number in the opf error correspond to?
Last edited by DiapDealer; 10-24-2024 at 04:47 PM. |
10-24-2024, 05:07 PM | #439 | |
Groupie
Posts: 188
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
Code:
<item id="navid" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/> Edit: I've been trying a few things and if I change the last line in the spine from <itemref idref="navid" linear="no"/> to <itemref idref="navid" linear="yes"/> and then run epubcheck again, there is the good news 'No problems found!' This is repeatable when linear is no, there's the problem, yes gets rid of it. I've gone backwards and forwards several times. Further: IIRC KevinH said somewhere that an empty entry is taken as 'yes' by default so I tried <itemref idref="navid"/> and again 'No problems found!' |
|
10-24-2024, 05:17 PM | #440 |
Bibliophagist
Posts: 41,704
Karma: 161499392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For what it's worth, I've attached a dummy epub which shows the error when linear="no" is used in the spine entry for the nav.xhtml file. Removing the linear="no" or changing to linear="yes" does not display the error. I also played with changing the ID and that did not help. Removing the line from the spine entries also worked.
I did find that adding the following to the nav.xhtml file cleared the error: Code:
<nav epub:type="landmarks"><h2>Guide</h2> <ol> <li><a epub:type="toc" href="nav.xhtml"> Table of Contents </a></li> </ol></nav> Last edited by DNSB; 10-24-2024 at 05:29 PM. Reason: Added comment about patch and patched ePub |
Advert | |
|
10-24-2024, 05:24 PM | #441 | |
Groupie
Posts: 188
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
|
|
10-24-2024, 05:27 PM | #442 |
Bibliophagist
Posts: 41,704
Karma: 161499392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I think that error message was added to the 5+ versions of epubcheck. See #1451 in the epubcheck issues for more information.
Previously while the ePub spec required that link, epubcheck did not check for that condition. |
10-24-2024, 05:40 PM | #443 | ||
Groupie
Posts: 188
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
Quote:
This seems to have been a problem since around March 2023 with people complaining about the same error message about a cover page. Last edited by philja; 10-24-2024 at 05:47 PM. |
||
10-24-2024, 06:18 PM | #444 | |
Bibliophagist
Posts: 41,704
Karma: 161499392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
I did a test when I was playing with the test file by adding a cover file and image and marking the cover file as linear="no" and got the same error message except for the file name. March, 2023 would make sense in terms of epubcheck 5.0 being commonly used. |
|
10-24-2024, 06:30 PM | #445 |
Sigil Developer
Posts: 8,262
Karma: 5568412
Join Date: Nov 2009
Device: many
|
This is a bug in epubcheck as far as I can tell. I exchanged comments with them as well.
See my post here and their replies. https://github.com/w3c/epub-specs/is...ent-1496140289 The issue is that epubcheck now wants *all* xhtml linear="no" in the spine to have a direct link to that file from some other resource in the spine. This was seemingly done to prevent unseeable spine content in all epub readers. That requirement is fine for normal xhtml files but NOT the nav document itself. Any epub3 e-reader can always access the nav itself, so it should be exempt from this new requirement by epubcheck. There are only 3 workarounds: 1. remove the nav completely from the spine, and edit the nav code to remove its own internal link to its toc in its landmarks section as only files listed in the spine can be linked to, due to epubcheck. But removing it from the spine means no easy drag and drop reordering in Sigil. 2. create the css necessary and link it to the nav so that the nav appears just like a desired xhtml toc in appearance and remove the linear="no" associated with the nav so that the nav itself functions like a directly linked user xhtml toc file (ie it plays 2 roles - both machinereadable nav and user toc). But not everyone wants a user xhtml toc. 3. leave it as is, but create a link to the nav.xhtml from some other file such as a user toc.xhtml. This is the solution I use until epubcheck gets fixed. None of these workarounds are ideal. The bug that requires a link to the nav.xhtml from some other spine resource just because it has linear="no" in the spine should really be fixed in epubcheck. Sigil and epub3-itizer use linear="no" on the nav entry in the spine as that used to be the documented best practice for epub3 during 3.0, 3.1, and 3.2 specs, and earlier epubcheck versions. I am still hoping someone from epubcheck will come to their senses and exempt a properly specified nav from having to meet this new additional requirement. Last edited by KevinH; 10-24-2024 at 08:06 PM. |
10-24-2024, 08:36 PM | #446 |
Grand Sorcerer
Posts: 28,098
Karma: 201052868
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Sigil's blank ePub3 (with linear="no" in the spine) doesn't produce this error with the latest epubcheck. Does our default epub link directly to the nav somewhere?
|
10-24-2024, 10:09 PM | #447 |
Sigil Developer
Posts: 8,262
Karma: 5568412
Join Date: Nov 2009
Device: many
|
Not that I know of. But in our Sigil User Guide, I had to add a link from the xhtml user toc to the nav to get it to pass epubcheck.
|
10-25-2024, 02:34 AM | #448 | |
Bibliophagist
Posts: 41,704
Karma: 161499392
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
That's where I lifted the bit of code I added to the sample file to fix the error. |
|
10-25-2024, 05:31 AM | #449 | ||||
Groupie
Posts: 188
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
My little error has opened up visibility of a large existing can of worms, I see. All very interesting.
Quote:
Quote:
Code:
<guide> <reference type="title-page" title="Title page" href="Text/chapter.xhtml"/> <reference type="text" title="Text" href="Text/chapter2.xhtml"/> <reference type="toc" title="Table of Contents" href="Text/chapter3.xhtml"/> <reference type="cover" title="Cover" href="Text/titlepage.xhtml"/> </guide> Code:
<nav epub:type="landmarks" id="landmarks" hidden=""> <h2>Guide</h2> <ol> <li> <a epub:type="titlepage" href="Text/chapter.xhtml">Title page</a> </li> <li> <a epub:type="bodymatter" href="Text/chapter2.xhtml">Text</a> </li> <li> <a epub:type="toc" href="Text/chapter3.xhtml">Table of Contents</a> </li> <li> <a epub:type="cover" href="Text/titlepage.xhtml">Cover</a> </li> </ol> </nav> Quote:
Quote:
|
||||
10-25-2024, 11:49 AM | #450 |
Sigil Developer
Posts: 8,262
Karma: 5568412
Join Date: Nov 2009
Device: many
|
To test DNSB's theory that even an internal link from a non-linear resource (the nav) back to itself is enough to fool the epubcheck test (why a link from a non-linear resource to itself would make any difference is beyond me).
I changed the Sigil User's Guide nav landmarks section to to add an internal back link (see the last li I added below): Code:
<nav epub:type="landmarks" id="landmarks" hidden=""> <h1>Landmarks</h1> <ol> <li> <a epub:type="cover" href="Text/cover.xhtml">Cover</a> </li> <li> <a epub:type="bodymatter" href="Text/introduction.xhtml">Text</a> </li> <li> <a epub:type="toc" href="Text/toc.xhtml">Table of Contents</a> </li> <li> <a epub:type="toc" href="#toc">Nav Table Of Contents</a> </li> </ol> </nav> So DNSB's theory is right! We can prevent the whole epubcheck bug from hitting by just adding an internal link from the nav landmarks back to the nav table of contents and that fools the code into thinking that all non-linear resources are reachable from some linear resource. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Conversion Output] KePub Output Plugin | jgoguen | Plugins | 584 | 01-05-2025 12:12 AM |
Create a javascript quizz for Epub3 in Sigil | BertrandThibaut | Sigil | 3 | 01-26-2014 10:04 AM |
An epub3 version of Sigil ? | apulia03 | Sigil | 9 | 11-28-2012 02:07 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 03:24 AM |
epub3 Sigil Poetry(fixed layout) | Giggleton | Sigil | 7 | 04-04-2011 01:58 PM |