2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
4 <xsl:param name="book.font" select="'crimson'"/>
6 <xsl:param name="xetex.font.crimson">
7 <xsl:text>\setmainfont{Crimson Text} </xsl:text>
8 <xsl:text>\setsansfont{Crimson Text} </xsl:text>
9 <xsl:text>\setmonofont{Latin Modern Mono} </xsl:text>
11 <!-- Force <emphasis role='strong'> to be bold, not semibold -->
13 <xsl:text>\setmainfont[BoldFont={CrimsonText-Bold}]{Crimson Text} </xsl:text>
16 <!-- Use a font that has smallcaps -->
18 <xsl:text>\newfontinstance\scshape[Letters=SmallCaps,Scale=1.15]{Crimson} </xsl:text>
20 <!-- Use a smaller font except for the letter heading which is bold -->
22 <xsl:text>\newfontfamily\indexfont[Scale=0.7,
23 BoldFeatures={Scale=1}]{Crimson Text} </xsl:text>
27 <xsl:param name="xetex.font.alegreya">
28 <xsl:text>\setmainfont[SmallCapsFont={Alegreya SC}]{Alegreya} </xsl:text>
29 <xsl:text>\setsansfont{Alegreya Sans} </xsl:text>
30 <xsl:text>\setmonofont{DejaVu Sans Mono} </xsl:text>
32 <!-- Use a smaller font except for the letter heading which is bold -->
33 <xsl:text>\newfontfamily\indexfont[Scale=0.7,
34 BoldFeatures={Scale=1}]{Alegreya} </xsl:text>
37 <xsl:param name="xetex.font.gandhi">
38 <xsl:text>\setmainfont[SmallCapsFont={Alegreya SC}]{Gandhi Serif} </xsl:text>
39 <xsl:text>\setsansfont{Gandhi Sans} </xsl:text>
40 <xsl:text>\setmonofont{DejaVu Sans Mono} </xsl:text>
42 <!-- Use a smaller font except for the letter heading which is bold -->
43 <xsl:text>\newfontfamily\indexfont[Scale=0.7,
44 BoldFeatures={Scale=1}]{Gandhi Serif} </xsl:text>
47 <xsl:param name="xetex.font">
49 <xsl:when test="$book.font = 'crimson'">
50 <xsl:value-of select="$xetex.font.crimson"/>
52 <xsl:when test="$book.font = 'gandhi'">
53 <xsl:value-of select="$xetex.font.gandhi"/>
55 <xsl:when test="$book.font = 'alegreya'">
56 <xsl:value-of select="$xetex.font.alegreya"/>
59 <!-- Fallback to the default Crimson font -->
60 <xsl:value-of select="$xetex.font.crimson"/>
66 <!-- Do it the hard way: put this content in a file loaded by \maketitle -->
67 <xsl:template match="colophon">
68 <xsl:variable name="titlepage.verso">
69 <xsl:text>\begin{colophon} </xsl:text>
70 <xsl:apply-templates/>
71 <xsl:text>\end{colophon} </xsl:text>
73 <xsl:call-template name="write.text.chunk">
74 <!-- The filename must end with 'input.rtex' to be parsed by dblatex -->
75 <xsl:with-param name="filename">
76 <xsl:text>titlepg.input.rtex</xsl:text>
78 <xsl:with-param name="method" select="'text'"/>
79 <xsl:with-param name="content">
80 <xsl:value-of select="$titlepage.verso"/>
82 <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
86 <!-- French typography requises the surname of the cited authors being in
88 <xsl:template match="footnote//personname">
89 <xsl:apply-templates/>
92 <xsl:template match="footnote//surname">
93 <xsl:variable name="lang">
94 <xsl:call-template name="l10n.language"/>
98 <xsl:when test="$lang='fr'">
99 <xsl:text>\textsc{</xsl:text>
100 <xsl:apply-templates/>
101 <xsl:text>}</xsl:text>
104 <xsl:apply-templates/>