$v:title-properties
$v:title-properties — Controls how titles are formatted.
Synopsis
|<xsl:variable name="v:title-properties"
| as="element()+">
| <xsl:sequence select="$v:user-title-properties"/>
| <title xpath="self::db:section[ancestor::db:preface]" label="false"/>
| <title xpath="self::db:section[parent::db:section]"
| number-format="{$section-numbers}"
| inherit="{$section-numbers-inherit}"/>
| <title xpath="self::db:section"
| number-format="{$section-numbers}"
| inherit="{$component-numbers-inherit}"/>
| <title xpath="self::db:sect1"
| number-format="{$section-numbers}"
| inherit="{$component-numbers-inherit}"/>
| <title xpath="self::db:sect2|self::db:sect3|self::db:sect4|self::db:sect5"
| number-format="{$section-numbers}"
| inherit="{$section-numbers-inherit}"/>
| <title xpath="self::db:refsection|self::db:refsect1|self::db:refsect2|self::db:refsect3"/>
| <title xpath="self::db:article"/>
| <title xpath="self::db:preface"/>
| <title xpath="self::db:chapter"
| number-format="1"
| label="true"
| inherit="{$division-numbers-inherit}"/>
| <title xpath="self::db:appendix"
| number-format="A"
| label="true"
| inherit="{$division-numbers-inherit}"/>
| <title xpath="self::db:part"
| label="true"
| number="true"
| number-format="I"/>
| <title xpath="self::db:reference" number-format="I"/>
| <title xpath="self::db:figure|self::db:table|self::db:equation|self::db:example"
| label="true"
| number-format="1"
| inherit="true"/>
| <title xpath="self::db:formalgroup"
| label="true"
| number-format="1"
| inherit="true"/>
| <title xpath="self::db:step|self::db:listitem[parent::db:orderedlist]"
| label="false"
| number="false"
| inherit="true"/>
| <title xpath="self::db:glosssee|self::db:glossseealso" label="true"/>
| <title xpath="self::db:see|self::db:seealso" label="true"/>
| <title xpath="self::db:question|self::db:answer" label="true" title="true"/>
| <title xpath="self::*"/>
|</xsl:variable>
Description
Titles are complicated. They occur all over the place (on books, on chapters, on sections, on figures, on formal paragraphs, etc.) and they need to be rendered differently in different contexts. You are always free to write your own templates to completely customize the formatting, but the stylesheets provide five declarative properties that you can select for each title. As long as your formatting requirements are satisfied by these properties, you don’t have two write custom templates to do the formatting.
The properties are label, number, number format, inherit, and “label-toc”. Consider the title in Figure 1.1, Title Properties.
This image shows the title “Section 3.4 Changing the print head” identifying “Section” as the label, “3.4” as the number, and “3.” as the inherited number.
For any title context, identified by an XPath expression, you
can set the label
and number
properties to specify whether or not those elements should appear.
If inherit
is true, the number of the parent element
is included (so the figure might be section 4 in chapter 3, for example).
The number-format
property determines what style
of numeration is used (arabic, lower- or upper-alpha, or lower- or
upper-roman, for example).
The last property, label-toc
, determines whether
or not the label appears in the table of contents. This can be used, for example,
to suppress the label “Figure” at the beginning of every figure in a list
of figures.
The stylesheets search this list sequentially and the first match
is used. Observe that $v:user-title-properties
always comes
first; if you want to override the default values, you can put your overrides
in there. You do not have to redefine the entire list.