Alice in EPUB-Land: Understanding the EPUB Format

aliceBanner

EPUB is boring—there I’ve said it. To make it sound even worse, we’re running a company building EPUB authoring tools for several years. Try Googling what is EPUB format and you’ll find yourself buried alive under IDPF pages of complex definitions and terminologies about EPUB—something that will basically give you a nightmare.

There seriously aren’t many good online resources explaining EPUB format in a simple way, and that’s what makes it boring. It’s unfair because EPUB format should not be boring—it actually solves a lot of problems with digital publishing. And it shouldn’t take a tech-savvy to like it, let alone understand it.

We thought we’d spice things up, and explain the EPUB format metaphorically in the easiest way possible. We will explain the anatomy of an EPUB format’s file structure, if you look inside. To make it stick, this will be as visual as possible: a variation of Alice in Wonderland.

So… down the rabbit hole!

rabbitHole

Welcome to EPUB-Land!

Alice falls down to the curious hall with locked doors of all sizes. She enters a new room, named The Package Room. Alice is relieved because this is the main room that explains everything in EPUB-Land. Inside the entrance, she meets an old lady: Ms. Metadata.

Ms. Metadata: EPUB-Land’s old and wise

metadata

The wisest and eldest lady in EPUB-Land. She holds all the keys, secrets, and properties of EPUB-Land. After all, she’s the one who named it that herself. She built the fences, set the language that everyone speaks, set the clear description of EPUB-Land, and chose the architect that built it. Ms. Metadata stays inside the Package Room. Anyone who needs her can find her there.

Alice gains some understanding of EPUB-Land from Ms. Metadata. But asking where she would go next, she advises her to enter further into the room to meet the next character: Mr. Manfiest.

Mr. Manifest: The one who knows it all

manifest

Mr. Manifest, with his fancy money-vest, has the biggest head in EPUB-Land. Why? Because in that head, he keeps records of everyone and everything in EPUB-Land. All the people, residents, houses, rivers, lakes, even trees. He labels them as items, and for each item, he remembers all the corresponding properties, especially how to get there from the Package Room. Mr. Manifest is probably the most important person in EPUB-Land. Not a single thing goes into EPUB-Land without it going into his head. Therefore, anyone looking for something or someone inside EPUB-Land, they come to the Package Room, and ask Mr. Manifest. He then provides the relevant address.

Alice is overwhelmed. She thinks loudly “I can now go to anyone in EPUB-Land so easily! But, where do I start?” Mr. Manifest interrupts her thoughts, advising her to take the Spine Train, which would take her from the first correct destination, along a meaningful route throughout EPUB-Land.

The Spine Train: A proper tour

train

The Spine Train passes by a number of selected destinations in EPUB-Land. Anyone wanting to take a proper navigational tour inside EPUB-Land, has no choice but to take the Spine Train. The train moves in two directions: forward and backward, but it can never skip its selected destinations. If you already know the address of the destination you are heading to, then you do not need to take the train. You can take a chariot instead. All possible destinations can be found in Mr. Manifest’s head, or they can be found structured appropriately in what’s called, the “Table of Contents”.

The Table of Contents

The Table of Contents shows all the possible destinations that you can visit in EPUB-Land, including all the destinations that the Spine Train stops at. The Table of Contents can show the different destinations in structured form as well. For example, if you are going to the Duchess’ House, the Table of Contents will show you that it’s located outside of the Caterpillar’s forest. If you are going to the White Rabbit’s House, the Table of Contents will mention that it’s in the North of EPUB-Land. Whichever destination you choose, you can take a chariot and go there directly. If this destination is on the Spine Train’s route, you can take it but it may have to make several stops before reaching there.

Alice comes out of the Package Room, relieved. She finally understands EPUB-Land, and knows exactly what to do. EPUB-Land isn’t so boring after all!

If you’re ready to start creating truly interactive ebooks, we highly recommend reading this extensive step-by-step tutorial to creating unique and engaging ebooks.

If not, then keep reading!

cat

Still don’t get the EPUB format?

Back to reality. We have just went over the five most important elements of any EPUB file: the Package file, the Metadata, the Manifest, the Spine, and the Table of Contents. EPUB files are simply Zip archives. All you need to do is rename the extension from .epub to .zip to be able to extract the contents and see the internal files. The most important file is the package file (recall the package room). It contains the ebook’s metadata, manifest, and spine. As for the Table of Contents, it is a file on its own. So let’s look at each of these, from a technical point of view (don’t run away from me now).

EPUB Format

Metadata

A listing of all the properties and settings for the ebook, such as the title, author, publisher, description, language, ISBN, etc.

Manifest

A listing of all the files belonging to the ebook, along with the address of each. This includes chapters (HTML), images, videos, audio, stylesheets, script files, etc. See why Mr. Manifest has a big head?

Spine

The spine lists the different chapters in order that make up the ebook reading experience. Any ebook reader has next/previous navigation buttons, to go from chapter to the next/prev. The spine defines the order of these chapters. Note that it’s not obligatory that all chapters are mentioned in the spine. Hence you have the chariots!

