summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-09-05 03:01:09 +0000
committerNorbert Preining <norbert@preining.info>2023-09-05 03:01:09 +0000
commit42959ab19eab5531850a6067d53d13f777ec160b (patch)
tree5f0d408ae32b7e1883bf93283384c92c9de1ef30 /macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex
parent6cc1e9947e6e547a181fd0510d399af947c7bbc9 (diff)
CTAN sync 202309050301
Diffstat (limited to 'macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex')
-rw-r--r--macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex68
1 files changed, 68 insertions, 0 deletions
diff --git a/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex
new file mode 100644
index 0000000000..62a5013a50
--- /dev/null
+++ b/macros/latex/contrib/mitthesis/MIT-thesis-template/fontsets/mitthesis-termes-stix2.tex
@@ -0,0 +1,68 @@
+% From mitthesis package
+% Version: 1.02, 2023/07/03
+% Documentation: https://ctan.org/pkg/mitthesis
+
+
+%% TeX Gyre Termes text font and Heros sans serif font with STIX2 math font and Inconsolata monospaced font
+%
+% These fonts are available at:
+% http://www.gust.org.pl/projects/e-foundry/tex-gyre
+% https://github.com/stipub/stixfonts
+% https://ctan.org/tex-archive/fonts/inconsolata
+% Install these as system fonts on your computer
+%
+\ifpdftex
+ \ClassWarning{mitnewthesis}{The termes-stix2 fontset requires a unicode engine. Defaulting to CMR fonts.}
+ \RequirePackage[T1]{fontenc}
+ \RequirePackage{bm}
+\else
+ \typeout{^^JLoading TeX Gyre Termes text font with STIX2 math font, Heros sans serif font, and Inconsolata monospaced font.^^J}
+ %
+ \RequirePackage[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{TeXGyreTermesX}[% Presumes these are system fonts! Available at: http://www.gust.org.pl/projects/e-foundry/tex-gyre
+ WordSpace = {1,1.4,1},%% This stretch matches newtxtext a little better. 1.4
+ Extension = .otf,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,
+ SlantedFont = *-Italic,
+ Numbers = Lining,
+ ]
+ \setsansfont{texgyreheros}[% Presumes these are system fonts! Available at: http://www.gust.org.pl/projects/e-foundry/tex-gyre
+ WordSpace = {1,1.4,1},
+ Extension = .otf,
+ UprightFont = *-regular,
+ ItalicFont = *-italic,
+ BoldFont = *-bold,
+ BoldItalicFont = *-bolditalic,
+ Numbers = Lining,
+ Scale=0.91,% same as for newtx; former value 0.9 too small 2022/01/15
+ ]
+ \setmonofont{Inconsolatazi4}[% This otf font ships with the LaTeX Inconsolata package (it's in TeX Live)
+ Scale=1.05,% rescaled from 1, 22/03/10
+ 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 %% https://github.com/stipub/stixfonts
+ 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
+ %
+ \setmathfontface\mathbf{STIXTwoText-Bold.otf}[]% to not get Termes bold, https://github.com/stipub/stixfonts
+ \setmathfontface\mathit{STIXTwoText-Italic.otf}[]
+ \setmathfontface\mathrm{STIXTwoText-Regular.otf}[]% to get roman letters from STIX, not Termes
+ %
+ \newcommand*{\FRAC}[1]{{\addfontfeature{Fractions=On}#1}}% use OpenType feature for fractions, \FRAC{1/2}
+\fi