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

Apply different formatting to different TOC entry levels

Specify that different entry levels of the Table of Contents should have a different appearance.

As a refresher, if you’re not clear on how the PDF plugin determines TOC levels, take a look at Title levels in bookmaps and ditamaps.

  1. In toc-attr.xsl, locate the following code:
    <xsl:attribute-set name="__toc__topic__content">
       <xsl:attribute name="last-line-end-indent">-22pt</xsl:attribute>
       <xsl:attribute name="end-indent">22pt</xsl:attribute>
       <xsl:attribute name="text-indent">-.2in</xsl:attribute>
       <xsl:attribute name="text-align">left</xsl:attribute>
       <xsl:attribute name="text-align-last">justify</xsl:attribute>
       <xsl:attribute name="font-size"> <xsl:variable name="level" select="count(ancestor-or-self::* ...

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