summaryrefslogtreecommitdiff
path: root/fonts/newtx/tex
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/newtx/tex')
-rw-r--r--fonts/newtx/tex/ly1minebgaramond.fd366
-rw-r--r--fonts/newtx/tex/ly1minntx.fd42
-rw-r--r--fonts/newtx/tex/newtx.sty600
-rw-r--r--fonts/newtx/tex/newtxmath.sty25
-rw-r--r--fonts/newtx/tex/newtxtext.sty218
-rw-r--r--fonts/newtx/tex/ot1minebgaramond.fd366
-rw-r--r--fonts/newtx/tex/ot1minntx.fd42
-rw-r--r--fonts/newtx/tex/t1minebgaramond.fd366
-rw-r--r--fonts/newtx/tex/t1minntx.fd45
9 files changed, 1876 insertions, 194 deletions
diff --git a/fonts/newtx/tex/ly1minebgaramond.fd b/fonts/newtx/tex/ly1minebgaramond.fd
new file mode 100644
index 0000000000..a6420a9c4a
--- /dev/null
+++ b/fonts/newtx/tex/ly1minebgaramond.fd
@@ -0,0 +1,366 @@
+%% Generated by msharpe on 2022/01/20
+%%
+\ProvidesFile{ly1minebgaramond.fd}
+ [2022/01/20 (msharpe) Font definitions for LY1/minebgaramond.]
+
+\def\@textscalefactor{1.05}
+%ebgaramond must be reduced by factor .93 to match xheight of newtxmath
+
+\@ifundefined{ntxmath@scale}{\let\ntxmath@scaled\@empty}
+{\@tempdima\@textscalefactor\p@
+\@tempdima\ntxmath@scale\@tempdima
+\edef\ntxmath@scaled{s*[\strip@pt\@tempdima]}}% locally, not globally
+
+\DeclareFontFamily{LY1}{minebgaramond}{}
+
+
+% ---- regular ----
+
+\DeclareFontShape{LY1}{minebgaramond}{regular}{sc}{
+ <-> \ntxmath@scaled EBGaramond-Regular-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{regular}{n}{
+ <-> \ntxmath@scaled EBGaramond-Regular-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{regular}{it}{
+ <-> \ntxmath@scaled EBGaramond-Italic-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{regular}{scit}{
+ <-> \ntxmath@scaled EBGaramond-Italic-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{regular}{sw}{
+ <-> \ntxmath@scaled EBGaramond-Italic-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{regular}{nw}{
+ <-> \ntxmath@scaled EBGaramond-Regular-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{regular}{scsl}{
+ <-> ssub * minebgaramond/regular/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{regular}{sl}{
+ <-> ssub * minebgaramond/regular/it
+}{}
+
+
+% ---- semibold ----
+
+\DeclareFontShape{LY1}{minebgaramond}{semibold}{sc}{
+ <-> \ntxmath@scaled EBGaramond-SemiBold-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{semibold}{n}{
+ <-> \ntxmath@scaled EBGaramond-SemiBold-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{semibold}{it}{
+ <-> \ntxmath@scaled EBGaramond-SemiBoldItalic-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{semibold}{scit}{
+ <-> \ntxmath@scaled EBGaramond-SemiBoldItalic-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{semibold}{sw}{
+ <-> \ntxmath@scaled EBGaramond-SemiBoldItalic-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{semibold}{nw}{
+ <-> \ntxmath@scaled EBGaramond-SemiBold-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{semibold}{scsl}{
+ <-> ssub * minebgaramond/semibold/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{semibold}{sl}{
+ <-> ssub * minebgaramond/semibold/it
+}{}
+
+
+% ---- bold ----
+
+\DeclareFontShape{LY1}{minebgaramond}{bold}{sc}{
+ <-> \ntxmath@scaled EBGaramond-Bold-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bold}{n}{
+ <-> \ntxmath@scaled EBGaramond-Bold-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bold}{it}{
+ <-> \ntxmath@scaled EBGaramond-BoldItalic-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bold}{scit}{
+ <-> \ntxmath@scaled EBGaramond-BoldItalic-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bold}{sw}{
+ <-> \ntxmath@scaled EBGaramond-BoldItalic-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bold}{nw}{
+ <-> \ntxmath@scaled EBGaramond-Bold-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bold}{scsl}{
+ <-> ssub * minebgaramond/bold/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bold}{sl}{
+ <-> ssub * minebgaramond/bold/it
+}{}
+
+
+% ---- medium ----
+
+\DeclareFontShape{LY1}{minebgaramond}{medium}{sc}{
+ <-> \ntxmath@scaled EBGaramond-Medium-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{medium}{n}{
+ <-> \ntxmath@scaled EBGaramond-Medium-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{medium}{it}{
+ <-> \ntxmath@scaled EBGaramond-MediumItalic-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{medium}{scit}{
+ <-> \ntxmath@scaled EBGaramond-MediumItalic-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{medium}{sw}{
+ <-> \ntxmath@scaled EBGaramond-MediumItalic-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{medium}{nw}{
+ <-> \ntxmath@scaled EBGaramond-Medium-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{medium}{scsl}{
+ <-> ssub * minebgaramond/medium/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{medium}{sl}{
+ <-> ssub * minebgaramond/medium/it
+}{}
+
+
+% ---- extrabold ----
+
+\DeclareFontShape{LY1}{minebgaramond}{extrabold}{sc}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBold-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{extrabold}{n}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBold-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{extrabold}{it}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBoldItalic-tlf-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{extrabold}{scit}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBoldItalic-tlf-sc-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{extrabold}{sw}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBoldItalic-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{extrabold}{nw}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBold-tlf-swash-ly1
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{extrabold}{scsl}{
+ <-> ssub * minebgaramond/extrabold/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{extrabold}{sl}{
+ <-> ssub * minebgaramond/extrabold/it
+}{}
+
+%
+% Extra 'ssub' rules to map the standard NFSS codes to our fancy names
+%
+
+% m --> regular
+
+\DeclareFontShape{LY1}{minebgaramond}{m}{scsl}{
+ <-> ssub * minebgaramond/regular/scsl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{m}{sc}{
+ <-> ssub * minebgaramond/regular/sc
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{m}{n}{
+ <-> ssub * minebgaramond/regular/n
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{m}{it}{
+ <-> ssub * minebgaramond/regular/it
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{m}{sw}{
+ <-> ssub * minebgaramond/regular/sw
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{m}{sl}{
+ <-> ssub * minebgaramond/regular/sl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{m}{scit}{
+ <-> ssub * minebgaramond/regular/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{m}{nw}{
+ <-> ssub * minebgaramond/regular/nw
+}{}
+
+
+% sb --> semibold
+
+\DeclareFontShape{LY1}{minebgaramond}{sb}{scsl}{
+ <-> ssub * minebgaramond/semibold/scsl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{sb}{sc}{
+ <-> ssub * minebgaramond/semibold/sc
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{sb}{n}{
+ <-> ssub * minebgaramond/semibold/n
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{sb}{it}{
+ <-> ssub * minebgaramond/semibold/it
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{sb}{sw}{
+ <-> ssub * minebgaramond/semibold/sw
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{sb}{sl}{
+ <-> ssub * minebgaramond/semibold/sl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{sb}{scit}{
+ <-> ssub * minebgaramond/semibold/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{sb}{nw}{
+ <-> ssub * minebgaramond/semibold/nw
+}{}
+
+
+% b --> bold
+
+\DeclareFontShape{LY1}{minebgaramond}{b}{scsl}{
+ <-> ssub * minebgaramond/bold/scsl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{b}{sc}{
+ <-> ssub * minebgaramond/bold/sc
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{b}{n}{
+ <-> ssub * minebgaramond/bold/n
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{b}{it}{
+ <-> ssub * minebgaramond/bold/it
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{b}{sw}{
+ <-> ssub * minebgaramond/bold/sw
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{b}{sl}{
+ <-> ssub * minebgaramond/bold/sl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{b}{scit}{
+ <-> ssub * minebgaramond/bold/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{b}{nw}{
+ <-> ssub * minebgaramond/bold/nw
+}{}
+
+
+% eb --> extrabold
+
+\DeclareFontShape{LY1}{minebgaramond}{eb}{scsl}{
+ <-> ssub * minebgaramond/extrabold/scsl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{eb}{sc}{
+ <-> ssub * minebgaramond/extrabold/sc
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{eb}{n}{
+ <-> ssub * minebgaramond/extrabold/n
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{eb}{it}{
+ <-> ssub * minebgaramond/extrabold/it
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{eb}{sw}{
+ <-> ssub * minebgaramond/extrabold/sw
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{eb}{sl}{
+ <-> ssub * minebgaramond/extrabold/sl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{eb}{scit}{
+ <-> ssub * minebgaramond/extrabold/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{eb}{nw}{
+ <-> ssub * minebgaramond/extrabold/nw
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bx}{n}{
+ <-> ssub * minebgaramond/b/n
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bx}{sc}{
+ <-> ssub * minebgaramond/b/sc
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bx}{scsl}{
+ <-> ssub * minebgaramond/b/scsl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bx}{it}{
+ <-> ssub * minebgaramond/b/it
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bx}{sw}{
+ <-> ssub * minebgaramond/b/sw
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bx}{sl}{
+ <-> ssub * minebgaramond/b/sl
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bx}{scit}{
+ <-> ssub * minebgaramond/b/scit
+}{}
+
+\DeclareFontShape{LY1}{minebgaramond}{bx}{nw}{
+ <-> ssub * minebgaramond/b/nw
+}{}
+
+\endinput
diff --git a/fonts/newtx/tex/ly1minntx.fd b/fonts/newtx/tex/ly1minntx.fd
new file mode 100644
index 0000000000..d07d5eaa13
--- /dev/null
+++ b/fonts/newtx/tex/ly1minntx.fd
@@ -0,0 +1,42 @@
+\ProvidesFile{ly1minntx.fd}[2022/01/20 v1.0 font definition file for LY1/minntx]
+
+\@ifundefined{ifntx@sl}{\let\ifntx@sl\iftrue}{}
+\@ifundefined{ifntx@largesc}{\let\ifntx@largesc\iftrue}{}
+
+\expandafter\ifx\csname ntxmath@scaled\endcsname\relax
+ \let\ntxmath@scaled\@empty%
+\fi
+\def\ntx@asfx{}
+\def\ntx@lsfx{}
+\def\ntx@makelsfx{\ifntx@largesc\def\ntx@lsfx{l}\fi}
+\def\ntx@makeadobesc{\ifntx@adobesc\def\ntx@lsfx{l}\def\ntx@adobesc{a}\else\ntx@makelsfx\fi}
+\ntx@makelsfx
+\ifdefined\ntx@adobescfalse\ntx@makeadobesc\fi
+\ifdefined\ntx@spacing \else\global\let\ntx@spacing\@empty\fi
+
+\DeclareFontFamily{LY1}{minntx}{\ntx@spacing}
+\DeclareFontShape{LY1}{minntx}{b}{sc}{<-> \ntxmath@scaled ntx-Bold-tlf-sc\ntx@lsfx-ly1}{}
+\DeclareFontShape{LY1}{minntx}{b}{n}{<-> \ntxmath@scaled ntx-Bold-tlf-ly1}{}
+\DeclareFontShape{LY1}{minntx}{b}{scit}{<-> \ntxmath@scaled ntx-BoldItalic-tlf-sc\ntx@lsfx-ly1}{}
+\DeclareFontShape{LY1}{minntx}{b}{it}{<-> \ntxmath@scaled ntx-BoldItalic-tlf-ly1}{}
+\DeclareFontShape{LY1}{minntx}{m}{sc}{<-> \ntxmath@scaled ntx-Regular-tlf-sc\ntx@lsfx-ly1}{}
+\DeclareFontShape{LY1}{minntx}{m}{n}{<-> \ntxmath@scaled ntx-Regular-tlf-ly1}{}
+\DeclareFontShape{LY1}{minntx}{m}{scit}{<-> \ntxmath@scaled ntx-Italic-tlf-sc\ntx@lsfx-ly1}{}
+\DeclareFontShape{LY1}{minntx}{m}{it}{<-> \ntxmath@scaled ntx-Italic-tlf-ly1}{}
+\DeclareFontShape{LY1}{minntx}{bx}{sc}{<->ssub * minntx/b/sc}{}
+\DeclareFontShape{LY1}{minntx}{bx}{n}{<->ssub * minntx/b/n}{}
+\DeclareFontShape{LY1}{minntx}{bx}{scit}{<->ssub * minntx/b/scit}{}
+\DeclareFontShape{LY1}{minntx}{bx}{it}{<->ssub * minntx/b/it}{}
+\ifntx@sl % point to real slanted fonts
+ \DeclareFontShape{LY1}{minntx}{m}{sl}{<-> \ntxmath@scaled tyxsl}{}
+ \DeclareFontShape{LY1}{minntx}{b}{sl}{<-> \ntxmath@scaled ztmbsl-tlf-ly1}{}
+ \DeclareFontShape{LY1}{minntx}{bx}{sl}{<->ssub * minntx/b/sl}{}
+\else %point to theorem font
+ \DeclareFontShape{LY1}{minntx}{m}{sl}{<-> \ntxmath@scaled ntxth-Italic-tlf-ot1}{}
+ \DeclareFontShape{LY1}{minntx}{b}{sl}{<->ssub * minntx/m/sl}{}
+ \DeclareFontShape{LY1}{minntx}{bx}{sl}{<->ssub * minntx/m/sl}{}
+\fi
+\DeclareFontShape{LY1}{minntx}{b}{scsl}{<->ssub * minntx/b/scit}{}
+\DeclareFontShape{LY1}{minntx}{bx}{scsl}{<->ssub * minntx/b/scit}{}
+\DeclareFontShape{LY1}{minntx}{m}{scsl}{<->ssub * minntx/m/scit}{}
+\endinput
diff --git a/fonts/newtx/tex/newtx.sty b/fonts/newtx/tex/newtx.sty
index 7024807386..9279fac137 100644
--- a/fonts/newtx/tex/newtx.sty
+++ b/fonts/newtx/tex/newtx.sty
@@ -1,113 +1,539 @@
\NeedsTeXFormat{LaTeX2e}
+%:
-%Package to simplify loading of newtxtext with newtxmath for all latex engines
-\def\fileversion{1.704}
-\def\filedate{2022/01/09}
+%Package to simplify loading of newtxmath with a text font family such as newtxtext for all latex engines, or for newtxtext and an otf math package.
+\def\fileversion{1.71}
+\def\filedate{2022/02/11}
\ProvidesPackage{newtx}[%
-\filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for newtxtext with newtxmath]
+\filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for newtxmath and a supported text font family, or for newtxtext and an otf math package]
-\message{`newtx'v\fileversion,\filedate\space Integrated\space loading\space of\space newtxtext\space and\space newtxmath
+\message{`newtx'v\fileversion,\space\filedate\space Integrated\space loading\space of\space newtxmath\space and\space a\space text\space font
\space for\space all\space latex\space engines\space (msharpe)}
-\RequirePackage{ifthen,ifxetex,ifluatex}
-
-\def\ntx@mathlst{vecsep,amsthm,nosubscriptcorrection,subscriptcorrection,subscriptcorrectionfile,timesmathacc,varbb,vvarbb,nosymbolsc,noamssymbols,amssymbols,uprightscript,uprightGreek,slantedGreek,frenchmath,nonewtxmathopt,upint,smallerops,useBImacros,varg,varvw,noOT1}
-\def\ntx@textlst{type1,nofontspec,no-math,defaultfeatures,lining,lf,oldstyle,osf,tabular,t,proportional,p,defaultsups,largesc,nott,nohelv,helvratio,spcfactor,spacing,stretch,shrink,defaultfeatures,oldSS,slashedzero,theoremfont,thmlining,thmslshape,trueslanted,scosf,tighter,looser}
-
-%\newif\ifntx@inmath\newif\ifntx@intext
-%% #2
-%\def\ntx@inmath#1{\ntx@inmathfalse%
-% \@for\ntx@opt:=\ntx@mathlst\do{%
-% \ifthenelse{\equal}{#1}{\ntx@opt}{\ntx@inmathtrue\typeout{#1 in mathlst}}{}}%
-% }
-%\def\ntx@intext#1{\ntx@intextfalse%
-% \@for\ntx@opt:=\ntx@textlst\do{%
-% \ifthenelse{\equal}{#1}{\ntx@opt}{\ntx@intexttrue}{}}%
-% }
+
+\RequirePackage{fontenc,fontaxes}
+\RequirePackage{ifthen,iftex,etoolbox,scalefnt}
+
+% options for newtxmath as etoolbox internal list allowing \ifinlist
+\def\ntx@mathlstr{vecsep,amsthm,nosubscriptcorrection,subscriptcorrection,timesmathacc,varbb,vvarbb,nosymbolsc,noamssymbols,amssymbols,uprightscript,uprightGreek,slantedGreek,frenchmath,nonewtxmathopt,upint,smallerops,useBImacros,varg,varvw,noOT1}
+% Note that subscriptcorrectionfile is not on the list---we process it in this sty file
+\def\ntx@mathlst{}
+\@for\ntx@opt:=\ntx@mathlstr\do{%
+\listeadd{\ntx@mathlst}{\ntx@opt}}%
+
+%\ifinlist{amsthm}{\ntx@mathlst}{\typeout{YES}}{ \typeout{NO}}
%Enginecheck
-\newif\ifntxotf
-\newif\ifntx@origotf
-\ifxetex
- \ntxotftrue
-\else
- \ifluatex
- \ntxotftrue
- \else %[pdf]LaTeX
- \ntxotffalse
- \fi
-\fi
-\ifntxotf\ntx@origotftrue\fi
+%iftex's \iftutex is true for LuaTeX and XeTeX
+\newif\ifntx@otftext
+\iftutex\ntx@otftexttrue\fi
%%%%%%%%%%%%%%%%%%
-\IfFileExists{xkeyval.sty}{\RequirePackage{xkeyval}}%
-{\let\DeclareOptionX\DeclareOption
-\let\ExecuteOptionsX\ExecuteOptions
-\let\ProcessOptionsX\ProcessOptions}
+\RequirePackage{xkeyval}%
+
%%%%StartOptions
-\newif\ifntxotfmath\ntxotfmathfalse %default is type1 math
-%\newif\ifntxotftext\ntxotftexttrue %default is otftext using newtxtext
-%\newcommand{\ntx@optlist}{}
-\newif\ifntx@babel\newif\ifntx@
-%\DeclareOptionX{babel}{}
-%\DeclareOptionX{type1text}[true]{%
-%\@nameuse{if#1}\ntxotftextfalse\fi
-%}
-%\DeclareOptionX{nofontspec}[true]{%
-%\@nameuse{if#1}\ntxotffalse\fi
-%}
-%\DeclareOptionX{type1}[true]{%
-%\@nameuse{if#1}\ntxotffalse\fi
-%}
+\newif\ifntx@nofontspec % default is to load fontspec if unicode engine
+\newif\ifntx@otfmath %\ntx@otfmathfalse % default is type1 math
+
+\def\tx@divide#1#2{\strip@pt\dimexpr 1pt * (\dimexpr #1pt) / \dimexpr #2pt\relax\relax}
+
+\newcommand*{\ntxtext@scale}{1}
+\newcommand*{\ntxmath@scale}{1}
+\DeclareOptionX{scaled}[1]{\renewcommand*{\ntxtext@scale}{#1}\renewcommand*{\ntxmath@scale}{#1}}
+\DeclareOptionX{scale}[1]{\renewcommand*{\ntxtext@scale}{#1}\renewcommand*{\ntxmath@scale}{#1}}
+\DeclareOptionX{textscale}[1]{\renewcommand*{\ntxtext@scale}{#1}}
+\DeclareOptionX{textscaled}[1]{\renewcommand*{\ntxtext@scale}{#1}}
+\DeclareOptionX{mathscale}[1]{\renewcommand*{\ntxmath@scale}{#1}}
+\DeclareOptionX{mathscaled}[1]{\renewcommand*{\ntxmath@scale}{#1}}
+
+\DeclareOptionX{type1}[true]{%
+\@nameuse{if#1}\ntx@otftextfalse\fi}
+\DeclareOptionX{type1text}[true]{% same as type1--use type1 for text
+\@nameuse{if#1}\ntx@otftextfalse\fi}
+
+\DeclareOptionX{nofontspec}[true]{% use type1 for text and math
+\@nameuse{if#1}\ntx@nofontspectrue\fi}
+
\DeclareOptionX{otfmath}[true]{%
-\@nameuse{if#1}\ntxotfmathtrue\typeout{Got otfmath}\fi
+\@nameuse{if#1}\iftutex\ntx@otfmathtrue\fi\fi}
+
+%\DeclareOptionX{no-math}[true]{%
+%\@nameuse{if#1}\ntx@nomathtrue\fi}
+%\DeclareOptionX{no-otfmath}[true]{% forces use of newtxmath
+%\@nameuse{if#1}\ntx@nomathtrue\fi}
+
+\DeclareOptionX{subscriptcorrectionfile}{\def\tx@subs{#1}\tx@subsfiletrue}
+
+%\newif\ifntx@fourier
+\def\ntx@dfltTF{newtxtext} % the default text font package name
+\def\ntx@text{\let\ntx@TF=\ntx@dfltTF % the text font package name
+\def\ntx@MF{} % option name for flavor of newtxmath
+\def\ntx@id{0} % identifier for font properties
+\def\ntx@sc{ntx@scale} % macro name for scale factor in font package
+\def\ntx@minfam{minntx} %roman font, tabular lining fd, used in math
+}
+\ntx@text % set the default
+\DeclareOptionX{libertine}[true]{%
+ \@nameuse{if#1}\def\ntx@sc{LinuxLibertineT@scale}%
+ \def\ntx@TF{libertinus}\def\ntx@MF{libertine}
+ \def\ntx@id{10}\def\ntx@minfam{minlibertine}\def\textlf##1{{\liningnums##1}}\def\nustyle{\sufigures}\def\destyle{}\def\infigures{}\def\textinf{}\fi}
+\DeclareOptionX{libertinus}[true]{%
+ \@nameuse{if#1}\def\ntx@sc{LibertinusSerif@scale}%
+ \def\ntx@TF{libertinus}\def\ntx@MF{libertine}
+ \def\ntx@id{10}\def\ntx@minfam{minlibertine}%
}
-
+\DeclareOptionX{etbb}[true]{%
+ \@nameuse{if#1}\def\ntx@TF{ETbb}\def\ntx@MF{libertine}
+ \def\ntx@id{2}\def\ntx@minfam{minlibertine}\fi}
+\DeclareOptionX{ebgaramond}[true]{\@nameuse{if#1}
+ \def\ntx@sc{EBGaramond@scale}\def\ntx@TF{ebgaramond}
+ \let\ntx@MF\ntx@TF\def\ntx@id{3}\def\ntx@minfam{minebgaramond}\fi}
+\DeclareOptionX{MinionPro}[true]{\@nameuse{if#1}
+ \def\ntx@sc{}\def\ntx@TF{MinionPro}\def\ntx@MF{minion}
+ \def\ntx@id{4}\def\ntx@minfam{mincochineal}\def\ntx@TF{MinionPro}\fi}
+\DeclareOptionX{minion}[true]{\@nameuse{if#1}
+ \def\ntx@sc{}\def\ntx@TF{MinionPro}\def\ntx@MF{minion}
+ \def\ntx@id{4}\def\ntx@minfam{mincochineal}\def\ntx@TF{MinionPro}\fi}
+\DeclareOptionX{cochineal}[true]{\@nameuse{if#1}
+ \def\ntx@sc{Cochineal@scale}\def\ntx@TF{cochineal}
+ \let\ntx@MF\ntx@TF\def\ntx@id{5}\def\ntx@minfam{mincochineal}\fi}
+\DeclareOptionX{garamondx}[true]{\@nameuse{if#1}
+ \def\ntx@sc{zgm@Scale}\def\ntx@TF{garamondx}
+ \let\ntx@MF\ntx@TF
+ \def\ntx@id{6}\def\ntx@minfam{minzgm}\fi}
+\DeclareOptionX{baskerville}[true]{\@nameuse{if#1}
+ \def\ntx@sc{BaskervilleF@scale}\def\ntx@TF{baskervillef}
+ \let\ntx@MF\ntx@TF\def\ntx@id{7}\def\ntx@minfam{minbaskervillef}\fi}
+\DeclareOptionX{Baskerville}[true]{\@nameuse{if#1}
+ \def\ntx@sc{BaskervilleF@scale}\def\ntx@TF{baskervillef}
+ \let\ntx@MF\ntx@TF\def\ntx@id{7}\def\ntx@minfam{minbaskervillef}\fi}
+\DeclareOptionX{baskervillef}[true]{\@nameuse{if#1}
+ \def\ntx@sc{BaskervilleF@scale}\def\ntx@TF{baskervillef}
+ \let\ntx@MF\ntx@TF\def\ntx@id{7}\def\ntx@minfam{minbaskervillef}\fi}
+\DeclareOptionX{BaskervilleF}[true]{\@nameuse{if#1}
+ \def\ntx@sc{BaskervilleF@scale}\def\ntx@TF{baskervillef}
+ \let\ntx@MF\ntx@TF\def\ntx@id{7}\def\ntx@minfam{minbaskervillef}\fi}
+\DeclareOptionX{baskervaldx}[true]{\@nameuse{if#1}
+ \def\ntx@sc{Baskervaldx@scale}\def\ntx@TF{baskervaldx}
+ \let\ntx@MF\ntx@TF\def\ntx@id{8}\def\ntx@minfam{minbaskervaldx}\fi}
+\DeclareOptionX{Baskervaldx}[true]{\@nameuse{if#1}
+ \def\ntx@sc{Baskervaldx@scale}\def\ntx@TF{baskervaldx}
+ \let\ntx@MF\ntx@TF\def\ntx@id{8}\def\ntx@minfam{minbaskervaldx}\fi}
+%\DeclareOptionX{utopia}[true]{%
+% \@nameuse{if#1}\def\ntx@TF{utopia}\let\ntx@MF\ntx@TF\def\ntx@id{0}\def\ntx@minfam{}\fi}
+\DeclareOptionX{heuristica}[true]{\@nameuse{if#1}
+ \def\ntx@sc{Heuristica@scale}%
+ \def\ntx@TF{heuristica}\def\ntx@MF{utopia}
+ \def\ntx@id{9}\def\ntx@minfam{minheuristica}\fi}
+\DeclareOptionX{Heuristica}[true]{\@nameuse{if#1}
+ \def\ntx@sc{Heuristica@scale}%
+ \def\ntx@TF{heuristica}\def\ntx@MF{utopia}
+ \def\ntx@id{9}\def\ntx@minfam{minheuristica}\fi}
+\DeclareOptionX{erewhon}[true]{\@nameuse{if#1}
+ \def\ntx@sc{erewhon@scale}\def\ntx@TF{erewhon}\def\ntx@MF{utopia}
+ \def\ntx@id{11}\def\ntx@minfam{minerewhon}\fi}
+\DeclareOptionX{Erewhon}[true]{\@nameuse{if#1}
+ \def\ntx@sc{erewhon@scale}\def\ntx@TF{erewhon}\def\ntx@MF{utopia}
+ \def\ntx@id{11}\def\ntx@minfam{minerewhon}\fi}
+\DeclareOptionX{XCharter}[true]{\@nameuse{if#1}
+ \def\ntx@sc{XCharter@scale}\def\ntx@TF{XCharter}
+ \def\ntx@MF{xcharter}\def\ntx@id{12}\def\ntx@minfam{minxcharter}\fi}
+\DeclareOptionX{xcharter}[true]{\@nameuse{if#1}
+ \def\ntx@sc{XCharter@scale}\def\ntx@TF{XCharter}
+ \def\ntx@MF{xcharter}\def\ntx@id{12}\def\ntx@minfam{minxcharter}\fi}
+\DeclareOptionX{Stickstoo}[true]{\@nameuse{if#1}
+ \def\ntx@sc{SticksTooText@scale}%
+ \def\ntx@TF{stickstootext}\def\ntx@MF{stickstoo}
+ \def\ntx@id{13}\def\ntx@minfam{minstickstootext}\fi}
+\DeclareOptionX{stickstoo}[true]{\@nameuse{if#1}
+ \def\ntx@sc{SticksTooText@scale}%
+ \def\ntx@TF{stickstootext}\def\ntx@MF{stickstoo}
+ \def\ntx@id{13}\def\ntx@minfam{minstickstootext}\fi}
+\DeclareOptionX{stix2}[true]{\@nameuse{if#1}
+ \def\ntx@sc{SticksTooText@scale}%
+ \def\ntx@TF{stickstootext}\def\ntx@MF{stickstoo}
+ \def\ntx@id{13}\def\ntx@minfam{minstickstootext}\fi}
+\DeclareOptionX{scholax}[true]{\@nameuse{if#1}
+ \def\ntx@sc{TeXGyreScholaX@scale}%
+ \def\ntx@TF{scholax}\def\ntx@MF{nc}
+ \def\ntx@id{14}\def\ntx@minfam{minscholax}\fi}
+\DeclareOptionX{nc}[true]{\@nameuse{if#1}
+ \def\ntx@sc{TeXGyreScholaX@scale}%
+ \def\ntx@TF{scholax}\def\ntx@MF{nc}
+ \def\ntx@id{14}\def\ntx@minfam{minscholax}\fi}
+\DeclareOptionX{scholaxf}[true]{\@nameuse{if#1}
+ \def\ntx@sc{TeXGyreScholaX@scale}%
+ \def\ntx@TF{scholax}\def\ntx@MF{nc}
+ \def\ntx@id{14}\def\ntx@minfam{minscholax}\fi}
+\DeclareOptionX{ncf}[true]{\@nameuse{if#1}
+ \def\ntx@sc{TeXGyreScholaX@scale}%
+ \def\ntx@TF{scholax}\def\ntx@MF{nc}
+ \def\ntx@id{14}\def\ntx@minfam{minscholax}\fi}
+% for stacked fractions
+\DeclareOptionX{sfracvcenter}{%
+\def\tx@sfrVC{#1}}
+\DeclareOptionX{sfracvspacing}{%
+\def\tx@sfrVS{#1}}
+\DeclareOptionX{sfracbarthick}{%
+\def\tx@sfrTH{#1}}
+\DeclareOptionX{sfracscaling}{%
+\def\tx@sfrSC{#1}}
+\def\ntx@textopt{}
\DeclareOptionX*{% what to do with unknown options
-%\ntx@intext{\CurrentOption}\ifntx@intext%
-\PassOptionsToPackage{\CurrentOption}{newtxtext}
-%\ntx@inmath{\CurrentOption}\ifntx@inmath%
-\PassOptionsToPackage{\CurrentOption}{newtxmath}
+\xifinlist{\CurrentOption}{\ntx@mathlst}%
+{\PassOptionsToPackage{\CurrentOption}{newtxmath}}{%
+\xdef\ntx@textopt{\ntx@textopt \CurrentOption,}
+}}
+% \ntx@textopt contains all unknown options that are not math options. It contains no scale options.
+\ProcessOptionsX\relax
+%\traceon
+% Check for conflict between nofontspec and others
+\ifntx@nofontspec
+ \iftutex
+ \ntx@otfmathfalse
+ \ntx@otftextfalse
+ \fi
+\fi
+\ifntx@otfmath
+ \ifnum\ntx@id>0
+ \PackageWarning{newtx.sty}{Reverting to newtxtext: newtx is useless when specifying otfmath with any other text package.}
+ \ntx@text % revert to newtxtext
+\fi\fi
+%\ifntx@badnof\PackageError{newtx.sty}{Incompatible options, nofontspec and otfmath}{Incompatible options, nofontspec and otfmath}\fi
+% Set the text scale macros appropriately
+%\show\ntx@TF
+\PassOptionsToPackage{scaled=\ntxmath@scale}{newtxmath}
+%\PassOptionsToPackage{scaled=\ntxtext@scale}{\ntx@TF}
+\edef\ntxmath@scaled{s*[\ntxmath@scale]}
+% For the min text fd files, need to use actual scale macro passed to fd?
+%\@namedef{\ntx@sc}{\ntxtext@scale}
+
+\newif\ifntx@iszero
+\@tempdima\@ne\p@\@tempdima\ntxtext@scale\@tempdima
+\expandafter\ifnum\number\@tempdima=0\relax\ntx@iszerotrue\fi
+%
+\newcommand{\PassMathScale}{\ifntx@iszero\gdef\ntxtext@scale{\ntxmath@scale}\gdef\ntxtext@scaled{s*[\ntxtext@scale]}\fi
+\ifnum\ntx@id=4 % MinionPro
+ \PassOptionsToPackage{scale=\ntxtext@scale}{\ntx@TF}
+\else
+ \ifnum\ntx@id=10 %libertinus
+ \PassOptionsToPackage{ScaleRM=\ntxtext@scale}{\ntx@TF}
+ \else
+ \PassOptionsToPackage{scaled=\ntxtext@scale}{\ntx@TF}
+ \fi
+\fi
+}
+%
+\newcommand{\PassMatchingScale}[1]{\ifntx@iszero%
+\@tempdima #1\p@ \@tempdima\ntxmath@scale\@tempdima \xdef\ntxtext@scale{\strip@pt\@tempdima}
+\gdef\ntxtext@scaled{s*[\ntxtext@scale]}
+\fi
+\PassOptionsToPackage{scaled=\ntxtext@scale}{\ntx@TF}%
}
-\ProcessOptionsX\relax
+\ifcase\ntx@id % 0, newtxtext
+\PassMathScale
+% info for sfrac (stacked fractions) involving newtxtext
+\@ifundefined{tx@xht}{\def\tx@xht{450}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{406}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{270}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{0}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{331}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{106}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{54}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.8}}{} % scale defigures by this
+\or %1, libertine
+\PassMathScale
+ \PassOptionsToPackage{ttscaled=\ntxtext@scale,
+ llscaled=\ntxtext@scale}{\ntx@TF} % for tt and serifed in Libertine
+\@ifundefined{tx@xht}{\def\tx@xht{431}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{328}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{365}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{365}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{305}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{100}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{46}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.9}}{} % scale defigures by this
+\def\destyle{\sufigures} \def\nustyle{\sufigures}
+%\iflibertine@otf%
+%\providecommand{\textfrac}[3][]{{%
+%\mbox{%
+% \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
+% {\textlf{#1}\kern.02em}{}%
+%{\addfontfeature{RawFeature=+frac}#2/#3}}%
+%}}
+\or % 2, etbb
+\PassMathScale
+\@ifundefined{tx@xht}{\def\tx@xht{431}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{357}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{295}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{0}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{331}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{106}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{64}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.8}}{} % scale defigures by this
+\or % 3, ebgaramond
+\PassMatchingScale{1.05}
+\@ifundefined{tx@xht}{\def\tx@xht{431}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{341}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{443}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{-143}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{318}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{90}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{46}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.9}}{} % scale defigures by this
+\def\destyle{\infigures} \def\nustyle{\sufigures}
+\def\textlf#1{{\liningnums#1}}
+%\iflibertine@otf%
+%\providecommand{\textfrac}[3][]{{%
+%{{%
+% \mbox{%
+% \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
+% {\textlf{#1}\kern.02em}{}%
+%{\addfontfeature{RawFeature=+frac}#2/#3}}%
+%}}}}
+\or % 4, MinionPro
+\PassMathScale
+%\@ifundefined{tx@xht}{\def\tx@xht{437}}{} % lowercase letters
+%\@ifundefined{tx@deht}{\def\tx@deht{359}}{} % denominator figures ht
+%\@ifundefined{tx@nubase}{\def\tx@nubase{277}}{} % baseline of numerators
+%\@ifundefined{tx@debase}{\def\tx@debase{0}}{} % baseline of denoms
+%\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{317}}{}% vertical center of sfrac
+%\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{106}}{} % space above/below bar
+%\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{54}}{} % bar thickness
+%\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.9}}{} % scale defigures by this
+\or % 5, cochineal
+\PassMathScale
+\@ifundefined{tx@xht}{\def\tx@xht{430}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{378}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{248}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{0}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{313}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{106}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{54}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.9}}{} % scale defigures by this amount
+\or % 6, garamondx
+\PassMatchingScale{.94}
+\or % 7, BaskervilleF
+\PassMathScale
+\or % 8, baskervaldx
+\PassMathScale
+\or % 9, heuristica
+\PassMatchingScale{.94}
+\or % 10, libertinus
+\PassMathScale
+ \PassOptionsToPackage{ScaleTT=\ntxtext@scale, ScaleSF=\ntxtext@scale,
+ ScaleRM=\ntxtext@scale}{\ntx@TF} % for tt and serifed in Libertinus
+\@ifundefined{tx@xht}{\def\tx@xht{431}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{324}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{364}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{-112}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{305}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{90}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{46}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.9}}{} % scale defigures by this
+%\def\destyle{\sufigures} \def\nustyle{\sufigures}
+%\providecommand{\textfrac}[3][]{\textlf{#1}\kern.01em{\addfontfeature{RawFeature=+frac}#2/#3}}
+%\iflibertine@otf%
+%\providecommand{\textfrac}[3][]{{%
+%{{%
+% \mbox{%
+% \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
+% {\textlf{#1}\kern.02em}{}%
+%{\addfontfeature{RawFeature=+frac}#2/#3}}%
+%}}}}
+\or % 11, erewhon
+\PassMathScale
+\@ifundefined{tx@xht}{\def\tx@xht{461}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{384}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{256}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{0}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{320}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{106}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{58}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.8}}{} % scale defigures by this
+\or % 12, XCharter
+\PassMatchingScale{.98}
+\@ifundefined{tx@xht}{\def\tx@xht{481}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{382}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{295}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{0}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{341}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{106}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{54}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.8}}{} % scale defigures by this
+\or % 13, stickstoo
+\PassMathScale
+\@ifundefined{tx@xht}{\def\tx@xht{473}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{411}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{252}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{0}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{320}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{106}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{56}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.75}}{} % scale defigures by this
+\or % 14, scholax
+\PassMatchingScale{.93}
+\@ifundefined{tx@xht}{\def\tx@xht{466}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{423}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{289}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{-111}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{352}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{106}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{70}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.8}}{} % scale defigures by this
+\or % 15, scholax/fourier
+\PassMatchingScale{.93}
+\@ifundefined{tx@xht}{\def\tx@xht{466}}{} % lowercase letters
+\@ifundefined{tx@deht}{\def\tx@deht{423}}{} % denominator figures ht
+\@ifundefined{tx@nubase}{\def\tx@nubase{289}}{} % baseline of numerators
+\@ifundefined{tx@debase}{\def\tx@debase{-111}}{} % baseline of denoms
+\@ifundefined{tx@sfrVC}{\def\tx@sfrVC{352}}{}% vertical center of sfrac
+\@ifundefined{tx@sfrVS}{\def\tx@sfrVS{106}}{} % space above/below bar
+\@ifundefined{tx@sfrTH}{\def\tx@sfrTH{70}}{} % bar thickness
+\@ifundefined{tx@sfrSC}{\def\tx@sfrSC{.8}}{} % scale defigures by this
+\fi
-\ifntxotf\typeout{otf^^J}\else\typeout{type1^^J}\fi
-\ifntxotfmath\typeout{otfmath^^J}\else\typeout{type1math^^J}\fi
-%\ifntxotftext\typeout{otftext^^J}\else\typeout{type1text^^J}\fi
+\PassOptionsToPackage{\ntx@MF}{newtxmath}
+
+\ifblank{\ntx@textopt}{}%
+{\PassOptionsToPackage{\ntx@textopt}{\ntx@TF}}
+
+\newdimen\tx@sixem\tx@sixem6pt % for checking if a number refers to ex
+\newdimen\tx@y \newdimen\tx@x
+
+% convert numerical entry that may be multiple of ex (<6) or em value
+\def\tx@toex#1{\tx@x#1pt \ifdim\tx@x<\z@\tx@y-\tx@x\else\tx@y\tx@x\fi \ifdim\tx@y>\tx@sixem \tx@x\dimexpr 1pt * (\dimexpr #1pt\relax) / \dimexpr \tx@xht pt\relax\relax\fi}
+
+\newdimen\tx@tmpdima \newdimen\tx@tmpdimb \newdimen\tx@tmpdimc
+\newdimen\tx@tmpdimd \newdimen\tx@tmpdime \newdimen\tx@tmpdimf
+\newdimen\tx@dimA
+\newdimen\tx@dimAA \newdimen\tx@dimB \newdimen\tx@dimBB
+\newdimen\tx@dimC % vertical center
+% double cap letters for below bar, single cap for above
+\tx@toex\tx@sfrVC\tx@dimC\tx@x %Vertical center of fraction
+\tx@toex\tx@sfrTH\tx@tmpdimb\tx@x % bar thickness
+\tx@tmpdime.5\tx@tmpdimb % half bar thickness
+\tx@toex\tx@sfrVS\tx@tmpdimc\tx@x% vertical space
+\tx@toex\tx@deht\tx@tmpdimd\tx@x % height of unscaled figures
+\tx@tmpdimd\tx@sfrSC\tx@tmpdimd % height of scaled figures
+\tx@toex\tx@debase\tx@tmpdimf\tx@x % unscaled baseline of de figures
+\tx@toex\tx@nubase\tx@tmpdima\tx@x % unscaled baseline of nu figures
+\tx@tmpdima\tx@sfrSC\tx@tmpdima % scaled nu baseline
+\tx@tmpdimf\tx@sfrSC\tx@tmpdimf % scaled de baseline
+\tx@dimA\tx@dimC
+\advance\tx@dimA by \tx@tmpdime % top of bar
+\tx@dimAA\tx@dimC
+\advance\tx@dimAA by -\tx@tmpdime % bottom of bar
+\tx@dimB\tx@dimA
+\advance\tx@dimB by \tx@tmpdimc % top figure baseline
+\advance\tx@dimB by -\tx@tmpdima
+\tx@dimBB\tx@dimAA
+\advance\tx@dimBB by -\tx@tmpdimc %
+\advance\tx@dimBB by -\tx@tmpdimd % bottom figure baseline
+\advance\tx@dimBB by -\tx@tmpdimf
+\newcommand*{\textsfrac}[3][]{% like \textsfrac[1]{23}{34}
+\mbox{%
+ \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
+ {\textlf{#1}\kern.04em}{}%
+ {\hmode@bgroup%
+\ooalign{%
+ \setbox0=\hbox{\scalefont{\tx@sfrSC}\nustyle#2}%
+ \hfil \raise\strip@pt\tx@dimB ex\box0\hfil \crcr%
+ \leaders\hrule height \strip@pt\tx@dimA ex depth -\strip@pt\tx@dimAA ex\hfill \crcr%
+ \setbox1=\hbox{\scalefont{\tx@sfrSC}\destyle#3}%
+ \hfil\raise\strip@pt\tx@dimBB ex\box1\hfil}%
+\egroup}}
+}
-\ifntxotf
-% \ifntxotftext
- \ifntxotfmath %I
+\ifntx@otfmath\typeout{otf math}\else\typeout{type1 math}\fi
+\ifntx@otftext\typeout{otf text}\else\typeout{type1 text}\fi
+
+\ifntx@otftext
+ \ifntx@otfmath %I
+ %\show\xyzI
\usepackage[]{newtxtext} %may not load fontspec
\RequirePackage{fontspec} % just in case
\usepackage{unicode-math} %loads amsmath
%\setmathfont{}
\else %II: type1 math, otftext
- \renewcommand{\rmdefault}{ntxtlf} % Roman and BoldTermes for math
+ %\show\xyzII
+ \renewcommand*{\rmdefault}{\ntx@minfam} % Roman and Bold Termes for math
\usepackage[]{newtxmath} % options will be as passed from newtx
- \usepackage[no-math]{newtxtext}
- \RequirePackage[no-math]{fontspec} % just in case
+ %\show\xyz
+ \usepackage[no-math]{fontspec}
+ %\show\textlf
+ \ifnum\ntx@id=10\relax % libertinus
+ \usepackage[nomath]{\ntx@TF}% was \usepackage[no-math]{\ntx@TF}
+ \else
+ \usepackage{\ntx@TF}
+ \fi
+ \fi
+\else % III, pdflatex
+ %\show\ntx@minfam
+ \ifntx@otfmath % type1 text, otf math
+ \usepackage[type1text]{newtxtext} %may not load fontspec
+ \RequirePackage{fontspec} % just in case
+ \usepackage{unicode-math} %loads amsmath
+ %\setmathfont{}
+
+ \else % IV, type1 tex and math
+ \renewcommand*{\rmdefault}{\ntx@minfam}% Roman and Bold for math
+ \usepackage{newtxmath} % options will be as passed from newtx
+ \usepackage{\ntx@TF} % should load tt and sans math before newtx
\fi
-% \else % type1 text
-% \ifntxotfmath %II: type1text, otfmath
-% \usepackage[]{newtxtext}
-% \usepackage{fontspec}
-% \usepackage{unicode-math} % loadsamsmath
-% %\setmathfont{}
-% \else %IV: type1math,type1text
-% \renewcommand{\rmdefault}{ntxtlf}% Roman and Bold Termes for math
-% \usepackage[]{newtxmath}% options will be as passed from newtx
-% \usepackage[nofontspec]{newtxtext}
-% \ifntx@origotf\usepackage[no-math]{fontspec}\fi % we are
-% \fi
-% \fi
-\else % pdflatex
- \renewcommand{\rmdefault}{ntxtlf}% Roman and Bold Termes for math
- \usepackage{newtxmath} % options will be as passed from newtx
- \usepackage{newtxtext} % should load tt and sans math before newtx
\fi
-%\usepackage[\ntx@optlist]{newtxtext}%optionswillalsobeaspassedfromnewtx
-%\ifntxotfmath
-%\usepackage{unicode-math}
-%\fi
+%%%%%%% End of preamble items
+\AtEndPreamble{%
+\providecommand{\textfrac}[3][]{{%
+\mbox{%
+ \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
+ {\textlf{#1}\kern.02em}{}%
+{\ifntx@otftext\addfontfeature{RawFeature=+frac}#2/#3}
+\else\textnu{#2}{\normalfont\fontencoding{TS1}\selectfont\char"2F}%
+\textde{#3}\fi}
+}}}
+
+% Finally, add code to extend text packages after they load.
+% This will depend on the particular package and the state
+% of \ntx@otftext
+\ifcase\ntx@id % 0, newtxtext
+\or % 1, was libertine % switch to libertinus
+\or % 2, etbb
+\or % 3, ebgaramond
+ \def\destyle{\infigures} \def\nustyle{\sufigures}
+ \def\textnu#1{{\sufigures#1}}
+ \def\textde#1{{\infigures#1}}
+ \ifntx@otftext
+ \def\pliningnums{\addfontfeature{RawFeature=-tnum;-onum;+pnum;+lnum}}
+ \else % type1
+ \DeclareTextFontCommand{\pliningnums}{\fontfamily{EBGaramond-LF}\selectfont}
+ \fi
+ \def\textlf#1{{\pliningnums#1}}
+\or % 4, MinionPro
+\or % 5, cochineal
+\or % 6, garamondx
+\or % 7, BaskervilleF
+\or % 8, baskervaldx
+\or % 9, heuristica
+\or % 10, libertinus
+ \def\nustyle{\textsup}\let\textnu\textsup
+ \ifntx@otftext%
+ \def\textlf#1{{\addfontfeature{RawFeature=+lnum,RawFeature=+pnum}#1}}
+ \def\destyle{\addfontfeature{RawFeature=+subs}}
+ \else % type1
+ \fa@naming@exception{figures}{{inferior}{proportional}}{Inf}
+ \fa@naming@exception{figures}{{inferior}{tabular}}{Inf}
+ \def\infigures{\@nomath\infigures\fontfigurestyle{inferior}\selectfont}
+ \DeclareTextFontCommand{\textinf}{\infigures}
+ \let\destyle\infigures
+ \def\textlf#1{{\LibertinusSerifLF#1}}
+ \fi
+ \def\textde#1{{\destyle#1}}
+\or % 11, erewhon
+\or % 12, XCharter
+\or % 13, stickstoo
+\or % 14, scholax
+\or % 15, scholax/fourier
+\fi
+
\endinput
diff --git a/fonts/newtx/tex/newtxmath.sty b/fonts/newtx/tex/newtxmath.sty
index 54f1563bc4..10058623ec 100644
--- a/fonts/newtx/tex/newtxmath.sty
+++ b/fonts/newtx/tex/newtxmath.sty
@@ -11,8 +11,8 @@
% of glyph collisions.
% These modifications are by Michael Sharpe, msharpe at ucsd dot edu
-\def\fileversion{1.7}
-\def\filedate{2021/12/18}
+\def\fileversion{1.71}
+\def\filedate{2022/01/16}
\ProvidesPackage{newtxmath}[\filedate\space v\fileversion ]
\@ifundefined{newtxmathLoaded}{}{\endinput}
@@ -51,6 +51,7 @@
\define@key{ntxmath}{scale}[1.0]{\def\tx@scale{#1}\def\ntxmath@scaled{s*[#1]}}
\def\ntxmath@vecsep{.25ex}
\define@key{ntxmath}{vecsep}[.25ex]{\def\ntxmath@vecsep{#1}}
+%:
%\define@key{ntxmath}{scalesubdrop}[1.0]{\DeclareRobustCommand{\ntx@scalesub}{%
%\fontdimen16\font=#1\fontdimen16\font\fontdimen17\font=#1\fontdimen17\font}}
\DeclareOption*{%
@@ -94,15 +95,15 @@
\newif\iftx@fourier
\edef\tx@rmdefault{\rmdefault}
\edef\tx@encdefault{\encodingdefault}
-\tx@ottrue % default is true
+\tx@ottrue % default is to use OT1 operators
\let\rmdefaultB\rmdefault
\newif\iftx@hastm
\ifx\tx@rmdefault\@tx@ptm \tx@hastmtrue\fi
\@ifundefined{ver@newtxtext.sty}{}{\tx@hastmtrue}
\@ifundefined{ver@tgtermes.sty}{}{\tx@hastmtrue}
-\iftx@hastm\def\rmdefaultB{ntxtlf}\fi
+\iftx@hastm\def\rmdefaultB{minntx}\fi
% test if tm is loaded minimally as with XeLaTeX newtxmath
-\ifthenelse{\equal{\rmdefault}{ntxtlf}}{\tx@hastmtrue\def\rmdefaultB{ntxtlf}}{}
+\ifthenelse{\equal{\rmdefault}{minntx}}{\tx@hastmtrue\def\rmdefaultB{minntx}}{}
%\expandafter\ifx\csname qnc@scale\endcsname\relax
%\else
% \let\znc@scale=\qnc@scale % scale set by tgschola.sty
@@ -135,8 +136,8 @@
\if\next N\mkern-0.5mu\else
\if\next P\mkern-\@ne mu\else
\if\next X\mkern-\@ne mu\else
- \ifx\next \rho\mkern-1.5mu\else
- \ifx\next \mu\mkern-1 mu\else
+ \if\next \rho\mkern-1.5mu\else
+ \if\next \mu\mkern-1 mu\else
\fi
\fi
\fi%
@@ -191,14 +192,14 @@
\repeat
}
\def\tx@addrec#1#2{%
-\ifiscseq{#1}{\tx@tA\expandafter{\the\tx@tA\ifx}}{\tx@tA\expandafter{\the\tx@tA\if}}
+\ifiscseq{#1}{\tx@tA\expandafter{\the\tx@tA\if}}{\tx@tA\expandafter{\the\tx@tA\if}}
\tx@tA\expandafter{\the\tx@tA\next #1\mkern #2 mu\else}
\tx@tB\expandafter{\the\tx@tB\fi}}
\newif\iftx@subsfile
-\@ifpackageloaded{newtx}%
-{\@for\ntx@x:=\ntx@textlst\do{\DeclareOption{\ntx@x}{}}}{}
-\DeclareOption{subscriptcorrectionfile}{\def\tx@subs{##1}\tx@subsfiletrue}
+%\@ifpackageloaded{newtx}%
+%{\@for\ntx@x:=\ntx@textlst\do{\DeclareOption{\ntx@x}{}}}{}
+\DeclareOption{subscriptcorrectionfile}{\def\tx@subs{#1}\tx@subsfiletrue}
\DeclareOption{nosubscriptcorrection}{\tx@sbcfalse}
\DeclareOption{subscriptcorrection}{\tx@sbctrue}
%\DeclareOption{nosuperscriptcorrection}{\disablespcorrection}
@@ -264,6 +265,8 @@
amssymbols,uprightGreek,nosubscriptcorrection}
\ProcessOptions\relax
+\let\ntxmath@scale\tx@scale
+
\ifntx@amsthm
\RequirePackage{amsthm}
\typeout{amsthm loaded}
diff --git a/fonts/newtx/tex/newtxtext.sty b/fonts/newtx/tex/newtxtext.sty
index 5c1ce64f7d..2f02b73f10 100644
--- a/fonts/newtx/tex/newtxtext.sty
+++ b/fonts/newtx/tex/newtxtext.sty
@@ -6,26 +6,21 @@
% Text and math versions now separate.
% Added scaled keyword and osf option;
% Text is now directed to an extension of TeXGyreTermes rather than tx.
-% 2.0 is first version of newtxtext to support both [pdf]latex and unicode latex.
+% 1.7 is first version of newtxtext to support both [pdf]latex and unicode latex.
-\def\fileversion{1.705}
-\def\filedate{2022/01/11}
+\def\fileversion{1.71}
+\def\filedate{2022/02/28}
\ProvidesPackage{newtxtext}[%
\filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for TeXGyreTermesX]
\message{`newtxtext' v\fileversion, \filedate\space Text macros taking advantage of TeXGyre Termes and its extensions (msharpe)}
-\RequirePackage[T1]{fontenc}
-\renewcommand*{\rmdefault}{ntxtlf} % the default until end of preamble
-\renewcommand*{\familydefault}{\rmdefault}
-\RequirePackage{ifxetex,ifluatex,xkeyval,etoolbox,textcomp}
+\RequirePackage{iftex,xkeyval,etoolbox,textcomp}
\RequirePackage{xstring,ifthen,scalefnt} % for \textfrac
-\@ifpackageloaded{mweights}{}{%
- \IfFileExists{mweights.sty}{\RequirePackage{mweights}}{}%
-}
-
+\RequirePackage{mweights} % should be in latex kernel
\DeclareEncodingSubset{TS1}{ntx*}{0}
\input{binhex}
+
\newcount\ntx@tmpcnta
\newcount\ntx@cnt \ntx@cnt=0
@@ -34,61 +29,59 @@
\@ifundefined{KOMAClassName}{}{\ntx@KOMAtrue}
\@ifundefined{ver@scrextend.sty}{}{\ntx@KOMAtrue}
+
% Engine check
\newif\ifntx@newtx
-\@ifundefined{ntxotftrue}{\newif\ifntxotf%
-\newif\ifntx@origotf% true iff either xelatex or lualatex
- % might have been defined in newtx.sty
-\ifxetex
- \ntxotftrue
-\else\ifluatex
- \ntxotftrue
-\else % [pdf]LaTeX
- \ntxotffalse
-\fi\fi
-\ifntxotf\ntx@origotftrue\fi
-}{\ntx@newtxtrue%
-%\ifntxotf\typeout{ntxotftrue.^^J}\else\typeout{ntxotffalse.^^J}\fi
+\@ifundefined{ntx@otftexttrue}{% not run from newtx.sty
+ \newif\ifntx@otftext%
+ \newif\ifntx@otfmath % default is type1 math
+ %iftex's \iftutex returns true for LuaTeX and XeTeX, not [pdf]latex
+ \iftutex\ntx@otftexttrue\fi % default is otf text for unicode latex
+ \newif\ifntx@nofontspec % default is to load fontspec iftutex
+ % might have been defined in newtx.sty
+ \def\ntx@id{0} % make it appear that newtxtext was chosen in newtx
+}{% run from newtx.sty
+ \ntx@newtxtrue%
+ %\ifntx@otftext\typeout{ntx@otftexttrue.}\else\typeout{ntx@otftextfalse.}\fi
}
%%%%%%%%%%%%%%%%%%
-\IfFileExists{xkeyval.sty}{
- \RequirePackage{xkeyval}
- }{
- \let\DeclareOptionX\DeclareOption
- \let\ExecuteOptionsX\ExecuteOptions
- \let\ProcessOptionsX\ProcessOptions
-}
-%%%%Start Options
-\@ifpackageloaded{newtx}%
-{\ntx@newtxtrue%
-\@for\ntx@x:=\ntx@mathlst\do{\expandafter\DeclareOptionX\expandafter{\ntx@x}{}}}{}
+%
-\newif\ifntx@nomath\ntx@nomathfalse
+%\newif\ifntx@nomath\ntx@nomathfalse % ?????
\newif\ifntx@lining\ntx@liningtrue
\newif\ifntx@tabular\ntx@tabulartrue % default is tabular lining figures
-\@ifundefined{ver@newtxmath.sty}{}{\ntx@nomathtrue}
+\@ifundefined{ver@newtxmath.sty}{\iftutex\ntx@otfmathtrue\fi}{}
\DeclareOptionX{type1}[true]{%
-\def\ntx@tmpx{\@nameuse{if#1}\ntxotffalse\fi}
+\def\ntx@tmpx{\@nameuse{if#1}\ntx@otftextfalse\fi}
+\ifntx@newtx
+\else\ntx@tmpx\fi}
+\DeclareOptionX{type1text}[true]{%
+\def\ntx@tmpx{\@nameuse{if#1}\ntx@otftextfalse\fi}
\ifntx@newtx
\else\ntx@tmpx\fi}
-\DeclareOptionX{nofontspec}[true]{%
-\def\ntx@tmpx{\@nameuse{if#1}\ntxotffalse\fi}
+\DeclareOptionX{otfmath}[true]{%
+\def\ntx@tmpx{\@nameuse{if#1}\iftutex\ntx@otfmathtrue\fi\fi}
\ifntx@newtx
\else\ntx@tmpx\fi}
-\DeclareOptionX{no-math}[true]{%
-\def\ntx@tmpx{\@nameuse{if#1}\ntx@nomathtrue\fi}
+\DeclareOptionX{nofontspec}[true]{%
+\def\ntx@tmpx{\@nameuse{if#1}\ntx@nofontspectrue\fi}
\ifntx@newtx
\else\ntx@tmpx\fi}
+%\DeclareOptionX{no-math}[true]{%
+%\def\ntx@tmpx{\@nameuse{if#1}\ntx@nomathtrue\fi}
+%\ifntx@newtx
+%\else\ntx@tmpx\fi}
+
\def\ntx@defaultfeatures{}
\DeclareOptionX{defaultfeatures}{\def\ntx@defaultfeatures{#1}}
%Figure style options
-\edef\ntx@dfltfigurestyle{lf}
-\edef\ntx@dfltfigurealign{t}
+\def\ntx@dfltfigurestyle{lf}
+\def\ntx@dfltfigurealign{t}
\DeclareOptionX{lining}[true]{%
\@nameuse{ntx@lining#1}
@@ -202,20 +195,45 @@
\DeclareOptionX{looser}{%
\gdef\ntx@spc{.3em}\gdef\ntx@stretch{.2em}%
\gdef\ntx@shrink{.1em}\def\ntx@nolo{F}}
-
+%\traceon
\ProcessOptionsX\relax
-%\ifntxotf \typeout{ntxotftrue^^J}\else\typeout{ntxotffalse^^J}\fi
+% Check for conflict between nofontspec and others
+\ifntx@nofontspec
+ \iftutex
+ \ntx@otfmathfalse
+ \ntx@otftextfalse
+ \fi
+\fi
+
+\ifntx@otftext \typeout{ntx@otftexttrue}\else\typeout{ntx@otftextfalse}\fi
+\ifntx@newtx\let\ntx@scale=\ntxtext@scale\fi
+% following lines required by newtxmath
+% They must follow the definition of \ntx@scaled
+\@tempdima=\ntx@scale\p@\@tempdima=\ntx@helvratio\@tempdima%
+\edef\qhv@scale{\strip@pt\@tempdima}
+\edef\ntx@scaled{s*[\ntx@scale]}% used in fd files
+\providecommand*{\ntx@minfam}{minntx} % won't override value from newtx
+
+%\RequirePackage[T1]{fontenc} % do we need this?
+\renewcommand*{\rmdefault}{\ntx@minfam} % the default until end of preamble
+\renewcommand*{\familydefault}{\rmdefault} % Cause the fd files to load
\def\re@DeclareTextSymbol#1#2#3{%
\let#1=\undefined
\DeclareTextSymbol{#1}{#2}{#3}}
-\ifntxotf
- \ifntx@nomath
- \RequirePackage[no-math]{fontspec}
- \else
- \RequirePackage{fontspec}
+
+\iftutex
+ \ifntx@nofontspec % do nothing
+ \else
+ \ifntx@otfmath
+ \RequirePackage{fontspec}
+ \else
+ \RequirePackage[no-math]{fontspec}
+ \fi
\fi
+\fi
+\ifntx@otftext
\ifxetex\XeTeXtracingfonts=1\fi
\ifluatex % avoid possibly uncorrected "system" fonts
\directlua{fonts.names.set_location_precedence{
@@ -226,7 +244,7 @@
\newcommand{\textfrac}[3][]{{%\normalfont%
\mbox{%
\ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1]
- {{\lfstyle#1}\kern.1em}{}%
+ {{\lfstyle#1}\kern.04em}{}%
\addfontfeatures{RawFeature=+sups}#2\char"2044% numerator
\addfontfeatures{RawFeature=-sups;+dnom;+ss20}\char"2044{}#3%
}}}
@@ -324,12 +342,13 @@
\let\orig@makefnmark=\@makefnmark
\def\bfseries@rm{b}
\def\mdseries@rm{m}
+
\def\useosf{\ntx@liningfalse}
\@onlypreamble\useosf
\def\useproportional{\ntx@tabularfalse}
\@onlypreamble\useproportional
-\ifntxotf
+\ifntx@otftext
\def\ntx@dflt{}
\ifntx@zeroslash\edef\ntx@dflt{Numbers = SlashedZero ,
}\fi
@@ -375,10 +394,7 @@
\fontdimen2\font=\ntx@spc
\fontdimen3\font=\ntx@stretch
\fontdimen4\font=\ntx@shrink}
- \@tempdima=\ntx@scale\p@\@tempdima=\ntx@helvratio\@tempdima%
- \edef\qhv@scale{\strip@pt\@tempdima}
- \def\ntx@scaled{s*[\ntx@scale]}% used in fd files
-
+ %\show\ntx@scaled
%\def\oldstylenums#1{{\fontencoding{TS1}\selectfont #1}}
%\expandafter\patchcmd\expandafter{\csname scshape \endcsname}{\fontshape}{\fontfamily{ntx\ntx@figurealign osf}\fontshape}{\message{Replaced figure style by osf in sc.}}{\message{Unable to replace figure style by osf in sc.}}
@@ -441,18 +457,41 @@
\fi%
\fi%}
-\ifntxotf
+\ifntx@otftext
% \def\ntx@nft{\if t\ntx@thmtab Monospaced%
% \else Proportional\fi}
- \DeclareTextFontCommand{\textsl}{\slshape}
- \DeclareTextFontCommand{%
- \osfstyle}{\addfontfeatures{Numbers={Proportional,OldStyle}}}
- \DeclareTextFontCommand{%
- \tosfstyle}{\addfontfeatures{Numbers={Tabular,OldStyle}}}
- \DeclareTextFontCommand{%
- \tlfstyle}{\addfontfeatures{Numbers={Tabular,Lining}}}
- \DeclareTextFontCommand{%
- \lfstyle}{\addfontfeatures{Numbers={Proportional,Lining}}}
+ \DeclareRobustCommand{\lfstyle}{%
+ \not@math@alphabet\lfstyle\relax
+ \addfontfeatures{Numbers={Proportional,Lining}}%
+ }
+ \DeclareRobustCommand{\tlfstyle}{%
+ \not@math@alphabet\tlfstyle\relax
+ \addfontfeatures{Numbers={Monospaced,Lining}}%
+ }
+ \DeclareRobustCommand{\osfstyle}{%
+ \not@math@alphabet\osfstyle\relax
+ \addfontfeatures{Numbers={Proportional,OldStyle}}%
+ }
+ \DeclareRobustCommand{\tosfstyle}{%
+ \not@math@alphabet\tosfstyle\relax
+ \addfontfeatures{Numbers={Monospaced,OldStyle}}%
+ }
+ \DeclareRobustCommand{\oldstylenums}{%
+ \not@math@alphabet\oldstylenums\relax
+ \addfontfeatures{Numbers=OldStyle}%
+ }
+ \DeclareRobustCommand{\liningnums}{%
+ \not@math@alphabet\liningnums\relax
+ \addfontfeatures{Numbers=Lining}%
+ }
+ \DeclareRobustCommand{\tabularnums}{%
+ \not@math@alphabet\tabularnums\relax
+ \addfontfeatures{Numbers=Monospaced}%
+ }
+ \DeclareRobustCommand{\proportionalnums}{%
+ \not@math@alphabet\proportionalnums\relax
+ \addfontfeatures{Numbers=Proportional}%
+ }
\providecommand\sufigures{%
\addfontfeatures{VerticalPosition=Superior}}
@@ -463,7 +502,7 @@
\providecommand\defigures{%
\addfontfeatures{VerticalPosition=Denominator}}
\let\sustyle=\sufigures
-% \let\nustyle=\nufigures
+ \let\nustyle=\sufigures
\let\instyle=\infigures
\let\destyle=\defigures
\ifntx@defaultsups %
@@ -514,6 +553,7 @@
% \hfil \crcr \symbol{"25EF}}%
% \egroup}
\else % type1
+
\renewcommand*{\textcircled}[1]{\hmode@bgroup\ooalign{%
\hfil \raise .3ex\hbox{{%
\normalfont
@@ -523,21 +563,11 @@
\fi
% applies to both
-\DeclareRobustCommand{\textlf}[1]{%
- {\lfstyle #1}%
-}
-\DeclareRobustCommand{\texttlf}[1]{%
- {\tlfstyle #1}%
-}
-\DeclareRobustCommand{\textosf}[1]{%
- {\osfstyle #1}%
-}
-\DeclareRobustCommand{\texttosf}[1]{%
- {\tosfstyle #1}%
-}
-\DeclareRobustCommand{\textsu}[1]{%
- {\sustyle #1}%
-}
+\DeclareTextFontCommand{\textosf}{\osfstyle}
+\DeclareTextFontCommand{\texttosf}{\tosfstyle}
+\DeclareTextFontCommand{\texttlf}{\tlfstyle}
+\DeclareTextFontCommand{\textlf}{\lfstyle}
+
\DeclareTextFontCommand{\textsu}{\sustyle}
\let\textsuperior\textsu
\DeclareTextFontCommand{\textnu}{\nustyle}
@@ -548,7 +578,7 @@
\let\textinferior\textinf
\AtEndPreamble{%
-\ifntxotf
+\ifntx@otftext
\ifntx@lining
\def\ntx@figurestyle{Lining}
\else
@@ -607,25 +637,21 @@
\fi
}
%both
+
\ifntx@thrm
+ \@ifundefined{theoremstyle}{}{%
\theoremstyle{plain}
\patchcmd{\th@plain}{\itshape}{\thfamily}{\message{Replaced itshape by thfamily in theorem style plain.}}{\message{Unable to replace itshape by thfamily in theorem style plain.}}
+ }
\fi
-\DeclareRobustCommand{\textth}[1]{%
- {\thfamily #1}%
-}
+%\DeclareRobustCommand{\textth}[1]{%
+% {\thfamily #1}%
+%}
+\DeclareTextFontCommand{\textth}{\thfamily}
\let\textthit\textth
% Define \oldstylenums, \liningnums ,\tabularnums and \proportionalnums
-\ifntxotf
- \DeclareTextFontCommand{%
- \oldstylenums}{\addfontfeatures{Numbers=OldStyle}}
- \DeclareTextFontCommand{%
- \liningnums}{\addfontfeatures{Numbers=Lining}}
- \DeclareTextFontCommand{%
- \tabularnums}{\addfontfeatures{Numbers=Tabular}}
- \DeclareTextFontCommand{%
- \proportionalnums}{\addfontfeatures{Numbers=Proportional}}
+\ifntx@otftext
\else % type1
\DeclareTextFontCommand{%
\oldstylenums}{\fontfamily{ntx\ntx@figurealign osf}\selectfont }
diff --git a/fonts/newtx/tex/ot1minebgaramond.fd b/fonts/newtx/tex/ot1minebgaramond.fd
new file mode 100644
index 0000000000..65025b612f
--- /dev/null
+++ b/fonts/newtx/tex/ot1minebgaramond.fd
@@ -0,0 +1,366 @@
+%% Generated by msharpe on 2022/01/20
+%%
+\ProvidesFile{ot1minebgaramond.fd}
+ [2022/01/20 (msharpe) Font definitions for OT1/minebgaramond.]
+
+\def\@textscalefactor{1.05}
+%ebgaramond must be reduced by factor .93 to match xheight of newtxmath
+
+\@ifundefined{ntxmath@scale}{\let\ntxmath@scaled\@empty}
+{\@tempdima\@textscalefactor\p@
+\@tempdima\ntxmath@scale\@tempdima
+\edef\ntxmath@scaled{s*[\strip@pt\@tempdima]}}% locally, not globally
+
+\DeclareFontFamily{OT1}{minebgaramond}{}
+
+
+% ---- regular ----
+
+\DeclareFontShape{OT1}{minebgaramond}{regular}{sc}{
+ <-> \ntxmath@scaled EBGaramond-Regular-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{regular}{n}{
+ <-> \ntxmath@scaled EBGaramond-Regular-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{regular}{it}{
+ <-> \ntxmath@scaled EBGaramond-Italic-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{regular}{scit}{
+ <-> \ntxmath@scaled EBGaramond-Italic-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{regular}{sw}{
+ <-> \ntxmath@scaled EBGaramond-Italic-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{regular}{nw}{
+ <-> \ntxmath@scaled EBGaramond-Regular-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{regular}{scsl}{
+ <-> ssub * minebgaramond/regular/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{regular}{sl}{
+ <-> ssub * minebgaramond/regular/it
+}{}
+
+
+% ---- semibold ----
+
+\DeclareFontShape{OT1}{minebgaramond}{semibold}{sc}{
+ <-> \ntxmath@scaled EBGaramond-SemiBold-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{semibold}{n}{
+ <-> \ntxmath@scaled EBGaramond-SemiBold-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{semibold}{it}{
+ <-> \ntxmath@scaled EBGaramond-SemiBoldItalic-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{semibold}{scit}{
+ <-> \ntxmath@scaled EBGaramond-SemiBoldItalic-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{semibold}{sw}{
+ <-> \ntxmath@scaled EBGaramond-SemiBoldItalic-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{semibold}{nw}{
+ <-> \ntxmath@scaled EBGaramond-SemiBold-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{semibold}{scsl}{
+ <-> ssub * minebgaramond/semibold/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{semibold}{sl}{
+ <-> ssub * minebgaramond/semibold/it
+}{}
+
+
+% ---- bold ----
+
+\DeclareFontShape{OT1}{minebgaramond}{bold}{sc}{
+ <-> \ntxmath@scaled EBGaramond-Bold-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bold}{n}{
+ <-> \ntxmath@scaled EBGaramond-Bold-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bold}{it}{
+ <-> \ntxmath@scaled EBGaramond-BoldItalic-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bold}{scit}{
+ <-> \ntxmath@scaled EBGaramond-BoldItalic-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bold}{sw}{
+ <-> \ntxmath@scaled EBGaramond-BoldItalic-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bold}{nw}{
+ <-> \ntxmath@scaled EBGaramond-Bold-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bold}{scsl}{
+ <-> ssub * minebgaramond/bold/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bold}{sl}{
+ <-> ssub * minebgaramond/bold/it
+}{}
+
+
+% ---- medium ----
+
+\DeclareFontShape{OT1}{minebgaramond}{medium}{sc}{
+ <-> \ntxmath@scaled EBGaramond-Medium-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{medium}{n}{
+ <-> \ntxmath@scaled EBGaramond-Medium-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{medium}{it}{
+ <-> \ntxmath@scaled EBGaramond-MediumItalic-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{medium}{scit}{
+ <-> \ntxmath@scaled EBGaramond-MediumItalic-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{medium}{sw}{
+ <-> \ntxmath@scaled EBGaramond-MediumItalic-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{medium}{nw}{
+ <-> \ntxmath@scaled EBGaramond-Medium-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{medium}{scsl}{
+ <-> ssub * minebgaramond/medium/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{medium}{sl}{
+ <-> ssub * minebgaramond/medium/it
+}{}
+
+
+% ---- extrabold ----
+
+\DeclareFontShape{OT1}{minebgaramond}{extrabold}{sc}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBold-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{extrabold}{n}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBold-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{extrabold}{it}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBoldItalic-tlf-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{extrabold}{scit}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBoldItalic-tlf-sc-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{extrabold}{sw}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBoldItalic-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{extrabold}{nw}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBold-tlf-swash-ot1
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{extrabold}{scsl}{
+ <-> ssub * minebgaramond/extrabold/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{extrabold}{sl}{
+ <-> ssub * minebgaramond/extrabold/it
+}{}
+
+%
+% Extra 'ssub' rules to map the standard NFSS codes to our fancy names
+%
+
+% m --> regular
+
+\DeclareFontShape{OT1}{minebgaramond}{m}{scsl}{
+ <-> ssub * minebgaramond/regular/scsl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{m}{sc}{
+ <-> ssub * minebgaramond/regular/sc
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{m}{n}{
+ <-> ssub * minebgaramond/regular/n
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{m}{it}{
+ <-> ssub * minebgaramond/regular/it
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{m}{sw}{
+ <-> ssub * minebgaramond/regular/sw
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{m}{sl}{
+ <-> ssub * minebgaramond/regular/sl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{m}{scit}{
+ <-> ssub * minebgaramond/regular/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{m}{nw}{
+ <-> ssub * minebgaramond/regular/nw
+}{}
+
+
+% sb --> semibold
+
+\DeclareFontShape{OT1}{minebgaramond}{sb}{scsl}{
+ <-> ssub * minebgaramond/semibold/scsl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{sb}{sc}{
+ <-> ssub * minebgaramond/semibold/sc
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{sb}{n}{
+ <-> ssub * minebgaramond/semibold/n
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{sb}{it}{
+ <-> ssub * minebgaramond/semibold/it
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{sb}{sw}{
+ <-> ssub * minebgaramond/semibold/sw
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{sb}{sl}{
+ <-> ssub * minebgaramond/semibold/sl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{sb}{scit}{
+ <-> ssub * minebgaramond/semibold/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{sb}{nw}{
+ <-> ssub * minebgaramond/semibold/nw
+}{}
+
+
+% b --> bold
+
+\DeclareFontShape{OT1}{minebgaramond}{b}{scsl}{
+ <-> ssub * minebgaramond/bold/scsl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{b}{sc}{
+ <-> ssub * minebgaramond/bold/sc
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{b}{n}{
+ <-> ssub * minebgaramond/bold/n
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{b}{it}{
+ <-> ssub * minebgaramond/bold/it
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{b}{sw}{
+ <-> ssub * minebgaramond/bold/sw
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{b}{sl}{
+ <-> ssub * minebgaramond/bold/sl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{b}{scit}{
+ <-> ssub * minebgaramond/bold/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{b}{nw}{
+ <-> ssub * minebgaramond/bold/nw
+}{}
+
+
+% eb --> extrabold
+
+\DeclareFontShape{OT1}{minebgaramond}{eb}{scsl}{
+ <-> ssub * minebgaramond/extrabold/scsl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{eb}{sc}{
+ <-> ssub * minebgaramond/extrabold/sc
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{eb}{n}{
+ <-> ssub * minebgaramond/extrabold/n
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{eb}{it}{
+ <-> ssub * minebgaramond/extrabold/it
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{eb}{sw}{
+ <-> ssub * minebgaramond/extrabold/sw
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{eb}{sl}{
+ <-> ssub * minebgaramond/extrabold/sl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{eb}{scit}{
+ <-> ssub * minebgaramond/extrabold/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{eb}{nw}{
+ <-> ssub * minebgaramond/extrabold/nw
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bx}{n}{
+ <-> ssub * minebgaramond/b/n
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bx}{sc}{
+ <-> ssub * minebgaramond/b/sc
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bx}{scsl}{
+ <-> ssub * minebgaramond/b/scsl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bx}{it}{
+ <-> ssub * minebgaramond/b/it
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bx}{sw}{
+ <-> ssub * minebgaramond/b/sw
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bx}{sl}{
+ <-> ssub * minebgaramond/b/sl
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bx}{scit}{
+ <-> ssub * minebgaramond/b/scit
+}{}
+
+\DeclareFontShape{OT1}{minebgaramond}{bx}{nw}{
+ <-> ssub * minebgaramond/b/nw
+}{}
+
+\endinput
diff --git a/fonts/newtx/tex/ot1minntx.fd b/fonts/newtx/tex/ot1minntx.fd
new file mode 100644
index 0000000000..689ddb1b52
--- /dev/null
+++ b/fonts/newtx/tex/ot1minntx.fd
@@ -0,0 +1,42 @@
+\ProvidesFile{ot1minntx.fd}[2022/01/20 v1.0 font definition file for OT1/minntx]
+
+\@ifundefined{ifntx@sl}{\let\ifntx@sl\iftrue}{}
+\@ifundefined{ifntx@largesc}{\let\ifntx@largesc\iftrue}{}
+
+\expandafter\ifx\csname ntxmath@scaled\endcsname\relax
+ \let\ntxmath@scaled\@empty%
+\fi
+\def\ntx@asfx{}
+\def\ntx@lsfx{}
+\def\ntx@makelsfx{\ifntx@largesc\def\ntx@lsfx{l}\fi}
+\def\ntx@makeadobesc{\ifntx@adobesc\def\ntx@lsfx{l}\def\ntx@adobesc{a}\else\ntx@makelsfx\fi}
+\ntx@makelsfx
+\ifdefined\ntx@adobescfalse\ntx@makeadobesc\fi
+\ifdefined\ntx@spacing \else\global\let\ntx@spacing\@empty\fi
+
+\DeclareFontFamily{OT1}{minntx}{\ntx@spacing}
+\DeclareFontShape{OT1}{minntx}{b}{sc}{<-> \ntxmath@scaled ntx-Bold-tlf-sc\ntx@lsfx-ot1}{}
+\DeclareFontShape{OT1}{minntx}{b}{n}{<-> \ntxmath@scaled ntx-Bold-tlf-ot1}{}
+\DeclareFontShape{OT1}{minntx}{b}{scit}{<-> \ntxmath@scaled ntx-BoldItalic-tlf-sc\ntx@lsfx-ot1}{}
+\DeclareFontShape{OT1}{minntx}{b}{it}{<-> \ntxmath@scaled ntx-BoldItalic-tlf-ot1}{}
+\DeclareFontShape{OT1}{minntx}{m}{sc}{<-> \ntxmath@scaled ntx-Regular-tlf-sc\ntx@lsfx-ot1}{}
+\DeclareFontShape{OT1}{minntx}{m}{n}{<-> \ntxmath@scaled ntx-Regular-tlf-ot1}{}
+\DeclareFontShape{OT1}{minntx}{m}{scit}{<-> \ntxmath@scaled ntx-Italic-tlf-sc\ntx@lsfx-ot1}{}
+\DeclareFontShape{OT1}{minntx}{m}{it}{<-> \ntxmath@scaled ntx-Italic-tlf-ot1}{}
+\DeclareFontShape{OT1}{minntx}{bx}{sc}{<->ssub * minntx/b/sc}{}
+\DeclareFontShape{OT1}{minntx}{bx}{n}{<->ssub * minntx/b/n}{}
+\DeclareFontShape{OT1}{minntx}{bx}{scit}{<->ssub * minntx/b/scit}{}
+\DeclareFontShape{OT1}{minntx}{bx}{it}{<->ssub * minntx/b/it}{}
+\ifntx@sl % point to real slanted fonts
+ \DeclareFontShape{OT1}{minntx}{m}{sl}{<-> \ntxmath@scaled txsl}{}
+ \DeclareFontShape{OT1}{minntx}{b}{sl}{<-> \ntxmath@scaled ztmbsl-tlf-ot1}{}
+ \DeclareFontShape{OT1}{minntx}{bx}{sl}{<->ssub * minntx/b/sl}{}
+\else %point to theorem font
+ \DeclareFontShape{OT1}{minntx}{m}{sl}{<-> \ntxmath@scaled ntxth-Italic-tlf-ot1}{}
+ \DeclareFontShape{OT1}{minntx}{b}{sl}{<->ssub * minntx/m/sl}{}
+ \DeclareFontShape{OT1}{minntx}{bx}{sl}{<->ssub * minntx/m/sl}{}
+\fi
+\DeclareFontShape{OT1}{minntx}{b}{scsl}{<->ssub * minntx/b/scit}{}
+\DeclareFontShape{OT1}{minntx}{bx}{scsl}{<->ssub * minntx/b/scit}{}
+\DeclareFontShape{OT1}{minntx}{m}{scsl}{<->ssub * minntx/m/scit}{}
+\endinput
diff --git a/fonts/newtx/tex/t1minebgaramond.fd b/fonts/newtx/tex/t1minebgaramond.fd
new file mode 100644
index 0000000000..6a4ed2825d
--- /dev/null
+++ b/fonts/newtx/tex/t1minebgaramond.fd
@@ -0,0 +1,366 @@
+%% Generated by msharpe on 2022/01/20
+%%
+\ProvidesFile{t1minebgaramond.fd}
+ [2022/01/20 (msharpe) Font definitions for T1/minebgaramond.]
+
+\def\@textscalefactor{1.05}
+%ebgaramond must be reduced by factor .93 to match xheight of newtxmath
+
+\@ifundefined{ntxmath@scale}{\let\ntxmath@scaled\@empty}
+{\@tempdima\@textscalefactor\p@
+\@tempdima\ntxmath@scale\@tempdima
+\edef\ntxmath@scaled{s*[\strip@pt\@tempdima]}}% locally, not globally
+
+\DeclareFontFamily{T1}{minebgaramond}{}
+
+
+% ---- regular ----
+
+\DeclareFontShape{T1}{minebgaramond}{regular}{sc}{
+ <-> \ntxmath@scaled EBGaramond-Regular-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{regular}{n}{
+ <-> \ntxmath@scaled EBGaramond-Regular-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{regular}{it}{
+ <-> \ntxmath@scaled EBGaramond-Italic-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{regular}{scit}{
+ <-> \ntxmath@scaled EBGaramond-Italic-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{regular}{sw}{
+ <-> \ntxmath@scaled EBGaramond-Italic-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{regular}{nw}{
+ <-> \ntxmath@scaled EBGaramond-Regular-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{regular}{scsl}{
+ <-> ssub * minebgaramond/regular/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{regular}{sl}{
+ <-> ssub * minebgaramond/regular/it
+}{}
+
+
+% ---- semibold ----
+
+\DeclareFontShape{T1}{minebgaramond}{semibold}{sc}{
+ <-> \ntxmath@scaled EBGaramond-SemiBold-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{semibold}{n}{
+ <-> \ntxmath@scaled EBGaramond-SemiBold-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{semibold}{it}{
+ <-> \ntxmath@scaled EBGaramond-SemiBoldItalic-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{semibold}{scit}{
+ <-> \ntxmath@scaled EBGaramond-SemiBoldItalic-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{semibold}{sw}{
+ <-> \ntxmath@scaled EBGaramond-SemiBoldItalic-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{semibold}{nw}{
+ <-> \ntxmath@scaled EBGaramond-SemiBold-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{semibold}{scsl}{
+ <-> ssub * minebgaramond/semibold/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{semibold}{sl}{
+ <-> ssub * minebgaramond/semibold/it
+}{}
+
+
+% ---- bold ----
+
+\DeclareFontShape{T1}{minebgaramond}{bold}{sc}{
+ <-> \ntxmath@scaled EBGaramond-Bold-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bold}{n}{
+ <-> \ntxmath@scaled EBGaramond-Bold-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bold}{it}{
+ <-> \ntxmath@scaled EBGaramond-BoldItalic-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bold}{scit}{
+ <-> \ntxmath@scaled EBGaramond-BoldItalic-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bold}{sw}{
+ <-> \ntxmath@scaled EBGaramond-BoldItalic-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bold}{nw}{
+ <-> \ntxmath@scaled EBGaramond-Bold-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bold}{scsl}{
+ <-> ssub * minebgaramond/bold/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bold}{sl}{
+ <-> ssub * minebgaramond/bold/it
+}{}
+
+
+% ---- medium ----
+
+\DeclareFontShape{T1}{minebgaramond}{medium}{sc}{
+ <-> \ntxmath@scaled EBGaramond-Medium-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{medium}{n}{
+ <-> \ntxmath@scaled EBGaramond-Medium-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{medium}{it}{
+ <-> \ntxmath@scaled EBGaramond-MediumItalic-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{medium}{scit}{
+ <-> \ntxmath@scaled EBGaramond-MediumItalic-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{medium}{sw}{
+ <-> \ntxmath@scaled EBGaramond-MediumItalic-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{medium}{nw}{
+ <-> \ntxmath@scaled EBGaramond-Medium-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{medium}{scsl}{
+ <-> ssub * minebgaramond/medium/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{medium}{sl}{
+ <-> ssub * minebgaramond/medium/it
+}{}
+
+
+% ---- extrabold ----
+
+\DeclareFontShape{T1}{minebgaramond}{extrabold}{sc}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBold-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{extrabold}{n}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBold-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{extrabold}{it}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBoldItalic-tlf-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{extrabold}{scit}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBoldItalic-tlf-sc-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{extrabold}{sw}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBoldItalic-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{extrabold}{nw}{
+ <-> \ntxmath@scaled EBGaramond-ExtraBold-tlf-swash-t1
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{extrabold}{scsl}{
+ <-> ssub * minebgaramond/extrabold/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{extrabold}{sl}{
+ <-> ssub * minebgaramond/extrabold/it
+}{}
+
+%
+% Extra 'ssub' rules to map the standard NFSS codes to our fancy names
+%
+
+% m --> regular
+
+\DeclareFontShape{T1}{minebgaramond}{m}{scsl}{
+ <-> ssub * minebgaramond/regular/scsl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{m}{sc}{
+ <-> ssub * minebgaramond/regular/sc
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{m}{n}{
+ <-> ssub * minebgaramond/regular/n
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{m}{it}{
+ <-> ssub * minebgaramond/regular/it
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{m}{sw}{
+ <-> ssub * minebgaramond/regular/sw
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{m}{sl}{
+ <-> ssub * minebgaramond/regular/sl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{m}{scit}{
+ <-> ssub * minebgaramond/regular/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{m}{nw}{
+ <-> ssub * minebgaramond/regular/nw
+}{}
+
+
+% sb --> semibold
+
+\DeclareFontShape{T1}{minebgaramond}{sb}{scsl}{
+ <-> ssub * minebgaramond/semibold/scsl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{sb}{sc}{
+ <-> ssub * minebgaramond/semibold/sc
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{sb}{n}{
+ <-> ssub * minebgaramond/semibold/n
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{sb}{it}{
+ <-> ssub * minebgaramond/semibold/it
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{sb}{sw}{
+ <-> ssub * minebgaramond/semibold/sw
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{sb}{sl}{
+ <-> ssub * minebgaramond/semibold/sl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{sb}{scit}{
+ <-> ssub * minebgaramond/semibold/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{sb}{nw}{
+ <-> ssub * minebgaramond/semibold/nw
+}{}
+
+
+% b --> bold
+
+\DeclareFontShape{T1}{minebgaramond}{b}{scsl}{
+ <-> ssub * minebgaramond/bold/scsl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{b}{sc}{
+ <-> ssub * minebgaramond/bold/sc
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{b}{n}{
+ <-> ssub * minebgaramond/bold/n
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{b}{it}{
+ <-> ssub * minebgaramond/bold/it
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{b}{sw}{
+ <-> ssub * minebgaramond/bold/sw
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{b}{sl}{
+ <-> ssub * minebgaramond/bold/sl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{b}{scit}{
+ <-> ssub * minebgaramond/bold/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{b}{nw}{
+ <-> ssub * minebgaramond/bold/nw
+}{}
+
+
+% eb --> extrabold
+
+\DeclareFontShape{T1}{minebgaramond}{eb}{scsl}{
+ <-> ssub * minebgaramond/extrabold/scsl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{eb}{sc}{
+ <-> ssub * minebgaramond/extrabold/sc
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{eb}{n}{
+ <-> ssub * minebgaramond/extrabold/n
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{eb}{it}{
+ <-> ssub * minebgaramond/extrabold/it
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{eb}{sw}{
+ <-> ssub * minebgaramond/extrabold/sw
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{eb}{sl}{
+ <-> ssub * minebgaramond/extrabold/sl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{eb}{scit}{
+ <-> ssub * minebgaramond/extrabold/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{eb}{nw}{
+ <-> ssub * minebgaramond/extrabold/nw
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bx}{n}{
+ <-> ssub * minebgaramond/b/n
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bx}{sc}{
+ <-> ssub * minebgaramond/b/sc
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bx}{scsl}{
+ <-> ssub * minebgaramond/b/scsl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bx}{it}{
+ <-> ssub * minebgaramond/b/it
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bx}{sw}{
+ <-> ssub * minebgaramond/b/sw
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bx}{sl}{
+ <-> ssub * minebgaramond/b/sl
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bx}{scit}{
+ <-> ssub * minebgaramond/b/scit
+}{}
+
+\DeclareFontShape{T1}{minebgaramond}{bx}{nw}{
+ <-> ssub * minebgaramond/b/nw
+}{}
+
+\endinput
diff --git a/fonts/newtx/tex/t1minntx.fd b/fonts/newtx/tex/t1minntx.fd
new file mode 100644
index 0000000000..a5a235207b
--- /dev/null
+++ b/fonts/newtx/tex/t1minntx.fd
@@ -0,0 +1,45 @@
+\ProvidesFile{t1minntx.fd}[2022/01/20 v1.1 font definition file for T1/minntx]
+%\show\ntxmath@scaled
+\@ifundefined{ifntx@sl}{\let\ifntx@sl\iftrue}{}
+\@ifundefined{ifntx@largesc}{\let\ifntx@largesc\iftrue}{}
+
+\expandafter\ifx\csname ntxmath@scaled\endcsname\relax
+ \let\ntxmath@scaled\@empty%
+\fi
+\def\ntx@asfx{}
+\def\ntx@lsfx{}
+\def\ntx@makelsfx{\ifntx@largesc\def\ntx@lsfx{l}\fi}
+\def\ntx@makeadobesc{\ifntx@adobesc\def\ntx@lsfx{l}\def\ntx@adobesc{a}\else\ntx@makelsfx\fi}
+\ntx@makelsfx
+\ifdefined\ntx@adobescfalse\ntx@makeadobesc\fi
+\ifdefined\ntx@spacing \else\global\let\ntx@spacing\@empty\fi
+
+\DeclareFontFamily{T1}{minntx}{\ntx@spacing}
+\DeclareFontShape{T1}{minntx}{b}{sc}{<-> \ntxmath@scaled ntx-Bold-tlf-sc\ntx@lsfx-t1}{}
+\DeclareFontShape{T1}{minntx}{b}{n}{<-> \ntxmath@scaled ntx-Bold-tlf-t1}{}
+\DeclareFontShape{T1}{minntx}{b}{scit}{<-> \ntxmath@scaled ntx-BoldItalic-tlf-sc\ntx@lsfx-t1}{}
+\DeclareFontShape{T1}{minntx}{b}{it}{<-> \ntxmath@scaled ntx-BoldItalic-tlf-t1}{}
+\DeclareFontShape{T1}{minntx}{m}{sc}{<-> \ntxmath@scaled ntx-Regular-tlf-sc\ntx@lsfx-t1}{}
+\DeclareFontShape{T1}{minntx}{m}{n}{<-> \ntxmath@scaled ntx-Regular-tlf-t1}{}
+\DeclareFontShape{T1}{minntx}{m}{scit}{<-> \ntxmath@scaled ntx-Italic-tlf-sc\ntx@lsfx-t1}{}
+\DeclareFontShape{T1}{minntx}{m}{it}{<-> \ntxmath@scaled ntx-Italic-tlf-t1}{}
+\DeclareFontShape{T1}{minntx}{bx}{sc}{<->ssub * minntx/b/sc}{}
+\DeclareFontShape{T1}{minntx}{bx}{n}{<->ssub * minntx/b/n}{}
+\DeclareFontShape{T1}{minntx}{bx}{scit}{<->ssub * minntx/b/scit}{}
+\DeclareFontShape{T1}{minntx}{bx}{it}{<->ssub * minntx/b/it}{}
+\ifntx@sl % point to real slanted fonts
+ \DeclareFontShape{T1}{minntx}{m}{sl}{<-> \ntxmath@scaled t1xsl}{}
+ \DeclareFontShape{T1}{minntx}{b}{sl}{<-> \ntxmath@scaled ztmbsl-tlf-t1}{}
+ \DeclareFontShape{T1}{minntx}{bx}{sl}{<->ssub * minntx/b/sl}{}
+
+\else %point to theorem font
+ \DeclareFontShape{T1}{minntx}{m}{sl}{<-> \ntxmath@scaled ntxth-Italic-tlf-t1}{}
+ \DeclareFontShape{T1}{minntx}{b}{sl}{<->ssub * minntx/m/sl}{}
+ \DeclareFontShape{T1}{minntx}{bx}{sl}{<->ssub * minntx/m/sl}{}
+
+\fi
+
+\DeclareFontShape{T1}{minntx}{b}{scsl}{<->ssub * minntx/b/scit}{}
+\DeclareFontShape{T1}{minntx}{bx}{scsl}{<->ssub * minntx/b/scit}{}
+\DeclareFontShape{T1}{minntx}{m}{scsl}{<->ssub * minntx/m/scit}{}
+\endinput