Debian Codegraph @

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

raw
1 % From mitthesis package
2 % Documentation: https://ctan.org/pkg/mitthesis
3
4 \ProvidesFile{mitthesis-stix2.tex}[2025/09/23 v1.08 Load STIX Two text and math fonts]
5
6 %% STIX Two text and math fonts with Heros sans serif font and Inconsolata monospaced font
7 %
8 % These fonts are in TeX Live and on CTAN. They are included in a complete LaTeX installation.
9 % They are also available at:
10 % https://github.com/stipub/stixfonts
11 % http://www.gust.org.pl/projects/e-foundry/tex-gyre
12 % https://ctan.org/tex-archive/fonts/inconsolata
13 %
14 \ifpdftex
15 \ClassError{\ClassName}{The stix2 fontset requires a unicode engine. Defaulting to CMR fonts.}{Use LuaLatex to run with the class option [fontset=stix2]}
16 \RequirePackage[T1]{fontenc}
17 \RequirePackage{bm}
18 \else
19 \ClassNoteNoLine{\ClassName}{Loading STIX Two text and math fonts with Heros sans serif font and Inconsolata monospaced font}
20 %
21 \RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket},mathbf=sym]{unicode-math}
22 % suppress warnings about lack of integration between mathtools and unicode-math
23 % unicode-math loads the fontspec package
24 %
25 \setmainfont{STIXTwoText}[
26 Extension = .otf,
27 UprightFont = *-Regular,
28 ItalicFont = *-Italic,
29 BoldFont = *-Bold,
30 BoldItalicFont = *-BoldItalic,
31 SlantedFont = *-Italic,
32 ]
33 \setsansfont{texgyreheros}[
34 WordSpace = {1,1.4,1},
35 Extension = .otf,
36 UprightFont = *-regular,
37 ItalicFont = *-italic,
38 BoldFont = *-bold,
39 BoldItalicFont = *-bolditalic,
40 Numbers = Lining,
41 Scale=0.91,%
42 ]
43 \setmonofont{Inconsolatazi4}[
44 Scale=1.035,% 2024/10/13
45 Extension = .otf,
46 UprightFont = *-Regular,
47 ItalicFont = *-Regular,% has no italic face
48 BoldFont = *-Bold,
49 BoldItalicFont = *-Bold,% has no bold italic face
50 RawFeature = {+ss01,+ss02}, % drop +ss03 (upright quotes), 2025/04/18
51 ]
52 \setmathfont{STIXTwoMath-Regular}[
53 Scale=MatchUppercase,
54 Extension = .otf,
55 % Color=NavyBlue,
56 RawFeature = {+ss01, -ss02, -ss08},
57 ]
58 % ss01 -- switch calligraphic to script; +ss02 -- variants of g, u, v, w, z; +ss08 -- upright integrals
59 %
60 \newcommand*{\FRAC}[1]{{\addfontfeature{Fractions=On}#1}}% use OpenType feature for fractions, \FRAC{1/2}
61 \fi