The main customization for title pages is to include the
generated html-titlepage.xsl
template that came out of the title page customization
process; see Section 8, “html-titlepage.xml:
HTML title page template”.
<xsl:include href="html-titlepage.xsl"/>
This next bit is high wizardry. We often use tags such as
code and filename inside section and subsection
titles. With the stock stylesheets, text marked up with
these tags uses ordinary fonts. It wasn't obvious to me
how to fix this, so I wrote to Bob Stayton, and got back
this highly useful reply:
It certainly isn't obvious, but this customization will achieve what you want for
codeanduserinput:<xsl:template match="code|userinput" mode="no.anchor.mode"> <xsl:apply-templates select="." /> </xsl:template>If you want to trace this through the templates:
Processes
<section>withmode="toc"inautotoc.xsl. That applies templates inmode="title.markup".Matches on
<section>inmode="title.markup"intitles.xsl. That sets variable$titleto the content of the<title>element. Applies templates on$titleinmode="title.markup".Matches on
titleinmode="title.markup"intitles.xsl. Applies templates inmode="no.anchor.mode".The
'no.anchor.mode'prevents links and index entries. There are no templates in such mode for inlines, so it defaults to outputting just the text content of the element. The customization above applies the regularuserinputorcodetemplate to the element instead.
So, here's the customization that does this for
filename, sgmltag, userinput, code, and varname elements:
<xsl:template match="filename|sgmltag|userinput|varname|code"
mode="no.anchor.mode">
<xsl:apply-templates select="." />
</xsl:template>