summaryrefslogtreecommitdiff
path: root/fonts/newtx/tex/newtxmath.sty
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/newtx/tex/newtxmath.sty')
-rw-r--r--fonts/newtx/tex/newtxmath.sty59
1 files changed, 43 insertions, 16 deletions
diff --git a/fonts/newtx/tex/newtxmath.sty b/fonts/newtx/tex/newtxmath.sty
index 5b520f004a..e0ed34db32 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.732}
-\def\filedate{2023/11/05}
+\def\fileversion{1.739}
+\def\filedate{2024/02/24}
\ProvidesPackage{newtxmath}[\filedate\space v\fileversion ]
\@ifundefined{newtxmathLoaded}{}{\endinput}
@@ -89,6 +89,7 @@
\newif\iftx@digits % use digits from letters
\newif\iftx@isenh % the math style is enhanced and can make use of new macros
% Currently (2019-12-11) only txmath, libertine, XCharter, ebgaramond, stickstoo, utopia, nc, minion and cochineal have been enhanced.
+\newif\iftx@ebgalth
\newif\iftx@cochf % switch to long f
\newif\iftx@cochrho % switch to long rho
\newif\iftx@fourier
@@ -256,15 +257,17 @@
\DeclareOption{notosans}{\tx@notosanstrue\tx@notofalse\tx@ntxmathfalse} % added in 1.629
\DeclareOption{cochf}{\tx@cochftrue} % added in 1.604
\DeclareOption{cochrho}{\tx@cochrhotrue} % added in 1.604
-\DeclareOption{alty}{\tx@XChaltytrue} % only in XCharter, added im 1.611
+\DeclareOption{alty}{\tx@XChaltytrue} % only in XCharter, added in 1.611
\DeclareOption{varg}{\def\X@s@v@rg{1}}
\DeclareOption{varvw}{\def\X@s@v@rg{0}}
\DeclareOption{internaldigits}{\tx@digitstrue}
\DeclareOption{noOT1}{\tx@nootonetrue}
\DeclareOption{amsthm}{\ntx@amsthmtrue}
\DeclareOption{propmathfigs}{\ntx@pfigstrue}
+\DeclareOption{alth}{\tx@ebgalthtrue} % for ebg only
\ExecuteOptions{%
amssymbols,uprightGreek,nosubscriptcorrection}
+
\ProcessOptions\relax
\newif\iftx@lbtn
@@ -393,14 +396,24 @@ amssymbols,uprightGreek,nosubscriptcorrection}
\def\operator@font{\mathgroup\symoperators}
\DeclareSymbolFontAlphabet{\mathrm}{operators}
-
-\DeclareMathAlphabet{\mathsf}{\encodingdefault}{\sfdefault}{m}{n}
+\iftx@slantedG
+ \DeclareMathAlphabet{\mathsf}{OT1}%{\encodingdefault}
+ {\sfdefault}{m}{it}
+ \SetMathAlphabet{\mathsf}{bold}{OT1}%{\encodingdefault}
+ {\sfdefault}{b}{it}
+\else
+ \DeclareMathAlphabet{\mathsfi}{OT1}%{\encodingdefault}
+ {\sfdefault}{m}{n}
+ \SetMathAlphabet{\mathsf}{bold}{OT1}%{\encodingdefault}
+ {\sfdefault}{b}{n}
+\fi
\DeclareMathAlphabet{\mathit}{\tx@enc}{\rmdefaultB}{m}{it}
\DeclareMathAlphabet{\mathtt}{\encodingdefault}{\ttdefault}{m}{n}
\DeclareSymbolFontAlphabet{\mathrm}{operators}
\DeclareMathAlphabet{\mathbf}{\tx@enc}{\rmdefaultB}{\bold@wt}{n}
\SetMathAlphabet{\mathit}{bold}{\tx@enc}{\rmdefaultB}{\bold@wt}{it}
-\SetMathAlphabet{\mathsf}{bold}{\encodingdefault}{\sfdefault}{b}{n}
+%\SetMathAlphabet{\mathsf}{bold}{OT1}%{\encodingdefault}
+%{\sfdefault}{b}{n}
\SetMathAlphabet{\mathtt}{bold}{\encodingdefault}{\ttdefault}{b}{n}
% change default def of \hbar in case noamssymbols
@@ -543,16 +556,6 @@ amssymbols,uprightGreek,nosubscriptcorrection}
% \DeclareMathSymbol{\imathscr}{\mathord}{letters}{194}
% \DeclareMathSymbol{\jmathscr}{\mathord}{letters}{195}
%\fi
-\iftx@coch
- \DeclareMathSymbol{\fAlt}{\mathord}{letters}{250}
- \DeclareMathSymbol{\rhoAlt}{\mathord}{letters}{251}
- \iftx@cochf
- \DeclareMathSymbol{f}{\mathord}{letters}{250}
- \fi
- \iftx@cochrho
- \let\rho\rhoAlt
- \fi
-\fi
%%%%%%%%%%%%%%%%%
% Math Italic A %
%%%%%%%%%%%%%%%%%
@@ -563,6 +566,7 @@ amssymbols,uprightGreek,nosubscriptcorrection}
\DeclareFontSubstitution{U}{ntxmia}{m}{it}
\DeclareSymbolFontAlphabet{\mathfrak}{lettersA}
+
%%%%%%%%%%%%%%%
% Math Symbol %
%%%%%%%%%%%%%%%
@@ -3230,6 +3234,28 @@ $\hfil\displaystyle{#1}\hfil$\crcr%
\fi
\endgroup
}
+\iftx@ebgm
+ \DeclareMathSymbol{\hAlt}{\mathord}{letters}{250}
+ \DeclareMathSymbol{\hslashAlt}{\mathord}{lettersA}{252}
+ \DeclareMathSymbol{\hbarAlt}{\mathord}{lettersA}{253}
+ \iftx@ebgalth
+ \DeclareMathSymbol{h}{\mathord}{letters}{250}
+ \RenewCommandCopy{\hslash}{\hslashAlt}
+ \RenewCommandCopy{\hbar}{\hbarAlt}
+ \fi
+\fi
+
+\iftx@coch
+ \DeclareMathSymbol{\fAlt}{\mathord}{letters}{250}
+ \DeclareMathSymbol{\rhoAlt}{\mathord}{letters}{251}
+ \iftx@cochf
+ \DeclareMathSymbol{f}{\mathord}{letters}{250}
+ \fi
+ \iftx@cochrho
+ \RenewCommandCopy{\rho}{\rhoAlt}
+ \fi
+\fi
+
% For users of older newtxmath
\AtBeginDocument{%
\providecommand*\Coloneqq{\Coloneq}
@@ -3237,6 +3263,7 @@ $\hfil\displaystyle{#1}\hfil$\crcr%
\providecommand*\Coloneq{\Colondash}
\providecommand*\Eqcolon{\Dashcolon}}
+
% Fix for garamondx with siunitx
\iftx@gm%
\AtEndPreamble{%