summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mitthesis/fontsets/stix2.tex
blob: 25945f7e96d6001f1a3540ede1f25fc833187f96 (plain)
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
% From mitthesis package
% Version: 1.00, 2023/06/17
% Documentation: https://ctan.org/pkg/mitthesis


%% STIX Two text and math fonts with Heros sans serif font and Inconsolata monospaced font
%
% These fonts are available at: 
%				https://github.com/stipub/stixfonts 
%				http://www.gust.org.pl/projects/e-foundry/tex-gyre 
%				https://ctan.org/tex-archive/fonts/inconsolata
% Install these as system fonts on your computer
%
\ifpdftex
	\ClassWarning{mitnewthesis}{The stix2 fontset requires a unicode engine. Defaulting to CMR fonts.}
	\RequirePackage{bm}
\else
	\typeout{^^JLoading STIX Two text and math fonts with Heros sans serif font and Inconsolata monospaced font.^^J}
	%
    \usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
    % suppress tiresome warnings about lack of integration between mathtools and unicode-math
    % unicode-math loads the fontspec package
	%
    \setmainfont{STIXTwoText}[% Presumes these are system fonts! 
       	Extension = .otf,
    	UprightFont = *-Regular,
    	ItalicFont = *-Italic,
    	BoldFont = *-Bold,
    	BoldItalicFont = *-BoldItalic,
		SlantedFont = *-Italic,
	]
	\setsansfont{texgyreheros}[% Presumes these are system fonts! 
		WordSpace = {1,1.4,1},
		Extension = .otf,
    	UprightFont = *-regular,
    	ItalicFont = *-italic,
    	BoldFont = *-bold,
    	BoldItalicFont = *-bolditalic,
		Numbers = Lining,
    	Scale=0.91,% 
	]        
	\setmonofont{Inconsolatazi4}[% This otf font ships with the LaTeX Inconsolata package (it's in TeX Live)
        Scale=1.05,%
        Extension = .otf,
        UprightFont = *-Regular,
        ItalicFont = *-Regular,% has no italic face
        BoldFont = *-Bold, 
    	BoldItalicFont = *-Bold,% has no bold italic face
        RawFeature = {+ss01,+ss02,+ss03},
    ]             
	\setmathfont{STIXTwoMath-Regular}[% nice glyphs, but \mkern sometimes needed
    	Scale=MatchUppercase,
    	Extension = .otf,
		BoldFont = *,% STIX Two Math has no bold face
%       Color=NavyBlue, 
    	RawFeature = {+ss01, -ss02, -ss08},
   ]
   % ss01 -- switch calligraphic to script; +ss02 -- variants of g, u, v, w, z; +ss08 -- upright integrals
   %
   \newcommand*{\FRAC}[1]{{\addfontfeature{Fractions=On}#1}}% use OpenType feature for fractions, \FRAC{1/2} 
\fi