Formatting print indexes

There are several features of print index formatting that you can customize:

The stock format for DocBook indexes is two columns with a 12pt column separation. These features are controlled by the index.column.count parameter and the parameter, respectively. If you set the index.column.count parameter to 3, for example, your print index will have three columns per page.

The titles in a print index include the main index section title, and the titles for the letter subdivisions. The main title is controlled by the titlepage specifications file that generates titlepage templates. See the section “Title page spec file” to learn how to customize the titlepage specs and generate new templates. The main title is controlled by the specifications for t:element="index". The letter subdivision titles in an index are controlled by the attribute-set (starting with version 1.68).

You can change the way index entries format by using the attribute-set, introduced in version 1.68 of the stylesheets. That attribute-set is applied to the block containing each index entry. By default, this attribute-set is empty. The most common change is to reduce the type size and line spacing so the index uses fewer pages:

<xsl:attribute-set name="">
  <xsl:attribute name="font-size">8pt</xsl:attribute>
  <xsl:attribute name="line-height">8pt</xsl:attribute>

You can also control the typography of the preferred page number if you use that feature. Preferred page numbers are designated by putting significance="preferred" attributes on selected indexterm entries in your document. The page numbers for such preferred references are formatted using the attribute-set. By default, that attribute-set changes such page numbers to bold. You can change that to italic by adding this to your customization layer:

<xsl:attribute-set name="">
  <xsl:attribute name="font-weight">normal</xsl:attribute>
  <xsl:attribute name="font-style">italic></xsl:attribute>