summaryrefslogtreecommitdiff
path: root/fonts/newtx/tex/newtxtext.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-12-20 03:01:51 +0000
committerNorbert Preining <norbert@preining.info>2023-12-20 03:01:51 +0000
commit04c437f630dc0457787999e2779770fa77bdb601 (patch)
tree1a8de076bf460f11a4eec923f1b1b41932d856f9 /fonts/newtx/tex/newtxtext.sty
parent60e9a31bad8271499f6b5f9280174e76bd62814f (diff)
CTAN sync 202312200301
Diffstat (limited to 'fonts/newtx/tex/newtxtext.sty')
-rw-r--r--fonts/newtx/tex/newtxtext.sty33
1 files changed, 25 insertions, 8 deletions
diff --git a/fonts/newtx/tex/newtxtext.sty b/fonts/newtx/tex/newtxtext.sty
index 1b694330c0..b487cbc6de 100644
--- a/fonts/newtx/tex/newtxtext.sty
+++ b/fonts/newtx/tex/newtxtext.sty
@@ -11,8 +11,8 @@
%\def\ntx@state{0} % 0 for both, 1 for tutex only, 2 for legacy only
\def\setstate#1{\if 1\ntx@showstate\typeout{State=#1}\fi}
-\def\fileversion{1.734}
-\def\filedate{2023/11/14}
+\def\fileversion{1.735}
+\def\filedate{2023/12/18}
\ProvidesPackage{newtxtext}[%
\filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for TeXGyreTermesX]
@@ -43,11 +43,13 @@
% Engine check
\newif\ifntx@newtx
+\@ifundefined{ntx@otfmathtrue}{\newif\ifntx@otfmath}{}
+ % default is type1 math
+%
\@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 % otf text for unicode latex
+ \newif\ifntx@otftext
+ \iftutex\ntx@otftexttrue\fi % otf text for unicode
+%iftex's \iftutex returns true for LuaTeX and XeTeX, not [pdf]latex
%\newif\ifntx@nofontspec
% default is to load fontspec iftutex
% might have been defined in newtx.sty
@@ -58,7 +60,8 @@
}
%%%%%%%%%%%%%%%%%%
%
-%\newif\ifntx@nomath\ntx@nomathfalse % ?????
+\newif\ifntx@nomath\ntx@nomathfalse % load fontspec with no-math
+
\newif\ifntx@lining\ntx@liningtrue
\newif\ifntx@tabular\ntx@tabulartrue % default is tabular lining figures
%\@ifundefined{ver@newtxmath.sty}{\iftutex\ntx@otfmathtrue\fi}{}
@@ -69,6 +72,12 @@
\DeclareOptionX{nofontspec}[true]{}
+\DeclareOptionX{no-math}[true]{%
+\@nameuse{if#1}\ntx@nomathtrue\fi
+}
+\DeclareOptionX{otfmath}[true]{%
+\@nameuse{if#1}\ntx@otfmathtrue\fi
+}
\def\ntx@defaultfeatures{}
\DeclareOptionX{defaultfeatures}{\def\ntx@defaultfeatures{#1}}
@@ -215,6 +224,8 @@
%\def\ntx@sfrSC{#1}}
\ProcessOptionsX\relax
+% otfmath beats no-math
+\ifntx@otfmath\ntx@nomathfalse\fi
\setlength{\ntxsups@raise}{\ntxsups@raised}
\setlength{\ntxsups@scale}{\ntxsups@scaledval\p@}
\ntxsups@scale=\ntx@scale\ntxsups@scale %
@@ -240,7 +251,13 @@
\iftutex
\setstate1
- \RequirePackage[no-math]{fontspec}
+ \@ifpackageloaded{fontspec}{}{%
+ \ifntx@nomath
+ \RequirePackage[no-math]{fontspec}
+ \else
+ \RequirePackage{fontspec}
+ \fi%
+ }
%\ifxetex\XeTeXtracingfonts=1\fi % causing unwanted warnings in Tectonic system
\ifluatex % avoid possibly uncorrected "system" fonts
\directlua{fonts.names.set_location_precedence{