Lists in ePub generated from InDesign CS6

Recently, I wrote an article for InDesign Magazine titled “What’s New with ePub in CS6?” (Issue #48 – June/July 2012). In that article, I include a section called “Support for Custom Bullet and Numbering Marker Strings”. For the purposes of the article, I only included the part of this update that “works”, which is complicated numbered lists retaining their intended numbering when exported to ePub. Unfortunately, the solution that the Adobe engineers came up with to solve this problem ends up breaking (pretty much) everything else about numbered and bulleted lists.

For a great explanation of the actual problem, followed by some fantastic solutions, see Liz Castro’s post on the subject.

Since Liz’s explanation and solutions are (pretty much) exactly my thoughts, I will not bother to duplicate them here. Instead, I will use this space to elaborate on some of my other thoughts and suggestions for Adobe.

What was Adobe thinking?

Since the introduction of ePub export from InDesign (way back in CS3), one of my constant complaints was the fact that I could not get complicated numbered lists to export correctly to ePub. I have many books in my workflow that are loaded with complicated lists. (My current workaround for these lists is to select the option to “Convert Numbered Lists to Text”. However, I do not prefer this option, because I want my lists to be valid HTML lists, which these are not)

For clarification, here is an example of a simple list (through CS5.5, these lists export to ePub just fine):

  1. First list item
  2. Second list item
  3. Third list item
  4. Fourth list item
  5. Fifth list item

And here is an example of a complicated list:

  1. First list item
    Additional paragraph to extend the content for the first list item.
  2. Second list item
  3. Third list item
    Additional paragraph to extend the content for the third list item.
    A second paragraph to extend the content for the third list item.
  4. Fourth list item
    1. Sublisting under the Fourth list item
    2. Sublisting under the Fourth list item
    3. Sublisting under the Fourth list item
  5. Fifth list item

With CS6, the Adobe engineers attempted to come up with a creative solution to maintain proper numbering when dealing with these types of more complex numbered lists. As I mentioned before, this solution solves the problem of complicated list numbering, but creates a whole bunch of other problems, including bad code and double bullets (in bulleted lists).

Here is an example of the (above) complicated list, when exported to ePub via InDesign CS5.5 (or earlier):


The list, exported to ePub via InDesign CS5.5, and displayed using Adobe Digital Editions

And here is the html from that ePub file:


View of the HTML code contained in the CS5.5-generated ePub file

As you can see, when the list is viewed in your ePub reader, it is broken in a way that makes the numbering useless.
The code is pretty clean, except for one key issue (which I will explain in a minute).

Here is the same list, when exported to ePub via InDesign CS6:


The list, exported to ePub via InDesign CS6, and displayed using Adobe Digital Editions

And here is the xhtml from that ePub file:


View of the XHTML code contained in the CS6-generated ePub file

As you can see here, the list looks good when viewed in an ePub reader, but the code is awful and does not translate well.

Though I believe their hearts were in the right place, the direction that the Adobe engineers took (with CS6), was the wrong one.

Suggested Solution

I suggest that Adobe goes back to how Lists were exported to ePub in CS5.5 (and earlier), but with one minor change. If you look at the HTML code from the CS5.5 generated ePub again, you will notice that Ordered Lists (<ol></ol>) keep resetting, because InDesign does not know what to do with them:

Too Many ols

The “ol” tags (circled in red) are causing the list to constantly be reset

These need to be treated as “single” listings, and not broken up into smaller lists. This is the reason that the numbering does not continue correctly.

Here is what the code would look like with the unnecessary <ol>s removed:

Correct Code

The opening/closing “ol” tags should dictate the beginning and ending of the full numbered listing

And here is what the resulting list now looks like in your ePub reader:

Correct ADE

Properly formatted ePub listing, viewed in Adobe Digital Editions

As you can see here, the code is cleaner and the resulting complicated list is numbered correctly. In this example, the indents are not ideal, but that can be fixed by tweaking the stylesheet (CSS).

Challenge for Adobe

The challenge here is that, there is no good way for InDesign to know when a complicated list is intended to end. For simple lists, it is easy: when there are no more list items, the that list is ended.

For these more complicated lists, you may have unnumbered paragraphs, inline figures, or other elements included within the numbering. The engineers at Adobe will need to come up with a way to call this out.

I welcome any and all feedback regarding this issue.



Preparing your InDesign files for ePub export

A few years ago, I did a presentation on “Preparing your InDesign files for ePub export”.

At the time, CS4 was the most recent incarnation of InDesign. As we all know by now, the ePub export functionality in that version was pretty flawed, but significantly better than it was in CS3.

There was not very much improvement with the release of InDesign CS5, but version CS5.5 brought the whole thing to a new level.

The ePub-specific enhancements with the release of CS5.5 include:

  • The new Articles Panel
  • Style Export Tagging
  • Much improved ePub Export Dialog
  • etc.

With that said, I have gone ahead and updated my presentation to include these very helpful additions to Adobe InDesign CS5.5.

Click here to download the PDF. I also included an updated list of References and Resources at the end.

I hope you find this information helpful.