[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Chapter, Appendix, and Part headings in TOC?
Charlie
Try this, this will set the string 'Appendix' in the TOC to what you want.
Similarly for Chapter - sorry no time just now to spell it out.
Ron
<!-- set labels for appendices in the table of contents -->
<!-- ==================================================================== -->
<xsl:template name="toc.line">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<xsl:variable name="label">
<xsl:choose>
<xsl:when test="self::appendix">
<xsl:call-template name="gentext">
<xsl:with-param name="key">appendix</xsl:with-param>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:apply-templates select="." mode="label.markup"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="label.markup"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:block text-align-last="justify"
text-align="start"
end-indent="{$toc.indent.width}pt"
last-line-end-indent="-{$toc.indent.width}pt">
<fo:inline keep-with-next.within-line="always">
<fo:basic-link internal-destination="{$id}">
<xsl:if test="$label != ''">
<xsl:copy-of select="$label"/>
<xsl:value-of select="$autotoc.label.separator"/>
</xsl:if>
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
</fo:basic-link>
</fo:inline>
<fo:inline keep-together.within-line="always">
<xsl:text> </xsl:text>
<fo:leader leader-pattern="dots"
leader-pattern-width="3pt"
leader-alignment="reference-area"
keep-with-next.within-line="always"/>
<xsl:text> </xsl:text>
<fo:basic-link internal-destination="{$id}">
<fo:page-number-citation ref-id="{$id}"/>
</fo:basic-link>
</fo:inline>
</fo:block>
</xsl:template>
<!-- ==================================================================== -->
<!-- turn on chapter numbering - 1, 2, 3 ... -->
<xsl:param name="chapter.autolabel" select="1" />
>Hi,
>
>I've been trying to find the answer to this questions because it seems
>like an easy one, but I just can't find the parameter that controls
>it. I'm trying to generate the TOC with entries like
>
>Chatper 1. How to get Your Skeletons Their Whitest.
>Chapter 2. Selling Your Soul In a Buyers' Market.
>Chatper 3. How to Raise the Dead
>Appendix A. Pet Cemetary Rules and Regulations
>
>Right now all I get by default is:
>
>1. How to get Your Skeletons Their Whitest.
>2. Selling Your Soul In a Buyers' Market.
>3. How to Raise the Dead
>A. Pet Cemetary Rules and Regulations
>
>What template generates this?
>
>Thanks
>Charlie
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
--
Ron Catterall, Phd, DSc email: ron@catterall.net
Prolongacion de Hidalgo 140 http://catterall.net/
San Felipe del Agua tel: +52 951 520 1821
Oaxaca 68020 Mexico fax: +1 530 348 8309
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]