Giter Club home page Giter Club logo

Comments (2)

jgm avatar jgm commented on September 28, 2024

I tried this. The resulting epub validated with epubcheck (after I added -M title=Title to ensure that it had a title). I then opened the epub in iBooks, and both the built-in TOC navigation and the links in the generated TOC seemed to worked perfectly.

nav.xhtml has

<nav epub:type="toc" role="doc-toc" id="toc"><h1 id="toc-title">title</h1><ol class="toc"><li id="toc-li-1"><a href="text/ch001.xhtml#section">Section</a><ol class="toc"><li id="toc-li-2"><a href="text/ch001.xhtml#subsection">Subsection</a></li><li id="toc-li-3"><a href="text/ch001.xhtml#subsection2">Subsection2</a></li><li id="toc-li-4"><a href="text/ch001.xhtml#subsection3">Subsection3</a></li><li id="toc-li-5"><a href="text/ch001.xhtml#subsection4">Subsection4</a></li><li id="toc-li-6"><a href="text/ch001.xhtml#subsection5">Subsection5</a></li><li id="toc-li-7"><a href="text/ch001.xhtml#subsection6">Subsection6</a></li></ol></li></ol></nav>

and all these links look correct to me.

toc.ncx has

  <navMap>
    <navPoint id="navPoint-0">
      <navLabel>
        <text>title</text>
      </navLabel>
      <content src="text/title_page.xhtml" />
    </navPoint>
    <navPoint id="navPoint-1">
      <navLabel>
        <text>Section</text>
      </navLabel>
      <content src="text/ch001.xhtml#section" />
      <navPoint id="navPoint-2">
        <navLabel>
          <text>Subsection</text>
        </navLabel>
        <content src="text/ch001.xhtml#subsection" />
      </navPoint>
      <navPoint id="navPoint-3">
        <navLabel>
          <text>Subsection2</text>
        </navLabel>
        <content src="text/ch001.xhtml#subsection2" />
      </navPoint>
      <navPoint id="navPoint-4">
        <navLabel>
          <text>Subsection3</text>
        </navLabel>
        <content src="text/ch001.xhtml#subsection3" />
      </navPoint>
      <navPoint id="navPoint-5">
        <navLabel>
          <text>Subsection4</text>
        </navLabel>
        <content src="text/ch001.xhtml#subsection4" />
      </navPoint>
      <navPoint id="navPoint-6">
        <navLabel>
          <text>Subsection5</text>
        </navLabel>
        <content src="text/ch001.xhtml#subsection5" />
      </navPoint>
      <navPoint id="navPoint-7">
        <navLabel>
          <text>Subsection6</text>
        </navLabel>
        <content src="text/ch001.xhtml#subsection6" />
      </navPoint>
    </navPoint>
  </navMap>

That too looks right. I see no problems here. Perhaps you are accidentally using a different version of pandoc than you think you are?

from pandoc.

pinusc avatar pinusc commented on September 28, 2024

Whelp. Turns out this was a bug in my ebook reader (zathura with mupdf backend). Everything does indeed work as expected when opening in another editor... Sorry for wasting your time!

from pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.