Part 1 – Content Order
Samples provided in this write-up use Adobe InDesign CS5 (7.0.2) and Digital Editions Export 3.0.0
Over the past 8 to 10 years publishers worldwide have moved to Adobe InDesign and InCopy workflows for their book production. Using InDesign for the layout and InCopy for editorial purposes. With the current trend towards ereading, it seems more then logical that publishers are looking at converting existing InDesign documents into EPUB format.
Although earlier versions of InDesign have had support for Digital Editions Export (EPUB), up until the most recent release of InDesign (CS5), we would have had to change the way in which our documents were laid out in order to best prepare them for EPUB output. This was primarily due to the fact that the content order of the EPUB would be based on the document’s Page Layout. InDesign CS5 enables content order creation based on Page Layout or XML Structure.
When the EPUB content order is based on the Page Layout structure of the InDesign document the following occurs:
- Text-threads — or stories as they are referred to in InDesign — are added as an uninterrupted content flow. Any non-threaded content that might decorate the document pages, such as images with captions or break-out text, is added in the content order after the story content is inserted. In other words, these objects will not be placed according to their contextual page reference.
- Secondly InDesign first of all assumes a left-to-right object order when determining the content order. After the left-to-right classification it will look at the top-to-bottom position of objects. This means that if there is an object placed at the bottom of the page that is positioned further to the left than a text frame above it, for example an image, the object will appear first in the content structure. In the illustration below the image marked with “3” on the graphic below is positioned further left then the caption “4” above it. As a result the image will appear before the caption in the content order. (note: in this example the article listed as ‘1’ is actually continued from the previous page text thread… hence it taking precedence over the other objects).
- Objects that are part of a group are handled as if they are individual objects. For instance if item “3” and “4” were grouped together, this would have no impact at all on the resulting EPUB content order. The image “3” would still appear prior to the caption 4″.
In a nutshell using an existing InDesign page layout as the source of the content order, would require significant rework in order to generate correct the contextual content order in the published EPUB. For instance in order to define contextual placement of images, these objects need to become objects that are anchored or inline
XML Structure (InDesign CS5)
InDesign CS5, adds the ability to order the content based on the document’s XML structure. Even when the current version of your InDesign documents doesn’t contain an XML structure, it is relatively simple to mark-up a document’s content with XML.
Building a consistent XML content structure for an InDesign document does require some preparation. Especially where a large amount of document is concerned, it will be worth spending some time and effort on defining the XML Tags and style-mapping rules — which InDesign styles are to be mapped to certain XML tags —
As the article focus is on content order, I’m going to assume that document text is consistently styled and running headers and footers are build using Master Page items.
When the original XML content order is created for an InDesign document, by initially adding untagged items, there are a few things to keep in mind:
- XML structure processes objects based on the layer they reside in. The bottom most layers are handled first.
- Positional placement — the left-to-right, top-to-bottom as seen in Page Layout order — is ignored.
- Objects originating from the same layer are added to the XML structure based on their stacking order — the objects added last to a document page will appear lower in the content structure.
- As with the page layout structure, text-threads are added as an uninterrupted content flow and non-threaded content that might decorate the document pages, such as images with captions or break-out text, are added to the XML structure story content as separate items.
This means that the structure that is created isn’t fully predictable. However, the power of the XML structure is that content order can be corrected without the need to physically make layout type changes to the InDesign document.
- Once the XML Structure is visible objects can be selected and moved into their appropriate contextual position.
During EPUB export, the updated XML structure can now be used to define the content order in the EPUB.
See also Part 2 – Controlling content breaks in this article series on Moving print publications to EPUB. Controlling content breaks.