is now part of!

Structure Pane versus Page Order for EPUB Export from InDesign


In my recent InDesignSecrets: Beyond Print seminar in Los Angeles, an attendee (hi Lucy!) pointed out that an EPUB file is much like an MS Word file. I think that’s very apt: You should definitely not expect EPUB to be any fancier than a Word doc, and you should expect to be just as frustrated creating EPUBs as you would trying to “lay out” something with Word (if not moreso). EPUB is a linear flow — it’s meant to be reflowable based on screen size, reader choices for fonts and size, and so on. It’s a lot like HTML because it actually is HTML inside that little .epub package.

But many InDesign files are not linear — you can put stuff all over the page! So how do you turn non-linear into linear. Cari Jansen wrote up a great little overview of managing order in EPUB docs on her blog recently, and she points to the two basic methods available: Page Layout and XML Structure (new in CS5). These are options in the Export for Digital Editions dialog box. (Note that someday they’ll take “digital editions” out of the dialog box name. Sigh.)

That said, I have a bone to pick with the XML Structure option. Actually, two bones. Both of these relate to how to insert images (which often have captions alongside them) into the flow.

The Problem of Groups

First of all, as I’ve noted earlier, I like grouping my figures and captions and then applying an object style to them. But if you anchor a group in a story (to tell InDesign where you want it to appear in the EPUB export), you can no longer tag the story:

  • If you try to use Add Untagged Items, it fails with an error, saying “The frame or frame content is not taggable.”
  • If you use Map Styles to Tags, you can tag the text, but not the anchored objects, because they’re inside a group. So the captions and images don’t appear in the EPUB.
  • If you tag the caption and image frames, then group them… you cannot paste it into the frame (Paste is grayed out).

So, the inability to have groups inside a structure is a huge problem with the Structure pane workflow.

Of course, you can give up the idea of using groups at all, and just use multiple anchored objects in a row (for example, anchor the graphic frame, then anchor the caption text frame, and assign the proper object style to each of them). But it’s an unfortunate limitation.

The Problem of Positioning

Another option is to do away with using inline/anchored objects at all. After all, if you’re using the Structure pane, you don’t really need to anchor anything in the text. The trick here is to tag all your objects (text frames and graphic frames, perhaps with the Add Untagged Items feature; AND tag all your paragraphs (usually using Map Styles to Tags feature).

After everything is tagged, all your paragraphs and images appear in the Structure pane. Then you can drag the elements around in the Structure pane until you get the order right. There are a few problems with this:

  • It’s a pain in the neck to figure out where the captions should go in the structure — that is, where to drag the images and captions. You can make this a little easier by choosing Show Text Snippets from the Structure pane menu. (These “snippets” have nothing to do with the other kind of InDesign snippets; these snippets just display the first few words of each paragraph in the Structure pane.) Also, note that when you select a frame or paragraph on the page, it becomes underlined in the Structure pane. So look for those little underlines! Here’s a picture of a caption and figure element dragged between a paragraph and a heading:

  • If you have long stories (like a chapter in a book), it’s a major pain to find and select the figure and caption in the Structure pane, then drag those elements where you want them, and so on. You can do it, but you will quickly find yourself in a really bad mood.
  • It’s also problematic if the text is going to be edited. It’s easy for the XML tags to get messed up if people are editing the text inside InDesign. So if you’re going this route, make sure the tagging and positioning are done at the end of the production process.
  • And lastly, if your document is actually built with XML (that is, if you actually do have an XML workflow), then you really, really don’t want to mess around with the elements in the Structure pane. That is, the EPUB feature ties in to this XML feature, but it’s not really designed for people who are actually using XML!

So while the Structure panel method is a good one in theory, I’m not finding it as useful in practice. I think of it more of a short-term “hack” that can work in certain situations, but fails in many others.

What do you think? Do you like the Structure pane method or the Page Layout method? Both have pros and cons, obviously. Or do you just throw up your hands, export an EPUB and rearrange it all in some other program, such as Sigil or Oxygen?

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, CreativePro Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at LinkedIn Learning ( are among the most watched InDesign training in the world. [addbr]You can find more about David at[addbr]Follow on LinkedIn here
  • David, you didn’t mention that if we want to use the Structure pane with layers where there are many versions/languages… it is just impossible to autotag, and even if you try it, you will end up in a big mess.

  • Mike Rankin says:

    One little tip on EPUB content order that may help if you’re using Base on Page Layout: use groups to your advantage.

    Since the bounding box of the group is what determines the content order, you can create a new empty frame and group it with a frame that you need to move up in the content order. For example, if you want a story to appear earlier in the content order, group it with a new empty frame that sits to the left of other content. Grouping with empty frame doesn’t any junk code like extra divs either.

    Like this:

    Obviously it’s a hack, not a silver bullet. But it’s something.

  • We’ve settled on using Base on Page Layout only. Our books involve such complex layouts that there is really no other way to go to EPUB efficiently except to take the print layout when it is done and completely rework it for EPUB. The amount of extra work and care that goes on making a layout that is dual-purpose seems excessive to me, but that may be because I haven’t really tried to make it work yet because all the projects so far that we are working on getting into EPUB have gone to press long ago and we are just repurposing into this new electronic format.

    Another thing about Base on Page Layout is that I have found it virtually impossible to control certain things in the CSS unless every chapter of the book is truly one singular story, with everything that needs to be there in that one story. If one part of a chapter happens to be in one story and then there are graphical layout elements followed by the rest of the chapter in another story, for example, you can’t use if-this-comes-before/after CSS rules on a paragraph at the beginning of that second story. Or you can just rely on doing a lot of work in the XHTML code itself, moving or deleting div stops and starts around to ensure that your CSS isn’t going to get broken. But I’m really trying to get things coming out of InDesign in as finished a state as possible.

  • Frustrating as it is, these considerations are why I am still doing a totally separate EPUB version and moving all sidebars, captions, and images inline.

    Maybe the next version of InDesign will do better.

  • To achieve a workflow to “build once and publish to many” – the InDesign options (fixed & flowable) does not seem to work seamlessly. The amount of work involved to handle the epub after it is exported from InDesign depends on the complexity of the design as one variable and the options given by InDesign as another variable.

    At this point in time (CS 5.5), I do not find any great value for this feature excepting that we can try and minimize (through trial and error), and see how much of an adjustment in InDesign would help to reduce the extra work involved on the epub after it is exported.

    Due to schedule pressures, production staff prefer to handle the epub externally after exporting the layout from InDesign as it is and take advantage of whatever they could salvage. Once exported into ePub, post operative corrections, if any, needs to be done on both the files separately (on InDesign file for print and on epub file using Sigil / Oxygen), to avoid any re-creation efforts on epub.

    In essence, “build once and publish to many” does not work in CS5.5…. especially for design intensive pages…

    Wonder if we can look forward for better solutions in CS6?

  • Rusty says:

    I’m actually using XML to move catalog data from a full catalog layout to a mini catalog version. The problem I’m having is that if the order of the items in the catalog changes then my XML is not in the correct order. Each Story has a header that is it’s order position in the layout. What would be the best method of making sure the order stays correct. Should I expand the nodes and move them in the structure view or would this best be accomplished with xslt?

  • Mike Rankin says:

    To reduce spam, comments have been closed for this post. If you want to start a related discussion, head over to the Forums and create a new topic.

  • >