h1, h2, etc.) and everything else as a p element. In both cases, the name of the style in InDesign is used as the class for the element in the XTML. So far, so good.The only problem is that it seems to get the spacing (
text-indent and margin properties) all messed up when it exports headers.Here's the specs for the header paragraph style as defined in InDesign:
If I export to ePub without using the TOC (and thus without converting this paragraph into a "header"), I get the following reasonable CSS approximation of the style. Notice the 1/2" space before, and right and left margins, are converted to 1em, and the 4" are converted to 8em. That makes sense.
p.header { font-family: "Cochin";
font-weight: bold;
font-style: normal;
font-size: 3em;
line-height: 1.20em;
text-decoration: none;
font-variant: normal;
text-indent: 0em;
text-align: center;
color: #1c910a;
margin: 1em 1em 8em 1em;}But if I export to ePub using the TOC, I get this:
h1.header { font-family: "Cochin";
font-weight: bold;
font-style: normal;
font-size: 3em;
line-height: 1.20em;
text-decoration: none;
font-variant: normal;
text-indent: 0em;
text-align: center;
color: #1c910a;
margin: 0.01em 0.01em 0.11em 0.01em;
}Notice the difference in the values for margin. They're completely messed up. I don't know if InDesign is trying to compensate for some dubious default font size for the
h1 element, or what, but it's not effective. The difference in the output is universal, from Adobe Digital Editions, to web-based ereaders, to iBooks, and must be manually fixed. (Because if you don't choose the TOC style, you won't get a navigational menu.)