Example - Elixir in Action

This page provides specific information regarding the EPUB variant used in "Elixir in Action".


The EPUB variant used by this book largely matches that described in EPUB 3 Best Practices, but there are some exceptions.

Because this is an EPUB 2.0 document:

  • There is no NAV file (defined in EPUB 3).

  • There is an NCX file (defined in EPUB 3).

The navmap hierarchy in the NCX file (toc.ncx) covers only the Part and Chapter levels, despite the fact that the printed Table of Contents lists the Section levels.


Manning produces a large number of high-quality technical reference works for software developers. Let's examine their EPUB archive for Elixir in Action.

File Tree

The file tree contains about 300 files, all of which (except for META-INF/container.xml) reside in the top-level directory (tsk).

| ch??ex??-?.jpg         # images for examples
| common??.jpg           # images for common use
| content.opf            # Open Packaging Format (XML)
| cover.jpg              # image for cover page
| *fig*.jpg              # images for figures
| kindle_split_???.html  # content, split for Kindle
| logo.jpg               # image of Manning logotype
| META-INF/              # EPUB metadata
| | container.xml        # media type, paths (XML)
| mimetype               # "application/epub+zip"
| num-??.jpg             # white digit in black circle
| page_styles.css        # CSS for page margins
| stylesheet.css         # CSS for calibre, etc.
| titlepage.xhtml        # CSS for title page
| toc.ncx                # table of contents (XML)

Package Document

Per META-INF/container.xml, content.opf is our package document. This is a large file (2338 lines!), so here's another summary:

package       # unique-identifier, version, xmlns
| metadata    # xmlns:dc, xmlns:opf
| | dc:*      # creator, identifier, language, ...
| | meta      # name="cover" content="cover-image" ?
| | meta      # content="cover-image" name="cover" ?
| manifest    # list of files included in document
| | item      # id, href, media-type
| | ...
| spine       # toc="ncx"
| | itemref   # idref=titlepage
| | itemref   # idref=html29
| | ...
| | itemref   # idref=html1
| guide
| | reference # href, title, type


The spine entry lists the enclosed content files, in the "normal" reading order. The toc attribute's value (ncx) tells us to look for toc.ncx, a file which contains EPUB 2 navigation hints and other metadata.


The guide entry lists only one reference:

  • The cover page ("Cover") is "titlepage.html".

NCX file

The NCX Navigation Center eXtended file (toc.ncx) is included, as required for EPUB 2.

Brief Table of Contents
Table of Contents
About this Book
About the Cover Illustration
Part 1. The language
| Chapter 1. First steps
| ...

This wiki page is maintained by Rich Morin, an independent consultant specializing in software design, development, and documentation. Please feel free to email comments, inquiries, suggestions, etc!

Topic revision: r10 - 27 Oct 2016, RichMorin
This site is powered by Foswiki Copyright © by the contributing authors. All material on this wiki is the property of the contributing authors.
Foswiki version v2.1.6, Release Foswiki-2.1.6, Plugin API version 2.4
Ideas, requests, problems regarding CFCL Wiki? Send us email