Hi Erik,
Setting a completely empty 'generate.toc' param is a little too much it
seems. Instead of:
<xsl:param name="generate.toc"/>
use one that specifies only the title for a book toc:
<xsl:param name="generate.toc">
book title
</xsl:param>
That will generate the title for the relocated toc, with one glitch. If you
are using the default 'header.content' template for your page headers, you
will get a couple of warning messages about "Request for title ...". That's
because the header template is trying to process the toc element (which has
its own page sequence) to get a title for the header. But the stylesheet is
missing a template matching on "toc" in mode="title.markup". The following
template fixes that problem, and I will add it to the next release.
<xsl:template mode="title.markup" match="toc">
<xsl:param name="allow-anchors" select="0"/>
<xsl:param name="verbose" select="1"/>
<xsl:choose>
<xsl:when test="title|info/title">
<xsl:apply-templates select="(title|info/title)[1]"
mode="title.markup">
<xsl:with-param name="allow-anchors" select="$allow-anchors"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'TableofContents'"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Bob Stayton
Sagehill Enterprises
b...@sagehill.net
--------------------------------------------------
From: "Erik Leunissen" <e.leunis...@hccnet.nl>
Sent: Monday, October 28, 2013 2:08 PM
To: <docbook-apps@lists.oasis-open.org>
Subject: [docbook-apps] Title of a toc, when toc is generated at a
user-specified position
When choosing to place the TOC of a book after the book's preface, it
appears that one loses[*] the TOC's generated title as a side-effect. That
is, when following the recipe in this URL:
https://lists.oasis-open.org/archives/docbook-apps/200705/msg00023.html
What's the best approach to make this TOC have a title nonetheless?
Thanks in advance,
Erik Leunissen (xsltproc - fop1.1 -> pdf)
--
[1] Adding a title to toc in the xml source makes the toc element
non-empty, which effectively disables the "process.empty.source.toc"
parameter.
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org