View Single Post
Old 01-22-2016, 08:09 AM   #6
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,741
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by tinmug View Post
The OPF does list the to.xhtml inside the guide tags.
As I've aleady pointed out, .opf guide elements are ignored for ePub3 books. You'll need to add a toc landmarks item to the NAV xhtml file. For example:

Spoiler:
Code:
    <nav id="landmarks" epub:type="landmarks">
      <h2>Guide</h2>
      <ol>
        <li>
          <a epub:type="cover" href="../Text/cover.xhtml">Cover</a>
        </li>
        <li>
          <a epub:type="bodymatter" href="../Text/chapter1.xhtml">Start reading</a>
        </li>
        <li>
          <a epub:type="toc" href="../Text/nav.xhtml">Table of Contents</a>
        </li>
      </ol>
    </nav>


For a working example book download this ePub3 book from MR. It has the proper NAV xhtml landmarks and compiles OK with KindleGen. If you format your book in the same way the TOC menu item will no longer be greyed out.

Quote:
Originally Posted by tinmug View Post
Should the lack of the TOC button in Kindle Previewer concern me?
Yes, because it means that the nav xhtml is missing a toc landmarks item; it also means that users of older Kindle models won't be able to access the HTML TOC:

Quote:
Originally Posted by tinmug View Post
Where should
<item id="toc" properties="nav" href="xhtml/toc.xhtml" media-type="application/xhtml+xml"/>
be placed? In OPF? Inside <guide>?
No, in the nav xhtml file. (See the above example.)

I've replied too quickly that declaration should be in the .opf file.

Last edited by Doitsu; 01-22-2016 at 10:17 AM.
Doitsu is offline   Reply With Quote