diff options
author | Norbert Preining <norbert@preining.info> | 2023-07-28 03:01:08 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-07-28 03:01:08 +0000 |
commit | 1e45d661b659c3025746d3a41119300ab90d1dcd (patch) | |
tree | 9dfdc2d448c84ef1c1da6adef3145432703d179e /fonts/newtx/tex/newtxtext.sty | |
parent | 1ee18e17580e3a6c28aa966924ce0be160ef3577 (diff) |
CTAN sync 202307280301
Diffstat (limited to 'fonts/newtx/tex/newtxtext.sty')
-rw-r--r-- | fonts/newtx/tex/newtxtext.sty | 118 |
1 files changed, 57 insertions, 61 deletions
diff --git a/fonts/newtx/tex/newtxtext.sty b/fonts/newtx/tex/newtxtext.sty index 2f02b73f10..b1b3ba6fae 100644 --- a/fonts/newtx/tex/newtxtext.sty +++ b/fonts/newtx/tex/newtxtext.sty @@ -8,8 +8,8 @@ % Text is now directed to an extension of TeXGyreTermes rather than tx. % 1.7 is first version of newtxtext to support both [pdf]latex and unicode latex. -\def\fileversion{1.71} -\def\filedate{2022/02/28} +\def\fileversion{1.72} +\def\filedate{2023/07/20} \ProvidesPackage{newtxtext}[% \filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for TeXGyreTermesX] @@ -36,8 +36,9 @@ \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 + \iftutex\ntx@otftexttrue\fi % 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 @@ -46,30 +47,29 @@ } %%%%%%%%%%%%%%%%%% % - %\newif\ifntx@nomath\ntx@nomathfalse % ????? \newif\ifntx@lining\ntx@liningtrue \newif\ifntx@tabular\ntx@tabulartrue % default is tabular lining figures \@ifundefined{ver@newtxmath.sty}{\iftutex\ntx@otfmathtrue\fi}{} -\DeclareOptionX{type1}[true]{% -\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{otfmath}[true]{% -\def\ntx@tmpx{\@nameuse{if#1}\iftutex\ntx@otfmathtrue\fi\fi} -\ifntx@newtx -\else\ntx@tmpx\fi} - -\DeclareOptionX{nofontspec}[true]{% -\def\ntx@tmpx{\@nameuse{if#1}\ntx@nofontspectrue\fi} -\ifntx@newtx -\else\ntx@tmpx\fi} +\DeclareOptionX{type1}[true]{} +%{\def\ntx@tmpx{\@nameuse{if#1}\ntx@otftextfalse\fi} +\DeclareOptionX{type1text}[true]{} +%{% +%\def\ntx@tmpx{\@nameuse{if#1}\ntx@otftextfalse\fi} +%\ifntx@newtx +%\else\ntx@tmpx\fi} + +%\DeclareOptionX{otfmath}[true]{% +%\def\ntx@tmpx{\@nameuse{if#1}\iftutex\ntx@otfmathtrue\fi\fi} +%\ifntx@newtx +%\else\ntx@tmpx\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} @@ -197,13 +197,14 @@ \gdef\ntx@shrink{.1em}\def\ntx@nolo{F}} %\traceon \ProcessOptionsX\relax -% Check for conflict between nofontspec and others -\ifntx@nofontspec - \iftutex - \ntx@otfmathfalse - \ntx@otftextfalse - \fi -\fi +%% Check for conflict between nofontspec and others +%\ifntx@nofontspec +% \iftutex +% \@latex@error{Option nofontspec no longer supported by newtx}\@ehd +% %\ntx@otfmathfalse +% %\ntx@otftextfalse +% \fi +%\fi \ifntx@otftext \typeout{ntx@otftexttrue}\else\typeout{ntx@otftextfalse}\fi \ifntx@newtx\let\ntx@scale=\ntxtext@scale\fi @@ -223,30 +224,23 @@ \DeclareTextSymbol{#1}{#2}{#3}} \iftutex - \ifntx@nofontspec % do nothing - \else - \ifntx@otfmath - \RequirePackage{fontspec} - \else - \RequirePackage[no-math]{fontspec} - \fi - \fi -\fi - -\ifntx@otftext - \ifxetex\XeTeXtracingfonts=1\fi + \RequirePackage[no-math]{fontspec} + %\ifxetex\XeTeXtracingfonts=1\fi % causing unwanted warnings in Tectonic system \ifluatex % avoid possibly uncorrected "system" fonts \directlua{fonts.names.set_location_precedence{ "local", "texmf", "system" }} \fi +\fi + +\ifntx@otftext \def\ntx@base{TeXGyreTermesX} \newcommand{\textfrac}[3][]{{%\normalfont% -\mbox{% + \mbox{% \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1] {{\lfstyle#1}\kern.04em}{}% -\addfontfeatures{RawFeature=+sups}#2\char"2044% numerator -\addfontfeatures{RawFeature=-sups;+dnom;+ss20}\char"2044{}#3% + \addfontfeatures{RawFeature=+sups}#2\char"2044% numerator + \addfontfeatures{RawFeature=-sups;+dnom;+ss20}\char"2044{}#3% }}} \else % type1 @@ -265,8 +259,8 @@ \let\nustyle=\sustyle \let\nufigures=\sustyle - \fa@naming@exception{figures}{{inferior}{proportional}}{inf} - \fa@naming@exception{figures}{{inferior}{tabular}}{inf} + \fa@naming@exception{figures}{{inferior}{proportional}}{inf} + \fa@naming@exception{figures}{{inferior}{tabular}}{inf} % \def\infigures{\@nomath\infigures % \fontfigurestyle{inferior}\selectfont} % \let\instyle=\infigures @@ -277,14 +271,14 @@ \fontfamily{ntxinf}\selectfont} \let\infigures=\instyle - \fa@naming@exception{figures}{{denominators}{proportional}}{dnom} - \fa@naming@exception{figures}{{denominators}{tabular}}{dnom} + \fa@naming@exception{figures}{{denominators}{proportional}}{dnom} + \fa@naming@exception{figures}{{denominators}{tabular}}{dnom} % \def\defigures{\@nomath\defigures % \fontfamily{defigures}\selectfont} % \let\destyle=\defigures % \DeclareTextFontCommand{\textde}{\defigures} % \let\textdenominators\textde - \DeclareRobustCommand{\destyle}{% + \DeclareRobustCommand{\destyle}{% \not@math@alphabet\destyle\relax \fontfamily{ntxdnom}\selectfont} \let\defigures=\destyle @@ -294,8 +288,8 @@ % \def\defigures{\@nomath\nufigures % \fontfigurestyle{numerators}\selectfont} % \let\nustyle=\nufigures -% \DeclareTextFontCommand{\textnu}{\nufigures} -% \let\textnumerators\textnu +% \DeclareTextFontCommand{\textnum}{\nufigures} +% \let\textnumerators\textnum % \DeclareRobustCommand{\nustyle}{% % \not@math@alphabet\nustyle\relax % \fontfamily{ntxnumr}\selectfont} @@ -458,33 +452,35 @@ \fi%} \ifntx@otftext + % \def\ntx@nft{\if t\ntx@thmtab Monospaced% % \else Proportional\fi} \DeclareRobustCommand{\lfstyle}{% \not@math@alphabet\lfstyle\relax \addfontfeatures{Numbers={Proportional,Lining}}% } - \DeclareRobustCommand{\tlfstyle}{% + + \DeclareRobustCommand{\tlfstyle}{% \not@math@alphabet\tlfstyle\relax \addfontfeatures{Numbers={Monospaced,Lining}}% } - \DeclareRobustCommand{\osfstyle}{% + \DeclareRobustCommand{\osfstyle}{% \not@math@alphabet\osfstyle\relax \addfontfeatures{Numbers={Proportional,OldStyle}}% } - \DeclareRobustCommand{\tosfstyle}{% + \DeclareRobustCommand{\tosfstyle}{% \not@math@alphabet\tosfstyle\relax \addfontfeatures{Numbers={Monospaced,OldStyle}}% } - \DeclareRobustCommand{\oldstylenums}{% + \DeclareRobustCommand{\oldstylenums}{% \not@math@alphabet\oldstylenums\relax \addfontfeatures{Numbers=OldStyle}% } - \DeclareRobustCommand{\liningnums}{% + \DeclareRobustCommand{\liningnums}{% \not@math@alphabet\liningnums\relax \addfontfeatures{Numbers=Lining}% } - \DeclareRobustCommand{\tabularnums}{% + \DeclareRobustCommand{\tabularnums}{% \not@math@alphabet\tabularnums\relax \addfontfeatures{Numbers=Monospaced}% } @@ -567,11 +563,11 @@ \DeclareTextFontCommand{\texttosf}{\tosfstyle} \DeclareTextFontCommand{\texttlf}{\tlfstyle} \DeclareTextFontCommand{\textlf}{\lfstyle} - +%\show\textlf \DeclareTextFontCommand{\textsu}{\sustyle} \let\textsuperior\textsu -\DeclareTextFontCommand{\textnu}{\nustyle} - \let\textnumerator\textnu +\DeclareTextFontCommand{\textnum}{\nustyle} + \let\textnumerator\textnum \DeclareTextFontCommand{\textde}{\destyle} \let\textdenominator\textde \DeclareTextFontCommand{\textinf}{\instyle} |