O'Reilly logo

DITA for Print by Leigh W. White

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adjust indents for TOC entries

Determine the amount of space that second- (and third-, etc.) level TOC entries are indented below main entries.

Adjusting TOC indents is one of those thing that’s easy to do once you understand how it works, but understanding it is not exactly straightforward. So let’s untangle it a little bit.
  1. In toc-attr.xsl, find the __toc__topic__content attribute set.
  2. Note the following attribute:
    <xsl:attribute name="text-indent">-<xsl:value-of select="$toc.text-indent"/></xsl:attribute>

    This attribute is not what you want to use to control indents. It actually shifts the entire TOC to the left or right, depending on the value of the attribute. Consider this snippet of the TOC, with the text-indent attribute set to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required