Debian Codegraph @

texmf-dist/doc/latex/mitthesis/MIT-thesis-template/fontsets/mitthesis-lucida.tex

raw
1 % From mitthesis package
2 % Documentation: https://ctan.org/pkg/mitthesis
3
4 \ProvidesFile{mitthesis-lucida.tex}[2026/01/31 v1.06 Load Lucida fonts]
5
6 %% Lucida Bright and Lucida Bright Math fonts (available from the TeX Users Group)
7
8 \ClassNoteNoLine{\ClassName}{Lucida Bright and Lucida Bright Math fonts}
9
10 \ifpdftex
11 \RequirePackage[LY1]{fontenc}
12 \RequirePackage[expert,vargreek,altbullet]{lucidabr} % switch text and math fonts
13 % some other options: seriftt (much larger quad size!), lucidasmallscale % 2024/10/13
14 \RequirePackage{bm}
15 \else
16 \RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket},mathbf=sym]{unicode-math}
17 % suppress warnings about lack of integration between mathtools and unicode-math
18 % unicode-math loads the fontspec package
19
20 % FEATURE DESCRIPTION DEFAULT
21 % dlig discretionary ligatures (f-ligatures in typewriter fnt) off
22 % liga standard ligatures (f-ligatures, not monospaced fonts) on
23 % onum old style numbers (Lucida Bright only) off
24 % smcp small caps (Lucida Bright, upright only) off
25 % zero slashed zero (sans and monospaced fonts) off
26 % locl script/language specific (localized) forms on
27 %
28 % FEATURE FONT DESCRIPTION
29 % ss01 Lucida Sans & Typewriter use dotted zero: 𝟶 vs. default 0.
30 % ss01 use Lucida-standard shapes:
31 % Lucida Grande Mono ØOQ vs. default 0OQ;
32 % Lucida Console ØOQ vs. default 0OQ.
33
34 \setmainfont{LucidaBrightOT}[% main rm
35 Ligatures=TeX,
36 Extension=.otf,
37 UprightFont=*,
38 ItalicFont=*-Italic,
39 BoldFont=*-Demi,
40 BoldItalicFont=*-DemiItalic,
41 % BoldItalicFeatures={Color=Purple4}, % fixed 2024/10/13
42 % UprightFeatures={Color=Salmon3},
43 Scale=0.93,% increased from 0.92, 2024/10/13
44 % Numbers ={OldStyle},
45 ]
46 %
47 \setsansfont{LucidaSansOT}[% main sans
48 Ligatures=TeX,
49 Extension=.otf,
50 UprightFont=*,
51 ItalicFont=*-Italic,
52 BoldFont=*-Demi,
53 BoldItalicFont=*-DemiItalic,
54 Scale=MatchUppercase,
55 ]
56 %
57 \setmonofont{LucidaSansTypewriterOT}[% main typewriter
58 Ligatures=TeX,
59 Extension=.otf,
60 UprightFont=*,
61 ItalicFont=*-Oblique,
62 BoldFont=*-Bold,
63 BoldItalicFont=*-BoldOblique,
64 Scale=MatchLowercase,% changed from MatchUppercase, 2024/10/13
65 ]
66
67 %% MATH FONTS
68 %
69 % ss01 alternate Latin lower case math italic identical to text italic. This option is not recommended as Greek 𝜈 (nu) and Latin 𝑣 (vee) become too similar
70 % ss02 smaller arrows (original Type 1 size): ⇑ vs. default ⇑.
71 % ss03 attempt to imitate Type 1 fonts
72 % ss04 calligraphic alternative (similar to the Type 1 design) to the math script alphabet
73 % ss05 use a slashed-zero style for the empty set character (U+2205): Ø vs. default ∅
74 % ss08 emphasize right and bottom edges of the d’Alembertian operator (U+29E0, \laplac), to follow the design of the Laplace operator (U+2206, \increment, Δ); the default design emphasizes the left and upper edges. Also available in the bold math font.
75 %
76 \setmathfont{LucidaBrightMathOT}[% main math
77 Scale=MatchUppercase,
78 Extension=.otf,
79 BoldFont=LucidaBrightMathOT-Demi.otf,
80 % BoldFeatures={Color=Chartreuse4},
81 RawFeature ={+ss04,+ss08}, %
82 ]
83
84 %% LucidaMath-OT contains a *serif* typerwriter font. If you prefer a sans serif typerwriter font, you can use the following two settings.
85 %
86 % \setmathfont{LucidaSansTypewriterOT}[% <== NB: setting a text font where math font should go.
87 % Scale=MatchUppercase,
88 % range=tt,
89 % Color=NavyBlue,
90 % Extension=.otf,
91 % script-features = {},
92 % sscript-features = {},
93 % BoldFont=LucidaSansTypewriterOT-Bold.otf,
94 % BoldFeatures={Color=Salmon3},
95 % ]
96 % %
97 % \setmathfontface\mathtt{LucidaSansTypewriterOT-Bold}[% bold upright typewriter font in boldmath.
98 % version=bold,
99 % Scale=MatchUppercase,
100 % Extension=.otf,
101 % ]
102 %
103 \setmathfont{LucidaBrightMathOT}[%
104 range={scr},% to make scr differ from cal
105 RawFeature={-ss04},
106 Scale=MatchUppercase,
107 Extension=.otf,
108 BoldFont=LucidaBrightMathOT-Demi.otf,% could be overridden by bold separate version
109 ]
110 \setmathfont{LucidaBrightMathOT}[% -Demi .. sufficient this way, since bold set above.
111 range={bfscr},% need to call \symbfscr manually - bug in unicode-math version & range interaction
112 RawFeature={-ss04},
113 Scale=MatchUppercase,
114 Extension=.otf,
115 BoldFont=LucidaBrightMathOT-Demi.otf,
116 ]
117 %% Fix unicode-math operator font not set up for bold face (default \mathrm). See https://github.com/wspr/unicode-math/issues/468
118 \setoperatorfont\symup
119 %
120 % note \mathbfit = \symbfit
121
122 % The specialized one-off Lucida fonts:
123 \newfontface\LucidaBlackletter{LucidaBlackletterOT}[%
124 Scale=0.95,% <== NB
125 Extension=.otf,
126 ]
127 \newfontface\LucidaCalligraphy{LucidaCalligraphyOT}[%
128 Scale=MatchUppercase,
129 Extension=.otf,
130 ]
131 \newfontface\LucidaHandwriting{LucidaHandwritingOT}[%
132 Scale=MatchUppercase,
133 Extension=.otf,
134 ]
135 % GrandeMono and Console fonts:
136 \newfontface\LucidaGrandeMonoDK{LucidaGrandeMonoDK}[%
137 Scale=MatchUppercase,
138 Extension=.otf,
139 UprightFont=*,
140 ItalicFont=*-Italic,
141 BoldFont=*-Bold,
142 BoldItalicFont=*-BoldItalic,
143 ]
144 \newfontface\LucidaConsole{LucidaConsoleDK}[%
145 Scale=MatchLowercase,% <=== NB
146 Extension=.otf,
147 UprightFont=*,
148 ItalicFont=*-Italic,
149 BoldFont=*-Bold,
150 BoldItalicFont=*-BoldItalic,
151 ]
152 \fi
153 %
154 \RequirePackage{etoolbox} % may already be loaded by the .cls file
155 % Patch headings to automatically use \mathversion{bold}. Compare to report.cls.
156 \patchcmd{\section}{\normalfont}{\mathversion{bold}\normalfont}{}{}
157 \patchcmd{\subsection}{\normalfont}{\mathversion{bold}\normalfont}{}{}
158 \patchcmd{\subsubsection}{\normalfont}{\mathversion{bold}\normalfont}{}{}
159 \patchcmd{\paragraph}{\normalfont}{\mathversion{bold}\normalfont}{}{}
160 \patchcmd{\subparagraph}{\normalfont}{\mathversion{bold}\normalfont}{}{}