Probably the most useful EPUB export option in the world: Export Tagging in InDesign

If you are utilising paragraph and character styles in InDesign, then you needn't suffer spans and p tags in your exported EPUBs. Instead you can take control using the same paragraph and character style panels as you use for defining the styles themselves.


Simply select 'Export Tagging' from the lefthand list and you will see the above dialog box. Here you can select (or type) an HTML tag into the Tag box (to override the automatic assignment by InDesign) and a class into the Class box. (If you omit a class name, your original Style Name will be used.)

You'll also notice the Emit CSS box. Unchecking this box will prevent CSS from being created for the style.

Limitations

Having these options is a great way to reduce span tags, so we have <i> instead of <span class="italics"> and we can also use the correct HTML tags like <blockquote> instead of <p class="blockquote"> but what if we want the HTML to follow the structure:

<blockquote>
<p>
</p>
</blockquote>


You could hack it and create a character style that maps to <p> inside the blockquote, but you wouldn't then be able to include another character style inside the <p> tags, so there's no way (I know of) to achieve this:

<blockquote>
<p>
<i></i>
</p>
</blockquote>


Note: There's also no obvious way to have no class whatsoever applied to your tags, they must have a class, there is no [None].

Further limitations

All of this helps us control the EPUB output, but it would be even better if we could add id and epub:type attributes.

Currently there's no way to carry these over from the XML or add them in any other way (is there?). And one obvious area where they would be useful is to add id tags to endnotes. Since it's all very well taking advantage of the automated footnote output options, but if you use endnotes, then as has been the case with endnotes in InDesign for far too long, you are on your own!

Further Reading

InDesign CC | EPUB Enhancements (Caveat Lector, Adobe Blog)

InDesign to EPUB Export Basics: General Settings (EPUBSecrets)


Endorse on Coderwall

Comments