• Made font handling consistent across both XML and lecturecommon.sty.
• Added missing sans font declaration.
• Added Latin set to maths font.
• Added hack to ensure that digits in hyperlinks are set in the mono font, not the main font (closes #8).
1 parent c95e61c commit 40a8eddc985e9965e74b509cc3129004fd4946a5
Nigel Stanger authored on 16 Feb 2016
Showing 1 changed file
View
38
xml2xslt.xsl
 
<xsl-out:text>
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{TeX Gyre Pagella}
\setmathsfont(Digits){TeX Gyre Pagella}
\setmonofont[Scale=MatchLowercase]{Letter Gothic 12 Pitch}
\setsansfont[Scale=MatchUppercase,BoldFont={Gill Sans}]{Gill Sans Light}
\setmonofont[Scale=MatchUppercase]{Letter Gothic 12 Pitch}
\setmathsfont(Latin,Digits){TeX Gyre Pagella}
 
% Hack to prevent digits in hyperlinks from being set in the main font instead of the mono font.
% From http://tex.stackexchange.com/questions/99770/problem-with-digits-in-urls-when-using-mathspec-and-hyperref
% Note: doesn't matter if this is executed multiple times.
\makeatletter
\DeclareMathSymbol{0}{\mathalpha}{\eu@DigitsArabic@symfont}{`0}
\DeclareMathSymbol{1}{\mathalpha}{\eu@DigitsArabic@symfont}{`1}
\DeclareMathSymbol{2}{\mathalpha}{\eu@DigitsArabic@symfont}{`2}
\DeclareMathSymbol{3}{\mathalpha}{\eu@DigitsArabic@symfont}{`3}
\DeclareMathSymbol{4}{\mathalpha}{\eu@DigitsArabic@symfont}{`4}
\DeclareMathSymbol{5}{\mathalpha}{\eu@DigitsArabic@symfont}{`5}
\DeclareMathSymbol{6}{\mathalpha}{\eu@DigitsArabic@symfont}{`6}
\DeclareMathSymbol{7}{\mathalpha}{\eu@DigitsArabic@symfont}{`7}
\DeclareMathSymbol{8}{\mathalpha}{\eu@DigitsArabic@symfont}{`8}
\DeclareMathSymbol{9}{\mathalpha}{\eu@DigitsArabic@symfont}{`9}
\makeatother
</xsl-out:text>
</xsl-out:template>
</xsl:when>