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 -->
12 <xsl:text>\setmainfont[BoldFont={CrimsonText-Bold}]{Crimson Text} </xsl:text>
14 <!-- Use a font that has smallcaps -->
15 <xsl:text>\newfontinstance\scshape[Letters=SmallCaps,Scale=1.15]{Crimson} </xsl:text>
17 <!-- Use a smaller font except for the letter heading which is bold -->
18 <xsl:text>\newfontfamily\indexfont[Scale=0.7,
19 BoldFeatures={Scale=1}]{Crimson Text} </xsl:text>
22 <xsl:param name="xetex.font.alegreya">
23 <xsl:text>\setmainfont[SmallCapsFont={Alegreya SC}]{Alegreya} </xsl:text>
24 <xsl:text>\setsansfont{Alegreya Sans} </xsl:text>
25 <xsl:text>\setmonofont{DejaVu Sans Mono} </xsl:text>
27 <!-- Use a smaller font except for the letter heading which is bold -->
28 <xsl:text>\newfontfamily\indexfont[Scale=0.7,
29 BoldFeatures={Scale=1}]{Alegreya} </xsl:text>
32 <xsl:param name="xetex.font.gandhi">
33 <xsl:text>\setmainfont[SmallCapsFont={Alegreya SC}]{Gandhi Serif} </xsl:text>
34 <xsl:text>\setsansfont{Gandhi Sans} </xsl:text>
35 <xsl:text>\setmonofont{DejaVu Sans Mono} </xsl:text>
37 <!-- Use a smaller font except for the letter heading which is bold -->
38 <xsl:text>\newfontfamily\indexfont[Scale=0.7,
39 BoldFeatures={Scale=1}]{Gandhi Serif} </xsl:text>
42 <xsl:param name="xetex.font">
44 <xsl:when test="$book.font = 'crimson'">
45 <xsl:value-of select="$xetex.font.crimson"/>
47 <xsl:when test="$book.font = 'gandhi'">
48 <xsl:value-of select="$xetex.font.gandhi"/>
50 <xsl:when test="$book.font = 'alegreya'">
51 <xsl:value-of select="$xetex.font.alegreya"/>
54 <!-- Fallback to the default Crimson font -->
55 <xsl:value-of select="$xetex.font.crimson"/>
61 <!-- Do it the hard way: put this content in a file loaded by \maketitle -->
62 <xsl:template match="colophon">
63 <xsl:variable name="titlepage.verso">
64 <xsl:text>\begin{colophon} </xsl:text>
65 <xsl:apply-templates/>
66 <xsl:text>\end{colophon} </xsl:text>
68 <xsl:call-template name="write.text.chunk">
69 <!-- The filename must end with 'input.rtex' to be parsed by dblatex -->
70 <xsl:with-param name="filename">
71 <xsl:text>titlepg.input.rtex</xsl:text>
73 <xsl:with-param name="method" select="'text'"/>
74 <xsl:with-param name="content">
75 <xsl:value-of select="$titlepage.verso"/>
77 <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
81 <!-- French typography requises the surname of the cited authors being in
83 <xsl:template match="footnote//personname">
84 <xsl:apply-templates/>
87 <xsl:template match="footnote//surname">
88 <xsl:variable name="lang">
89 <xsl:call-template name="l10n.language"/>
93 <xsl:when test="$lang='fr'">
94 <xsl:text>\textsc{</xsl:text>
95 <xsl:apply-templates/>
96 <xsl:text>}</xsl:text>
99 <xsl:apply-templates/>