Information in this post is relevant to CS 5; some of the issues mentioned in this post have been fixed in CS 5.5 and are listed in a PDF available here.
In recent years the increasing popularity of eBook devices has caused quite a stir in the publishing industry. While the PDF format perfectly preserves the look of your printed book, it is not suitable for use on devices with different display sizes. Adobe InDesign CS5 can export to the popular EPUB format which works on most eBook readers, but if certain rules are not followed during the design process a book that looks beautiful in InDesign might become unreadable as an EPUB. This article covers some steps that will help you design a single book that works best for both print and eBook.
Use InDesign’s Book Utility. While there may be some advantages to keeping your whole book in a single file, if you’re publishing eBooks the book utility is a must. An EPUB’s XHTML documents have a maximum size limit of 300 KB. The best way to meet this requirement is to break your book into separate InDesign documents and manage them in the Book utility. As long as you use book synchronization and page numbering options properly your print version will still work beautifully. When exporting the book to EPUB, InDesign will create a separate XHTML file corresponding to each InDesign document in the book.
Keep in mind the only way to force a “page break” in an EPUB is to start a new document; so for example, your title and copyright pages should be separate files, so that they appear to be separate pages in the EPUB.
Use margins, baseline grids, spacing and leading based on points. Printed books require balanced and consistent page layout. Inches are great for some things, but when working with type we typically use points; therefore it follows that the page could be divided vertically using points as follows:
- Top & Bottom Margins: calculate these using points so that your text block is an exact number of lines given your leading. Headers and footers should be outside the margins.
- Baseline Grid: (in your preferences) start it at your top margin and make sure it matches your body text leading.
- Snap your main paragraph styles to the grid.
- Leading & Vertical Spacing: generally, keep these consistent with your grid. Space before paragraphs is often easier to work with than space after.
TIP: You can change your ruler units at any time by right-clicking the ruler. It’s perfectly acceptable to switch back and forth as needed.
Use Styles for (almost) everything. Experienced print designers are familiar with the advantages of using styles effectively, but with EPUBs it’s even more important to use styles. During EBUP export, every Paragraph, Character, Cell, Table, and Object Style used in the InDesign document will be mapped to a CSS class in the EPUB’s “template.css” file. Matching tags will be added to the XHTML files. Any formatting not applied via styles will be removed.
NOTE: Although InDesign has an option in the EPUB export dialog to preserve style overrides, this option should NOT be used as it really makes a mess of your CSS.
Use overrides for formatting needed for the print version but not the ePub, such as kerning or tracking to make text fit on the page.
As of CS5, there are still some problems with the XHTML and CSS that InDesign generates. While discussion of these problems are beyond the scope of this article, it’s important to know that it is usually necessary to extract the EPUB’s contents, manually edit the CSS, and manipulate the tags in the XHTML. Dreamweaver’s Find/Replace source code on all files in a folder comes in very handy for this.
Anchor graphics to text flow. When exporting to EPUB, each document’s objects will be placed in the XHTML file in the order they appear, with each story (text thread) being treated as a single object. This means that any un-anchored graphics will appear after the text that flows around them in your print version. Graphics MUST be anchored to the text if you want them to appear in the proper position within the story. Furthermore, they should be anchored to their own hard return so as not to disturb the formatting of the text in the EPUB.
Vector-based art created in InDesign will not be exported! Perhaps future versions will address this, but in CS5 any vector-based artwork created in InDesign, including outlined text, will disappear from the EPUB. The workaround is to copy and paste the artwork into Illustrator and then save and place it back into InDesign.
All graphics are converted to low-resolution JPG or GIF when exporting to EPUB.
Precise typography is not preserved. Mathematical formulas or other content requiring precise typography should be placed as vector-based graphics. Placed vector content, such as EPS, AI, and PDF can contain type.
Create a TOC Style. EPUBs contain a special file (“toc.ncx”) that many eBook devices use to display the table of contents. InDesign can generate this during export using a TOC style. This can be the same TOC style you use for your print version of the book, or it can be a custom style you make just for the EPUB. You must enable this feature in the export dialog.
I originally wrote this article as a handout for the March 2011 Portland IDUG meeting; you can download the handout in PDF format.