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.sty57
1 files changed, 39 insertions, 18 deletions
diff --git a/fonts/newtx/tex/newtxmath.sty b/fonts/newtx/tex/newtxmath.sty
index 88b2b1180c..500ae8e321 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.626}
-\def\filedate{2020/05/02}
+\def\fileversion{1.628}
+\def\filedate{2020/07/22}
\ProvidesPackage{newtxmath}[\filedate\space v\fileversion ]
\@ifundefined{newtxmathLoaded}{}{\endinput}
@@ -21,6 +21,7 @@
\csname newtxmathLoaded\endcsname
\let\newtxmathLoaded\endinput
\RequirePackage{amsmath} % improves extendable delimiter handling
+\RequirePackage{ifthen}
\RequirePackage{etoolbox}
%\RequirePackage{trimspaces} % for trim@pre@space
@@ -82,8 +83,10 @@
\newif\iftx@stxtwo
\newif\iftx@sbc
%\newif\iftx@spc
+\newif\iftx@nootone % do not switch to OT1 for operators
+\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 and cochineal have been enhanced.
+% Currently (2019-12-11) only txmath, libertine, XCharter, ebgaramond, stickstoo, utopia, nc, minion and cochineal have been enhanced.
\newif\iftx@cochf % switch to long f
\newif\iftx@cochrho % switch to long rho
\newif\iftx@fourier
@@ -96,7 +99,8 @@
\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
-
+% test if tm is loaded minimally as with XeLaTeX newtxmath
+\ifthenelse{\equal{\rmdefault}{ntxtlf}}{\tx@hastmtrue\def\rmdefaultB{ntxtlf}}{}
%\expandafter\ifx\csname qnc@scale\endcsname\relax
%\else
% \let\znc@scale=\qnc@scale % scale set by tgschola.sty
@@ -243,6 +247,8 @@
\DeclareOption{alty}{\tx@XChaltytrue} % only in XCharter, added im 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}
\ExecuteOptions{%
amssymbols,uprightGreek,nosubscriptcorrection}
@@ -316,6 +322,8 @@ amssymbols,uprightGreek,nosubscriptcorrection}
\iftx@minion\edef\rmdefaultB{MinionPro-TLF}\fi
\edef\bold@wt{\ifx\iflibertine@otf\undefined b\else sb\fi}
\let\tx@enc\encodingdefault
+%:
+\iftx@nootone\tx@otfalse\fi
\iftx@ot\let\tx@enc\ot@one\fi
\DeclareSymbolFont{operators}{\tx@enc}{\rmdefaultB}{m}{n}
\SetSymbolFont{operators}{bold}{\tx@enc}{\rmdefaultB}{\bold@wt}{n}
@@ -439,17 +447,18 @@ amssymbols,uprightGreek,nosubscriptcorrection}
%\show\tx@subs
\iftx@isenh
-% \DeclareMathSymbol{0}{\mathord}{letters}{132}
-% \DeclareMathSymbol{1}{\mathord}{letters}{133}
-% \DeclareMathSymbol{2}{\mathord}{letters}{134}
-% \DeclareMathSymbol{3}{\mathord}{letters}{135}
-% \DeclareMathSymbol{4}{\mathord}{letters}{136}
-% \DeclareMathSymbol{5}{\mathord}{letters}{137}
-% \DeclareMathSymbol{6}{\mathord}{letters}{138}
-% \DeclareMathSymbol{7}{\mathord}{letters}{139}
-% \DeclareMathSymbol{8}{\mathord}{letters}{140}
-% \DeclareMathSymbol{9}{\mathord}{letters}{141}
-
+\iftx@digits
+ \DeclareMathSymbol{0}{\mathord}{letters}{132}
+ \DeclareMathSymbol{1}{\mathord}{letters}{133}
+ \DeclareMathSymbol{2}{\mathord}{letters}{134}
+ \DeclareMathSymbol{3}{\mathord}{letters}{135}
+ \DeclareMathSymbol{4}{\mathord}{letters}{136}
+ \DeclareMathSymbol{5}{\mathord}{letters}{137}
+ \DeclareMathSymbol{6}{\mathord}{letters}{138}
+ \DeclareMathSymbol{7}{\mathord}{letters}{139}
+ \DeclareMathSymbol{8}{\mathord}{letters}{140}
+ \DeclareMathSymbol{9}{\mathord}{letters}{141}
+\fi
\iftx@upscr
\DeclareRobustCommand{\mathscr}[1]{\ntx@alfa{#1}{196}{222}{248}{249}{}{letters}}
\DeclareMathSymbol{\imathscr}{\mathord}{letters}{248}
@@ -2359,7 +2368,7 @@ $\hfil\displaystyle{#1}\hfil$\crcr%
\ifnum\ntx@jmath>255\relax #1\ntx@tmpc=256 \message{^^JNo jmath in this alphabet^^J}\fi
\else % neither \imath nor \jmath
\ifiscseq{#1}{#1\ntx@tmpc=256 }{% not a cs
- \ntx@tmpc=\number\@xp`#1}
+ \ntx@tmpc=\number\@xp`#1}
\fi
\fi
%\message{^^JCharacter index = \the\ntx@tmpc^^J}
@@ -2400,11 +2409,13 @@ $\hfil\displaystyle{#1}\hfil$\crcr%
\fi
\fi
\fi
- \ifnum\ntx@tmpc<256\relax
+ \ifnum\tx@IsAlNum>\z@
+ \ifnum\ntx@tmpc<256\relax
\edef\ntx@char{"\@xp\hexnumber@\csname sym\ntx@fam\endcsname\nhex{2}{\the\ntx@tmpc}}
%\message{^^Joutput char = \ntx@char^^J}
\@xp\mathchar\ntx@char%\traceoff
- \fi %end of ifnum <256
+ \fi %end of ifnum <256
+ \fi %end of ifnum >0
}
% This really needs to be reorganized
\iftx@stxtwo
@@ -2758,6 +2769,7 @@ $\hfil\displaystyle{#1}\hfil$\crcr%
%%%%%%% Additional pdf to unicode values not in Ross Moore's collection
% Conditional needed for engines other than pdflatex
\ifx\pdfglyphtounicode\@undefined \else
+\pdfgentounicode=1
\pdfglyphtounicode{nPerp}{2AEB 2215}% .. ..
\pdfglyphtounicode{periodcentered.B}{00B7}
\pdfglyphtounicode{periodcentered.BB}{22C5}
@@ -2769,5 +2781,14 @@ $\hfil\displaystyle{#1}\hfil$\crcr%
\pdfglyphtounicode{emptyset.alt2}{2205}
\pdfglyphtounicode{transpose}{1D40}
\pdfglyphtounicode{hermitconj}{22B9}
+\pdfglyphtounicode{EM}{0058 0058 0058 0058 0058 0058 0058 0058}%
+\pdfglyphtounicode{NUL}{0060 0060 0060 0060 0060 0060 0060 0060}%
+\pdfglyphtounicode{uni222B.dsp}{222B FE01}%
+\pdfglyphtounicode{summationdisplay.1}{2211 FE01}%
+\pdfglyphtounicode{summationdisplay}{2211 FE01}%
+\pdfglyphtounicode{radicalbig}{221A FE01}%
+\pdfglyphtounicode{radicalbigg}{221A FE02}%
+\pdfglyphtounicode{radicalBig}{221A FE03}%
+\pdfglyphtounicode{radicalBigg}{221A FE04}%
\fi
\endinput