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 7, “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 userinput 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 userinput:
<xsl:template match="userinput" mode="no.anchor.mode"> <xsl:apply-templates select="." /> </xsl:template>If you want to trace this through the templates:
Processes <section> with mode="toc" in autotoc.xsl. That applies templates in mode="title.markup".
Matches on <section> in mode="title.markup" in titles.xsl. That sets variable $title to the content of the <title> element. Applies templates on $title in mode="title.markup".
Matches on title in mode="title.markup" in titles.xsl. Applies templates in mode="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 regular userinput template to the element instead.
So, here's the customization that does this for filename, sgmltag, userinput, and varname elements:
<xsl:template match="filename|sgmltag|userinput|varname"
mode="no.anchor.mode">
<xsl:apply-templates select="." />
</xsl:template>
|