Debian Codegraph @

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

raw
1 % From mitthesis package
2 % Documentation: https://ctan.org/pkg/mitthesis
3
4 \ProvidesFile{mitthesis-heros-stix2.tex}[2025/10/23 v1.08 Load TeX Gyre Heros (sans serif) text font with STIX Two Math font and Inconsolata monospaced font]
5
6 %% TeX Gyre Heros (sans serif) text font with STIX Two Math 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 % http://www.gust.org.pl/projects/e-foundry/tex-gyre
11 % https://github.com/stipub/stixfonts
12 % https://ctan.org/tex-archive/fonts/inconsolata
13 %
14 \ifpdftex
15 \ClassError{\ClassName}{The heros-stix2 fontset requires a unicode engine. Defaulting to CMR fonts}{To use the class option [fontset=heros-stix2] you must use a unicode engine, such as LuaLaTeX.}
16 \RequirePackage[T1]{fontenc}
17 \RequirePackage{bm}
18 \else
19 \ClassNoteNoLine{\ClassName}{TeX Gyre Heros (sans serif) text font with STIX2 math 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{texgyreheros}[
26 WordSpace = {1,1.4,1},
27 Extension = .otf,
28 UprightFont = *-regular,
29 ItalicFont = *-italic,
30 BoldFont = *-bold,
31 BoldItalicFont = *-bolditalic,
32 Numbers = Lining,
33 Scale=0.91,
34 ]
35 \setsansfont{texgyreheros}[
36 WordSpace = {1,1.4,1},
37 Extension = .otf,
38 UprightFont = *-regular,
39 ItalicFont = *-italic,
40 BoldFont = *-bold,
41 BoldItalicFont = *-bolditalic,
42 Numbers = Lining,
43 Scale=0.91,
44 ]
45 \setmonofont{Inconsolatazi4}[
46 Scale=1.04,
47 Extension = .otf,
48 UprightFont = *-Regular,
49 ItalicFont = *-Regular,% has no italic face
50 BoldFont = *-Bold,
51 BoldItalicFont = *-Bold,% has no bold italic face
52 RawFeature = {+ss01,+ss02}, % drop +ss03 (upright quotes), 2025/04/18
53 ]
54 \setmathfont{STIXTwoMath-Regular}[% nice glyphs, but \mkern sometimes helpful
55 Scale=MatchLowercase,%0.95,%MatchUppercase,%MatchLowercase,
56 % scaling is a matter of taste ... the x-heights of STIX2 are greater than for Heros...
57 Extension = .otf,
58 % BoldFont = *,% STIX Two Math has no bold face
59 % Color=NavyBlue,
60 RawFeature = {+ss01, -ss02, -ss08},
61 ]
62 % ss01 -- switch calligraphic to script; +ss02 -- variants of g, u, v, w, z; +ss08 -- upright integrals
63 %
64 \setmathfontface\mathbf{STIXTwoText-Bold.otf}[]% to not get Heros bold, https://github.com/stipub/stixfonts
65 \setmathfontface\mathit{STIXTwoText-Italic.otf}[]
66 \setmathfontface\mathrm{STIXTwoText-Regular.otf}[]% to get roman letters from STIX Two
67 %
68 \newcommand*{\FRAC}[1]{{\addfontfeature{Fractions=On}#1}}% use OpenType feature for fractions, \FRAC{1/2}
69 \fi