Wednesday, March 28, 2012

Kindle ignores everything when ID gives it multiple classes

I'm about to publish an anthology of stories based in Barcelona (more news soon!) and keep bumping into an annoying issue with (old) Kindle: if your InDesign document contains a styled paragraph with local formatting, InDesign will export the resulting EPUB with multiple classes, one for the base style and one "override" class with the extra bits. Unfortunately, Kindle throws up its hands at multiple classes and not only ignores the extra classes but actually ignores the base class as well, leaving the paragraph with no formatting at all. Ugh.

Here's an example from my new book.

Kindle-multiple classes

The paragraph that begins "Moving between the shadows" has no styling. It should be in italics with no indent, as shown in iBooks:

iBooks - multiple classes

I go look at the code, and find that InDesign has added an "override" style:

code-multiple classes

Why? Because I had added some local formatting in the original InDesign file. Oops. (You can tell by putting your cursor in a paragraph and looking at the Paragraph Styles panel... if there's a plus sign next to the style name, there's local formatting.)

InDesign-local formatting

Really, InDesign is completely within its rights by exporting multiple classes, they are perfectly standard. It is Kindle that is at fault here.

The easiest solutions is to avoid local formatting. This is a good idea in general, although I'll admit that when I just need to nudge something in my print version, I am not always strictly orthodox.

If you forget, and/or don't want to go back and change the print version, the second solution is to create a new style that contains the characteristics from the two applied styles, and apply it both to the HTML and to the CSS. Kindle can't say no to that.


In general, I recommend doing a search through your XHTML files in an InDesign-generated EPUB document to find all of the override classes. Then, substitute them with better-labeled and less troublesome individual styles.

Also note that it is "old" Kindle that can't handle multiple classes, Kindle Fire supports them just fine.


  1. I uncheck "preserve local overrides," and I specifically use local overrides for stuff I don't want exported to epub, like tracking and kerning and stuff like that. When used that way, I actually prefer using local overrides.

  2. HI, what about the addition of -1, -2 after class names, which seems to arise from having the same style name but different definitions among files used in an InDesign book? I have tried to figure out why synchronization in the book doesn't seem to eliminate these extra styles, but haven't found the definitive cure. Any suggestions?


More of my books