Subtitles in EPUB 3

by Keith Fahlgren

Update: I should have been clearer that the “bare” use of subtitle without referencing a scheme is really suboptimal. Using already-defined properties/definitions and referencing them explicitly (like the ONIX codelist example below) is a much better technique, but I did not come up with a compelling property for subtitle, hence the call for better options. See the comments below for a good discussion of those options.

There’s also a Bulgarian translation.

In a previous post, Thomas Rasche asked:

How are book subtitles best dealt with in Epub3? They could be included with a meta data property, but is there a recommended way so that a reader recognizes them, to display them sensibly (eg subtitles display in smaller font under the main title etc)?

EPUB 3’s metadata model is powerful and flexible. It is a big improvement over the limited metadata permissible in EPUB, but there are three real costs associated with EPUB 3’s metadata:

  1. Because of backward compatibility with EPUB, metadata in EPUB 3 duplicates at least three required metadata elements in both an old and new style: title, identifier, and language (probaby creator too).
  2. Greater flexibility in metadata schemas means that EPUB 3 metadata sometimes seems quite verbose (but you’re generating your OPF using software with robust metadata stores anyway, so this isn’t much of a complaint, right?).
  3. Different metadata schemas describe the same thing with different words, so there are often many ways to accomplish the same thing and we don’t yet know what the convention will be.

That last issue of choosing a schema is the central issue in our subtitle problem. The EPUB Publications 3.0 specification provides a number of examples on how to include specific metadata but doesn’t exactly prescribe how a subtitle should be included. Instead, we’ll include two titles in a row, declare one as the subtitle, and indicate a display order.

Cover of Dreams from My Father: A Story of Race and Inheritance

Here’s the markup, using Dreams from My Father: A Story of Race and Inheritance as the example:

<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
  <dc:title id="title" prefer="dcterms-title">Dreams from My Father</dc:title>
  <meta property="dcterms:title" id="dcterms-title">Dreams from My Father</meta>
  <meta about="#dcterms-title" property="display-seq">1</meta>

  <dc:title id="subtitle" prefer="dcterms-subtitle">A Story of Race and Inheritance</dc:title>
  <meta property="dcterms:title" id="dcterms-subtitle">A Story of Race and Inheritance</meta>
  <meta about="#dcterms-subtitle" property="title-type">subtitle</meta>
  <meta about="#dcterms-subtitle" property="display-seq">2</meta>
  …

What’s going on here?

In this markup, we do a range of things. We state both the title and subtitle using the legacy EPUB markup for backward compatibility and we do it in order, which is important for EPUB, but we also tell EPUB 3 reading systems to use the new syntax with the prefer attribute:

  <dc:title id="title"
            prefer="dcterms-title">Dreams from My Father</dc:title>
  …
  <dc:title id="subtitle"
            prefer="dcterms-subtitle">A Story of Race and Inheritance</dc:title>

We also include the titles using the new markup for EPUB 3:

  <meta property="dcterms:title"
        id="dcterms-title">Dreams from My Father</meta>
  …
  <meta property="dcterms:title"
        id="dcterms-subtitle">A Story of Race and Inheritance</meta>

Next we specify that the subtitle, is, in fact, a title-type subtitle. We do this by adding another meta element that refers to the subtitle with the about attribute:

  <meta about="#dcterms-subtitle"
        property="title-type">subtitle</meta>

Finally, we specify the display order of the two titles with meta elements and display-seq

  <meta about="#dcterms-title"
        property="display-seq">1</meta>
  …
  <meta about="#dcterms-subtitle"
        property="display-seq">2</meta>

Other options

EPUB 3 is new enough that we don’t know which practices will become adopted by content creators and reading systems (so we don’t know about a smaller font, like the original question). The subtitle markup suggested above is a decent approach, but other options might be using http://open.vocab.org/terms/subtitle (not widely used in publishing today) or ONIX’s <Subtitle> element (very hard to reference cleanly).

If you’ve got a better suggestion for the markup above please leave a comment and I’ll update the post if a winner emerges.

Colons don’t make subtitles

While it may seem tempting to split title and subtitle on a :, don’t, ever: slide:ology.


If there are specific EPUB 3 questions you have that you’d like to see us write about, please leave a note in the comments—Thanks!


Creative Commons License
Subtitles in EPUB 3 by Keith Fahlgren is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.