Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Creative Suite

  • Print
  • + Share This
Like this article? We recommend Text Formatting and EPUB

Text Formatting and EPUB

I want to give you a few things to keep in mind when formatting text for EPUB, and show you a new feature for making text behave in your EPUB using InDesign CS5.5.

First, a few (of the many) things to think about:

  • InDesign retains basic text formatting by converting paragraph and character styles into CSS styles.
  • Using Space Above, Space Below, and Indents in styles allows you to create white space.
  • Your fonts can be embedded by InDesign using the @font-face property, but not all fonts allow embedding, and font embedding support on devices is spotty.
  • White space created with empty carriage returns, multiple spaces, or tabs are ignored in the EPUB export.
  • Use Paragraph and Character styles in your InDesign document rather than local formatting. In the long run, it’ll be easier to manage the styling, and it can be neater in the EPUB if you ever decide to edit it later on.
  • Another style point: Try to avoid paragraph and character style overrides. That means formatting text using local formatting (after you’ve applied a paragraph or character style).
  • Nested styles will be preserved as class styles applied in the EPUB.
  • Columns in a text frame will be ignored.
  • Span and split of content in InDesign CS5 and later is ignored.

Okay, while thinking about those things, let’s take a look at an exciting new feature in InDesign CS5.5 called Edit All Export Tags.

First, let’s take a step back. When you are in InDesign and you press Return, you create a paragraph. In the EPUB HTML code that is generated, typically a p tag is created to indicate a paragraph. Well, suppose you applied a paragraph style called body12pt to certain paragraphs in InDesign. By default, InDesign will create a CSS class and assign that class to each paragraph in the exported EPUB. Using the new Edit All Export Tags feature, you can change how the code is written. So let’s take a look:

  1. With the InDesign document open and some paragraph styles applied to your text, open the Paragraph Styles panel. From the menu, choose Edit All Export Tags.
  2. In the Edit All Export Tags dialog box, select, EPUB and HTML.
  3. In the listing, you will see all of the paragraph and character styles available in your document. You can assign these InDesign styles to a particular XHTML tag (like p for paragraph). Choose p from the Tag menu to the right of a style name (we used our Body style), as shown in Figure 11. That would mean that in the EPUB file, wherever the style Body is applied in InDesign, a simple p tag will be applied. In this instance, the style for the p tag is something you would create later in the EPUB.

    Figure 11 Map your styles to tags and/or classes in the EPUB.

  4. Click OK to close the dialog box.
  • + Share This
  • 🔖 Save To Your Account