InDesign’s EPUB export: Style Sheet Control

  • Sumo

This is the first in a series of posts exploring how style sheets export to EPUB. This first discusses Nested Styles; subsequent posts will look at GREP styles, and then styles called out in the Object Style definition.

We all know that thorough, consistent use of paragraph, character, and object style sheets goes a long way to providing a successful EPUB export. Using them is pretty straightforward: create a style, apply it, and map it to the CSS you’ll be using or creating during export (in Edit All Export Tags, for example). Do this for all styles, and the InDesign content exports smoothly to EPUB.

You can tell at a glance if a text block has a paragraph or character style sheet assigned: just click on it and you’ll get a readout in the style panel. (And if you get that annoying + sign, clear those overrides as soon as you can).

What happens if you use Nested Character Styles? Depending on the style definition, those aren’t necessarily obvious at a glance, nor do you see them indicated in the style panel when you click on a bit of text. You have to dig into the Paragraph Style Sheet definitions to find them.

This Paragraph Style (co) has a nested Character Style that makes the first word bold and a color (leadin). Here’s the Nested Style dialog for the Paragraph Style co.

Screen Shot 2015-11-16 at 9.33.40 PM

You can plainly see below that the first word has the style applied, but the Character Style panel doesn’t register that fact. It thinks there’s no character style applied (None).

How will this export to EPUB? I mapped the Character Style leadin to a CSS style, also name leadin. Here’s the markup for this paragraph:

So, yes, the export does grab the Nested Style and apply it as desired.

In the next post, we’ll look at how Paragraph styles called out in an Object Style carry through to EPUB export.

And, how about GREP styles: do they all behave as expected on export? Stay tuned.

Comments are closed.