Table of Contents

The other way an ebook reader can navigate the ebook is using the Table of Contents. This contains a structured/nested list of chapters and subchapters along with their addresses. Note that unlike the previous elements which are stored in the package file, the Table of Contents is stored as a separate file, using any naming as long as it is indicated in the manifest.

See that wasn’t so bad! I hope now you find the EPUB format simple and easy to grasp. If you have any ideas how this analogy can be made better or more entertaining, share it with us in the comments below!

You might also like:

EPUB Navigation Peculiarities

Adding Google Fonts to your EPUB

EPUB and SCORM: A healthy affair?

How to edit EPUB books manually

Why your EPUB is being rejected from Apple Books Store

13 Comments

  • Salma Hossam Mohsen

    March 20, 2016

    Omg this article is really helpful for the first time I am able to grasp a better understanding of ePub!!
    The analogy in the article is simply brilliant. Keep up the good work Kotobee!

    Reply
    • Kotobee

      March 21, 2016

      Thank you Salma. I’m happy it helped you understand ePub further.

      Reply
  • Flavio Pessato

    March 21, 2016

    Hi, I think you’re talking about epub2 and not epub3, am I right?

    Reply
    • Kotobee

      March 21, 2016

      Everything I mentioned, are shared for both ePub 2 and ePub 3, except the way that the Table of Contents is used. Epub 2 uses the NCX format, while ePub 3 uses standard HTML.

      Reply
  • Flavio Pessato

    March 21, 2016

    I mean, one of the real problems today is creating rich epub3 presentations (of the type you can create for ibooks for apple) including rich media (audio/video) and then finding a software package or an app that can read that on platforms different from ios (I mean android or windows phone). Am I right?

    Reply
    • Kotobee

      March 21, 2016

      Yeah it’s a challenge. But it’s possible to create – the ePub 3 format allows it. You can put your own scripting (js) and css, so that gives you tonnes of flexibility. I haven’t seen any like real rich interactive ePub documents lately, I don’t think there have been serious attempts to create rich presentations out of them – except for novels and simple publications. In our case, we’re releasing Kotobee Reader soon on the app stores and desktop, so that there can be a consistent rich reading experience for interactive ePub documents

      Reply
  • Neo-Machiavelli

    March 26, 2016

    I find this article very simple, useful and easy explanation of EPUB.
    But I think EPUB is a science, technology and art. Only with a lot of time
    invested in learning and practicing arrived to a good art of EPUB. Perhaps is
    better if I invest my time to create a good ebook, with my best ideas and a selection of
    best authors and get collaboration, (payed or with exchange services), to transfer
    all contents to EPUB. SOMEBODY ARE INTERESTED TO COLLABORATE WITH ME?

    I have THE intention to wright a ebook about NPF=NEO-Publishing-Future: eBooks, PeBooks
    and CeBooks … with a section: the very best of best authors online, a selection
    of best ideas for a better future of Internet and new tecnologies. Can I publish
    a selection from this article like this, (1)?

    (1)

    Ayman Abdel-Rahman, (link to a perfil), CEO of Kotobee,
    Managing Director at Vijua: “…The five most important elements of any EPUB file:
    the Package file, the Metadata, the Manifest, the Spine, and the Table of Contents.

    EPUB files are simply Zip archives. All you need to do is rename the extension from .epub to
    .zip to be able to extract the contents and see the internal files. The most
    important file is the package file (recall the package room). It contains the
    ebook’s metadata, manifest, and spine. As for the Table of Contents, it is a
    file on its own. …
    EPUB Format, Metadata: A listing of all the properties and settings for the
    ebook, such as the title, author, publisher, description, language, ISBN, etc.
    Manifest: A listing of all the files belonging to the ebook, along with the
    address of each. This includes chapters (html), images, videos, audio,
    stylesheets, script files, etc…
    Spine: The spine lists the different chapters in order that make up the
    ebook reading experience. Any ebook reader has next/previous navigation
    buttons, to go from chapter to the next/prev. The spine defines the order of
    these chapters. …
    Table of Contents: The other way an ebook reader can navigate the ebook is
    using the Table of Contents. This contains a structured/nested list of chapters
    and subchapters along with their addresses…
    Tags: ebooks, EPUB, EPUB format, publishing”.

    Reply
    • Kotobee

      March 28, 2016

      Neo, thanks for your compliment. Yes sure, feel free to take an excerpt from this article as you showed, and use it in your book. Thank you!

      Reply
  • Pingback: Why your EPUB is being rejected from Apple iBooks Store - Kotobee Blog

  • Pingback: How to edit EPUB books manually - Kotobee Blog

  • Pingback: EPUB Navigation Peculiarities - Kotobee Blog

  • Ambakederemo Ayakpodo Donald

    May 15, 2020

    I can’t thank you enough for your most simplified approach to this topic. Your method of teaching is quite inspiring, especially if you understand something about programming.
    Many thanks.

    Reply
    • Kotobee

      June 1, 2020

      You are very welcome, we’re happy to help!

      Reply

Leave a Reply