An EPUB 3 book has a navigation document: an XHTML file, marked in the manifest
with properties="nav", that holds the table of contents and optional lists of
pages and landmarks. EPUB 2 used an NCX file instead, and marked landmarks in the
package’s guide. Many EPUB 3 books include an NCX and a guide as well, for
older reading systems, which EPUB 3 readers ignore.
Landmarks
Landmark links take their epub:type from the
structural semantics vocabulary. Reading
systems act mostly on these:
epub:type | Place |
|---|---|
cover | The cover page. |
titlepage | The title page. |
frontmatter | The start of the front matter. |
bodymatter | Where the main text starts; many readers open a new book here. |
backmatter | The start of the back matter. |
toc | The table of contents. |
loi, lot | Lists of illustrations and tables. |
preface, bibliography, glossary, index, appendix | Those sections. |
The NCX (EPUB 2)
The Navigation Control file for XML, taken from the DAISY digital talking book
standard (ANSI/NISO Z39.86-2005). It is XML in the namespace
http://www.daisy.org/z3986/2005/ncx/, version="2005-1",
usually named toc.ncx, with media type
application/x-dtbncx+xml; the spine’s toc attribute names
it.
| Element | Attributes | Content |
|---|---|---|
ncx | version, xml:lang | head, docTitle, docAuthor (any), navMap, pageList (optional), navList (any). |
head | meta elements with name and content: see below. | |
docTitle, docAuthor | A text element, and optionally audio and img. | |
navMap | Optional navInfo and navLabel, then one or more navPoint. | |
navPoint | id (required), playOrder, class | navLabel (one or more), content, then nested navPoint elements. playOrder numbers all navigation points, page targets and nav targets together in reading order, from 1. |
navLabel | xml:lang, dir | text, and optionally audio and img. |
content | src (required), id | Empty. The target, as a file and optional fragment. |
pageList | id, class | Optional navInfo and navLabel, then pageTarget elements. |
pageTarget | id, value, type (front, normal or special), playOrder, class | navLabel and content: one printed page. |
navList | id, class | navInfo, navLabel and navTarget elements: a list of things such as illustrations. |
navTarget | id, value, playOrder, class | navLabel and content. |
text | The label text. | |
audio | src, clipBegin, clipEnd | An audio label, in DAISY books. |
img | src | An image label. |
meta name | Content |
|---|---|
dtb:uid | The book’s unique identifier; should match the package’s. |
dtb:depth | The deepest nesting of navPoints, from 1. |
dtb:totalPageCount | The number of pages in pageList, or 0. |
dtb:maxPageNumber | The highest page number, or 0. |
dtb:generator | Optional: the program that made it. |
The guide
In the package document, guide holds reference elements,
each with type (required), title and href
(required). OPF 2.0.1 defines these types; others must start with
other., as in other.afterword.
| Type | Place | Type | Place |
|---|---|---|---|
cover | the book cover | dedication | dedication |
title-page | page with title, author, publisher | epigraph | epigraph |
toc | table of contents | foreword | foreword |
index | back-of-book index | loi | list of illustrations |
glossary | glossary | lot | list of tables |
acknowledgements | acknowledgements | notes | notes |
bibliography | bibliography | preface | preface |
colophon | colophon | text | first “real” page of content |
copyright-page | copyright page |