View Single Post
Old 05-04-2018, 11:07 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,891
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by slowsmile View Post

A proper epub 3 toc.ncx looks something like this:
Spoiler:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<html  xmlns:epub="http://www.idpf.org/2007/ops">
  <head>
    <meta http-equiv="default-style" content="text/html; charset=utf-8"/>
    <title>Contents</title>
    <link rel="stylesheet" href="css/siddhartha.css" type="text/css"/>
  </head>
  <body>
<!-- Start of Nav Structures -->
<!-- Main Contents -->    
<nav epub:type="toc">
  <h2>Contents</h2>
  <ol>
    <li><a href="s001-BookTitlePage-01.xhtml">SIDDHARTHA</a></li>
    <li><a href="s002-Copyright-01.xhtml">Copyright</a></li>
    <li><a href="s003-Dedication-01.xhtml">Dedication</a></li>
    <li><a href="s004-Epigraph-01.xhtml">Epigraph</a></li>
    <li><a href="s005-AboutTheAuthor-01.xhtml">Herman Hesse</a></li>
    <li><a href="s006-AboutThisBook-01.xhtml">Siddhartha—The book</a></li>
    <li><a href="s007-Part-001.xhtml">First Part</a>
      <ol>
        <li><a href="s008-Chapter-001.xhtml">The Son of the Brahman</a></li>
        <li><a href="s009-Chapter-002.xhtml">With the Samanas</a></li>
        <li><a href="s010-Chapter-003.xhtml">Gotama</a></li>
        <li><a href="s011-Chapter-004.xhtml">Awakening</a></li>
      </ol>
    </li>
    <li><a href="s012-Part-002.xhtml">Second Part</a>
      <ol>
        <li><a href="s013-Chapter-005.xhtml">Kamala</a></li>
        <li><a href="s014-Chapter-006.xhtml">With the Childlike People</a></li>
        <li><a href="s015-Chapter-007.xhtml">Sansara</a></li>
        <li><a href="s016-Chapter-008.xhtml">By the River</a></li>
        <li> <a href="s017-Chapter-009.xhtml">The Ferryman</a></li>
        <li><a href="s018-Chapter-010.xhtml">The Son</a></li>
        <li><a href="s019-Chapter-011.xhtml">Om</a></li>
        <li><a href="s020-Chapter-012.xhtml">Govinda</a></li>
      </ol>
    </li>
    <li><a href="s021-Appendix-01.xhtml">Appendix 1: Dharmmapada</a></li>
  </ol>
</nav>
<!-- Landmarks --> 
<nav epub:type="landmarks">
  <h2>Landmarks</h2>
  <ol>
    <li><a epub:type="bodymatter" href="s008-Chapter-001.xhtml">Begin Reading</a></li>
    <li><a epub:type="titlepage" href="s001-BookTitlePage-01.xhtml">Title Page</a></li>
    <li><a epub:type="copyright-page" href="s002-Copyright-01.xhtml">Copyright Page</a></li>
    <li><a epub:type="frontmatter" href="s004-Epigraph-01.xhtml">Epigraph</a></li>
    <li><a epub:type="frontmatter" href="s005-AboutTheAuthor-01.xhtml">Herman Hesse</a></li>
    <li><a epub:type="backmatter" href="s021-Appendix-01.xhtml">Dharmmapada</a></li>
  </ol>
</nav>
<!-- Other TOC elements --> 
<!-- End of Nav Structures -->
  </body>
</html>
There no such animal as a proper epub3 toc.ncx. What your spoiler shows is an epub3 navigation document which should show in the text files. nav.xhtml or toc.xhtml seem to be common names but check in content.opf for the nav property to identify the navigation document. Epub3 allows for a toc.ncx for backwards compatibility and Sigil will create a template toc.ncx if the epub3 did not include one or it wasn't identified properly.

Sample navigation document line in content.opf:

Code:
<item id="toc" href="Text/nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
As for the mess posted by the OP, the last time I saw something like that was when the author copied and pasted from a code view to a book view. On his only bloody copy of the file.

Last edited by DNSB; 05-04-2018 at 11:09 PM.
DNSB is offline   Reply With Quote