Posted on by & filed under epub3.

If you’re interested in diving into EPUB 3 right now, Dave Cramer from Hachette Book Group was kind enough to put together a sample EPUB version of Moby Dick featuring an EPUB 3-compatible table of contents (the “EPUB Navigation Document“), some example of the new metadata, and a media-overlay sample of synced audio and text.

This particular EPUB 3 document is designed to be backwards-compatible, so it will be readable in most EPUB 2 reading systems as well (even ADE!) — though the EPUB 3-only magic requires full reading system support. I suspect we’ll see a lot of these hybrid documents in the ecosystem, and the EPUB Working Group should be commended for making backwards compatibility a core design goal.

Dave’s version of the book will work in the public Ibis Reader because it’s backwards-compatible, but after putting in some support for the new EPUB Navigation Document (END) format, I wanted to be absolutely sure that Ibis could read the new format and not fall back to the NCX.

EPUB 3 document with NCX/EPUB 2 fallback

This is how the hybrid book declares both the new navigational document (“END”) and the old NCX. If you were generating EPUB programmatically, it should be trivial to produce both EPUB navigation documents from the same source.

<manifest>
    <!-- The EPUB Navigational Document has a @property with the value "nav" -->
    <item id="toc" properties="nav" href="toc.xhtml" media-type="application/xhtml+xml"/>

    <!-- The EPUB 2 NCX can also be included for backwards-compatibility -->
    <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
     ...
</manifest>

<!-- Backwards compatibility also requires the @toc attribute on the spine -->
<spine toc="ncx">
...

EPUB 3 without any EPUB 2 fallbacks

In an EPUB 3-only document you can simply have:

<manifest>
    <!-- The EPUB Navigational Document has a @property with the value "nav" -->
    <item id="toc" properties="nav" href="toc.xhtml" media-type="application/xhtml+xml"/>
     ...
</manifest>
<spine>
...

I took Dave’s document and removed all the NCX references for testing purposes. Now even without the NCX, our internal EPUB 3 development branch can still read the book’s table of contents:

Screenshot of a development version of Ibis Reader showing an EPUB 3 document

It will take some time before we can publicly release EPUB 3 support, but it’s coming!

Tags:

One Response to “EPUB 3 Navigation Document support in Ibis Reader”

  1. Anne-Marie Concepcion

    Excellent work, Liza (et. al.), thank you! I talk about (and demo) the Ibis Reader in my InDesign > EPUB titles on Lynda.com. It’s really cool to learn that you’re already ramping it up for EPUB3.

    AM