Crash course in EPUB

Betsy Granger photo.

Betsy Granger has spent close to 14 years in publishing. Her career started in fashion editorial as an intern for InStyle magazine. Eleven years back, coinciding with a move out west to Austin TX, she shifted from print to the digital world and fell in love with science publishing. Two years ago, she joined Macmillan Learning and has been working to streamline the digital production process. At night she dreams of single-source publishing while loving and hating InDesign equally. In her “free” time, she works on design projects in Illustrator and Photoshop, and if she ever finds the time again, she would like to work with actual paint.

Betsy Granger will be speaking at ebookcraft 2018 in a session called Universal CSS: How to maintain flexibility and title-specific branding, while secretly taking away the freedom of design.

I joined the production team at Macmillan Learning just over a year ago; they had recently begun an initiative to move to EPUBs as their standard digital delivery for ebooks. I was starting behind the group and needed to catch up, fast. Here I outline my learning path in terms of the resources I used to gain knowledge of EPUBs.

A year ago, my knowledge of EPUB was limited to a Lynda course I'd taken a few months prior (InDesign CS5: EPUB Kindle and iPad with Anne-Marie Concepción). At the time, I could tell you what an EPUB was and suggest that you keep a single-column layout in InDesign, so your EPUB export wasn't terrible. Today, I can look at content and know what the underlying structure should be, give you CSS definitions, and talk about EPUB semantics. It hasn't always been a linear path to knowledge, but even the detours have helped my understanding.

First stop: I read the IDPF EPUB standards (the packagescontent, and accessibility documents), and the EPUB for Education standard. After my initial readings, I only understood a small fraction of the content, but, reading them through entirely helped me understand the coverage of the spec. I still need to go back every three months, as my knowledge base grows, but I'm finding I can extrapolate more and more. If you're interested in EPUB for Education, BISG created a great introductory guide in 2015: Getting Started With EDUPUB.

EPUB 3.0 is built on HTML5, another topic I had a very basic knowledge of a year ago. To understand the relationship between EPUB and HTML, I referenced the IDPF semantic elements and then cross referenced the HTML element on the W3School database. I still use this resource daily as I confirm how we should be structuring different content in EPUB. Another site that was very helpful in designing the CSS was the Bootstrap documentation, it's a visually familiar framework for the web, and it provided visual models that we wanted to replicate in EPUB. (GitHub can be intimidating, so I started looking at Bootstrap and checking examples and documentation pages.)

Nine months into the project I was introduced to schema and Schematron validation as a way of authoring consistent EPUBs. Looking through defined schema sets helped when we were identifying our company-specific schema. One of the first libraries I looked at was the BITS library. Although we decided not to go with this one for our schema, it was a useful exercise to review the library and it helped to confirm coverage. Schema.org is another resource that EPUB specs references in its documentation and links to other libraries.

To create a CSS that could cover content across many academic disciplines, we looked to Sass. Sass CSS is a way of authoring CSS that utilizes nesting, variables, and commons strings to quickly create cleaner CSS. To learn more about Sass I took the free Codecadamy course. This was a great introduction to what we can do with style sheets and it helped me to identify schema and what values I think should be “variables” or “mixins.”

The most helpful tool for me has been the Developer Tools in Google Chrome browser. I wish I had kept track of how many EPUBs I've looked at in the last year (my guess is 73, but if I count revisions, then it's closer to 1,000). If you unpackage an EPUB or have an EPUB hosted on a server, you can use the Developer Tools to inspect the structure (this can also be done using Oxygen XML Editor or Adobe Dreamweaver, but Chrome is free). I also use them to investigate other websites that catch my eye. If I like a layout, font size, or responsive behaviour, I can look at and edit the structure directly in the browser. It's also an excellent tool for diagnosing issues in EPUBs; I can query an element and see the tags or how it's embedded and figure out where the problem is in order to share with other teams.

As with any great project, I'm still learning every day. It wasn't a traditional path, but starting with specs has helped direct my learning. Accepting that I wasn't going to be an expert in EPUB specs after one reading helped me get through the text and revisiting it as I learn more has helped me retain it.

If you'd like to hear more from Betsy Granger, register for ebookcraft, March 21-22, 2018 in Toronto. You can find more details about the conference here, or sign up for our mailing list to get all of the conference updates.