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 iBooks Store