<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
-<xsl:param name="xetex.font">
+
+<xsl:param name="book.font" select="'crimson'"/>
+
+<xsl:param name="xetex.font.crimson">
<xsl:text>\setmainfont{Crimson Text} </xsl:text>
<xsl:text>\setsansfont{Crimson Text} </xsl:text>
<xsl:text>\setmonofont{Latin Modern Mono} </xsl:text>
<!-- Force <emphasis role='strong'> to be bold, not semibold -->
<xsl:text>\setmainfont[BoldFont={CrimsonText-Bold}]{Crimson Text} </xsl:text>
+
+ <!-- Use a font that has smallcaps -->
+ <xsl:text>\newfontinstance\scshape[Letters=SmallCaps,Scale=1.15]{Crimson} </xsl:text>
+
+ <!-- Use a smaller font except for the letter heading which is bold -->
+ <xsl:text>\newfontfamily\indexfont[Scale=0.7,
+ BoldFeatures={Scale=1}]{Crimson Text} </xsl:text>
</xsl:param>
+<xsl:param name="xetex.font.alegreya">
+ <xsl:text>\setmainfont[SmallCapsFont={Alegreya SC}]{Alegreya} </xsl:text>
+ <xsl:text>\setsansfont{Alegreya Sans} </xsl:text>
+ <xsl:text>\setmonofont{DejaVu Sans Mono} </xsl:text>
+
+ <!-- Use a smaller font except for the letter heading which is bold -->
+ <xsl:text>\newfontfamily\indexfont[Scale=0.7,
+ BoldFeatures={Scale=1}]{Alegreya} </xsl:text>
+</xsl:param>
+
+<xsl:param name="xetex.font.gandhi">
+ <xsl:text>\setmainfont[SmallCapsFont={Alegreya SC}]{Gandhi Serif} </xsl:text>
+ <xsl:text>\setsansfont{Gandhi Sans} </xsl:text>
+ <xsl:text>\setmonofont{DejaVu Sans Mono} </xsl:text>
+
+ <!-- Use a smaller font except for the letter heading which is bold -->
+ <xsl:text>\newfontfamily\indexfont[Scale=0.7,
+ BoldFeatures={Scale=1}]{Gandhi Serif} </xsl:text>
+</xsl:param>
+
+<xsl:param name="xetex.font">
+ <xsl:choose>
+ <xsl:when test="$book.font = 'crimson'">
+ <xsl:value-of select="$xetex.font.crimson"/>
+ </xsl:when>
+ <xsl:when test="$book.font = 'gandhi'">
+ <xsl:value-of select="$xetex.font.gandhi"/>
+ </xsl:when>
+ <xsl:when test="$book.font = 'alegreya'">
+ <xsl:value-of select="$xetex.font.alegreya"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Fallback to the default Crimson font -->
+ <xsl:value-of select="$xetex.font.crimson"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:param>
+
+
<!-- Do it the hard way: put this content in a file loaded by \maketitle -->
<xsl:template match="colophon">
<xsl:variable name="titlepage.verso">
</xsl:call-template>
</xsl:template>
+<!-- French typography requises the surname of the cited authors being in
+ Small Capitals -->
+<xsl:template match="footnote//personname">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="footnote//surname">
+ <xsl:text>\textsc{</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>}</xsl:text>
+</xsl:template>
+
</xsl:stylesheet>