<xsl:value-of select="@label"/>
</xsl:when>
<xsl:when test="string($reference.autolabel) != 0">
+ <xsl:if test="$component.label.includes.part.label != 0 and
+ ancestor::part">
+ <xsl:variable name="part.label">
+ <xsl:apply-templates select="ancestor::part"
+ mode="label.markup"/>
+ </xsl:variable>
+ <xsl:if test="$part.label != ''">
+ <xsl:value-of select="$part.label"/>
+ <xsl:apply-templates select="ancestor::part"
+ mode="intralabel.punctuation"/>
+ </xsl:if>
+ </xsl:if>
<xsl:variable name="format">
<xsl:call-template name="autolabel.format">
<xsl:with-param name="format" select="$reference.autolabel"/>
</xsl:call-template>
</xsl:variable>
- <xsl:number from="book" count="reference" format="{$format}" level="any"/>
+ <xsl:choose>
+ <xsl:when test="$label.from.part != 0 and ancestor::part">
+ <xsl:number from="part" count="reference" format="{$format}" level="any"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number from="book" count="reference" format="{$format}" level="any"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:template>
</refmeta>
<refnamediv>
<refname>label.from.part</refname>
-<refpurpose>Renumber chapters in each part?</refpurpose>
+<refpurpose>Renumber components in each part?</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsection><info><title>Description</title></info>
-<para>If <parameter>label.from.part</parameter> is non-zero, components
-(<tag>chapter</tag>s, <tag>appendixe</tag>s, etc.)
-will be numbered from 1 in each <tag>part</tag>. Otherwise,
-they will be numbered monotonically throughout each
-<tag>book</tag>.
-</para>
+<para>If <parameter>label.from.part</parameter> is non-zero, then
+ numbering of components — <tag>preface</tag>,
+ <tag>chapter</tag>, <tag>appendix</tag>, and
+ <tag>reference</tag> (when <tag>reference</tag> occurs at the
+ component level) — is re-started within each
+ <tag>part</tag>.</para>
+<para>If <parameter>label.from.part</parameter> is zero (the
+ default), numbering of components is <emphasis>not</emphasis>
+ re-started within each <tag>part</tag>; instead, components are
+ numbered sequentially throughout each <tag>book</tag>,
+ regardless of whether or not they occur within <tag>part</tag>
+ instances.</para>
</refsection>
</refentry>