Hi
This is how I do the Appendix part:
<!-- 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::d: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="justify"
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> <!-- END
name="toc.line" -->
but see the earlier discussion:
Many apologies, the spaces have suddenly appeared - no idea
how, I didn't change anything. Forget previous email.
Ron
Bob
Thanks very much for the help, I have the Appendix labels almost
right now. The only thing is I can't get a space between
Appendix and A etc.
Ron
Hi Ron,
As you discovered, the default output for article/appendix is to
include a
label such as:
A. Title of the appendix
I need to update my book.
Regarding the customization, that variable needs to be inside the
customization of the template named toc.line. See the example in
the book.
Also, the call to the template named 'gentext' is what generates the
word
"Appendix" from the local file. You don't also need
the xsl:text element to
output Appendix.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net