Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All <nav epub:type="…"> elements in EPUB navigation doc should be shown in TOC box #1270

Closed
MurakamiShinyu opened this issue Feb 11, 2024 · 1 comment · Fixed by #1271
Closed
Labels

Comments

@MurakamiShinyu
Copy link
Member

A sample EPUB:
https://github.com/IDPF/epub3-samples/tree/main/30/indexing-for-eds-and-auths-3f

There are 4 <nav epub:type="…"> elements in this EPUB's navigation document:
https://github.com/IDPF/epub3-samples/blob/main/30/indexing-for-eds-and-auths-3f/EPUB/nav.xhtml

<nav epub:type="toc">
  <h2>Contents</h2></nav>
<nav epub:type="landmarks">
  <h2>Landmarks</h2></nav>
<nav epub:type="index-term-categories" hidden="">
  <h1>Index Term Categories</h1></nav>
<nav epub:type="page-list" hidden="">
  <h2>Page Navigation</h2></nav>

Test with Vivliostyle Viewer v2.27.0:
https://vivliostyle.github.io/viewer/v2.27.0/#src=https://github.com/IDPF/epub3-samples/tree/main/30/indexing-for-eds-and-auths-3f

Screenshot:
Screenshot 2024-02-11 15 03 21

The "Contents", "Landmarks", and "Page Navigation" are shown but the "Index Term Categories" is not.

These all <nav epub:type="…"> elements should be shown in the TOC box. The EPUB spec says:

EPUB navigation documents MAY contain one or more nav elements in addition to the toc, page-list, and landmarks nav elements defined in the preceding sections. If these nav elements are intended for reading system processing, they MUST have an epub:type attribute and are subject to the content model restrictions defined in 7.3 The nav element: restrictions.

(from https://www.w3.org/TR/epub-33/#sec-nav-def-types-other)

The hidden attribute has no effect on how reading systems render the navigation data outside of the content flow (such as in dedicated navigation user interfaces provided by reading systems).

(from https://www.w3.org/TR/epub-33/#sec-nav-doc-use-spine)

MurakamiShinyu added a commit that referenced this issue Feb 11, 2024
… be shown in TOC box

This improves TOC elements detection.

- fix #1270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant