Headings are “unindented” by a fair amount to make them stand out from the body text. The default value in fo/param.xsl is -4pc (four picas). We decrease that to avoid running the titles too far into the margins.
<xsl:param name="title.margin.left">-3pc</xsl:param> |
The section.autolabel variable turns on section numbering, so that for example a subsection will have a number like 3.4.
<xsl:param name="section.autolabel" select="1"/> |
Next we set a number of properties of section titles. The section.title.level1.properties attribute set is for the largest, top-level titles. It inherits all the other attributes from the section.properties attribute set that defines properties common to section titles of all levels.
<xsl:attribute-set name="section.title.level1.properties"
use-attribute-sets="section.properties">
|
The TCC style mandates a fairly thick (1-point) rule under first-level section titles. This effect is achieved by using the border-bottom properties. Because the default border style is none, we have to specify both a style (solid) and a width.
<xsl:attribute name="border-bottom-style">solid</xsl:attribute> <xsl:attribute name="border-bottom-width">1pt</xsl:attribute> |
The first section title property we have to adjust is the font size. In the stock stylesheets, top-level titles have a font size of “mag step 4” (where each mag step is a factor of 1.2 larger than the previous size, so mag step 2 is 1.2 × 1.2 or a factor of 1.44), second-level titles are mag step 3, and third-level titles are mag step 2. This seems to us a bit larger, so we'll go down one whole mag step. The base value to which these magnifications are applied is body.font.master, which defaults to 10.
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.728"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
</xsl:attribute-set>
|
The attribute sets for second- and third-level headings are the same except for the font size multiplier.
<xsl:attribute-set name="section.title.level2.properties">
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.44"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section.title.level3.properties">
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 1.2"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
</xsl:attribute-set>
|