InDesign EPUB Export Oddities

  • Sumo

Why do I dig into the HTML and CSS after an InDesign export? Well, because of oddities like the following.

CSS not called out in cover.xhtml, toc.xhtml

I noticed that the InDesign-generated toc.xhtml (top) and cover.xhtml (bottom) do not have the CSS called out in the <head>.

Screen Shot 2016-01-08 at 3.39.23 PM

Screen Shot 2016-01-08 at 3.39.40 PM

I usually use my own CSS, so I thought InDesign didn’t spec a CSS in the <head> because of that. Then I exported a book using InDesign-generated CSS, and came up with the same problem.

One other thing: InDesign decides to use inline styling in the cover.xhtml.

So what do I do? I add the CSS to the <head> (see below). And in the cover.xhtml, I remove the inline styling and use CSS styling as for any other image in the book.

An advantage of linking the CSS to the TOC is that you can then style it for use as the internal contents listing as well as for the navigational TOC; this body-of-the-book TOC is required by Amazon.

Screen Shot 2016-01-08 at 3.43.37 PM

List collapse

Do you use InDesign’s bulleted and numbered list features? You should, instead of manually entering bullets or numbers in lists. InDesign has very fine list controls, so get to know them.

One issue on export, though, is that InDesign sometimes collapses lists, or at least doesn’t close them where they should end. So, unintended text is captured in the list (creating further and further indents).

Screen Shot 2016-01-08 at 3.54.09 PM

Here, the <ul> list begins on line 14, and should end where the next <p class=”text”> begins (line 18, 4th line down).

Instead, the list closes way down at the end of this string of <p> and <h1> tags on line 19.

In this case, I created the bulleted list using InDesign’s bulleted list feature, and assigned a paragraph style to the text. I’m not sure why this happens. In fact, it doesn’t always happen.

And in case you were wondering, I chose Map to Unordered Lists in the EPUB export process.

Screen Shot 2016-01-08 at 3.53.36 PM

If you’re seeing some list oddity, take a look at where the <ul> or <ol> close.


One Response to “InDesign EPUB Export Oddities”

  1. Mary Kirkpatrick says:

    Kevin, Thanks so much for this informative post. I appreciate hearing details on what needs to be done after the InDesign export. Could you also post the screen shot of how you edited cover.xhtml?

Leave a Reply

Your email address will not be published. Required fields are marked *