-
Notifications
You must be signed in to change notification settings - Fork 0
/
nmd-fonts.sty
75 lines (67 loc) · 2.23 KB
/
nmd-fonts.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
%%% Setting up the fonts, including booleans storing which font is
%%% being used.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{nmd/nmd-fonts}[2014/08/31 - Semester start edition]
\RequirePackage{nmd/nmd-common}
\newboolean{nmd@times}
\newboolean{nmd@stix}
\newboolean{nmd@utopia}
\newboolean{nmd@lucida}
\newboolean{nmd@computermodern}
\newboolean{nmd@eulercal}
\DeclareOption{times}{\nmd@timestrue}
\DeclareOption{stix}{\nmd@stixtrue}
\DeclareOption{utopia}{\nmd@utopiatrue}
\DeclareOption{lucida}{\nmd@lucidatrue}
\DeclareOption{computermodern}{\nmd@computermoderntrue}
\DeclareOption{eulercal}{\nmd@eulercaltrue}
\ProcessOptions
%%% Other people probably don't have the Lucida fonts
\ifthen{\boolean{nmd@lucida} \and \not \boolean{nmd}}{\nmd@lucidafalse \nmd@utopiatrue}
%%% If no font is specified, infer from overall class or default to
%%% Utopia.
\ifnotthen{\boolean{nmd@times} \or \boolean{nmd@stix} \or \boolean{nmd@utopia} %
\or \boolean{nmd@lucida} \or \boolean{nmd@computermodern}}%
{ \nmd@utopiatrue % Default
\@ifclassloaded{amsart}{\nmd@computermoderntrue \nmd@utopiafalse}{}
\@ifclassloaded{gtpart}{\nmd@timestrue \nmd@utopiafalse}{}
}
\ifnmd@times
\@ifclassloaded{gtpart}{\relax}{%
\RequirePackage{newtxtext}
\RequirePackage[vvarbb]{newtxmath}
\let\Bbbk\undefined
}
\fi
\ifnmd@stix
\@ifclassloaded{gtpart}{\relax}{%
\RequirePackage{stix2}
\let\Obar\undefined
\let\Vbar\undefined
\let\Zbar\undefined
\let\obar\undefined
}
\fi
\ifnmd@utopia
% Note: Mathdesign with Utopia is much uglier.
\RequirePackage{fourier}
\RequirePackage[scaled]{berasans}
% Use slanted RSFS script fonts as default or Euler as an option
\ifnmd@eulercal
\DeclareFontFamily{U}{eus}{}
\DeclareFontShape{U}{eus}{m}{n}{%
<-6> s*[0.93] eusm5%
<6-9> s*[0.93] eusm7%
<9-> s*[0.93] eusm10%
}{}
\DeclareMathAlphabet\EuScript{U}{eus}{m}{n}
\SetMathAlphabet\EuScript{bold}{U}{eus}{b}{n}
\renewcommand{\mathcal}{\EuScript}
\else
\RequirePackage[scaled=0.9]{rsfso}
\fi
\fi
\ifnmd@lucida
\let\digamma\undefined
\RequirePackage[lucidasmallscale, nofontinfo]{lucimatx}
\fi