View Single Post
Old 10-25-2024, 04:31 AM   #449
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 270
Karma: 516
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:
KevinH 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
A very interesting exchange where I came upon a couple of notions that I am not familiar with : foreign resource, fallback. I take it that a foreign resource is one not contained within the epub. Is that correct? And fallback is a last resort when the reading device is unable to cope?

Quote:
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.
In my problem epub3 doc, the nav.xhtml file does not have an internal link to its toc in its landmarks section although I see that a new blank epub3 file generated by Sigil does. Instead, my nav.xhtml landmarks produced by the conversion plugin essentially just reproduces the guide section from the content.opf:

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>
With the "toc" link going to my HTML toc.

Quote:
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.
To do this, replacing the author HTML toc, would, in my case involve serious editing effort to add loads of anchors to the entries because all my chapters have links back to the HTML toc.

Quote:
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.
I've seen this implemented at the end of the Sigil guide's HTML toc. It looks like a tidy solution but I'm in no hurry so I'll wait and see whether and how the subject evolves.
philja is offline   Reply With Quote