InDesign EPUB Export Oddities
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>.
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.
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).
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.
If you’re seeing some list oddity, take a look at where the <ul> or <ol> close.