diff options
author | Norbert Preining <norbert@preining.info> | 2023-10-31 03:02:14 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-10-31 03:02:14 +0000 |
commit | 8e5b71c9e0334c62d993c6d03d9a5a98ca59518b (patch) | |
tree | 9677032880e3306dd8b3ad5a9418ae5440b683d2 /fonts/newtx/tex/newtxtext.sty | |
parent | 8647e4164dd0349eb19a3068ec19c135647e1b4c (diff) |
CTAN sync 202310310302
Diffstat (limited to 'fonts/newtx/tex/newtxtext.sty')
-rw-r--r-- | fonts/newtx/tex/newtxtext.sty | 433 |
1 files changed, 297 insertions, 136 deletions
diff --git a/fonts/newtx/tex/newtxtext.sty b/fonts/newtx/tex/newtxtext.sty index ac157b31e4..7e0234555f 100644 --- a/fonts/newtx/tex/newtxtext.sty +++ b/fonts/newtx/tex/newtxtext.sty @@ -7,14 +7,17 @@ % Added scaled keyword and osf option; % 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\ntx@showstate{0} % turn off state debugging---1 for on +%\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.724} -\def\filedate{2023/08/20} +\def\fileversion{1.73} +\def\filedate{2023/10/29} \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{xpatch,xcolor} % need to patch \scshape \RequirePackage{iftex,xkeyval,etoolbox,textcomp} \RequirePackage{xstring,ifthen,scalefnt} % for \textfrac \RequirePackage{mweights} % should be in latex kernel @@ -26,9 +29,17 @@ %KOMA check \newif\ifntx@KOMA -\@ifundefined{KOMAClassName}{}{\ntx@KOMAtrue} -\@ifundefined{ver@scrextend.sty}{}{\ntx@KOMAtrue} - +\@ifundefined{ftntm@font}{}{\ntx@KOMAtrue} +%\@ifundefined{ver@scrextend.sty}{}{\ntx@KOMAtrue} +%LTX check +\newif\ifntx@LTX +\@ifclassloaded{article}{\ntx@LTXtrue}{} +\@ifclassloaded{report}{\ntx@LTXtrue}{} +\@ifclassloaded{book}{\ntx@LTXtrue}{} +\newif\ifntx@AMSloaded +\@ifclassloaded{amsart}{\ntx@AMSloadedtrue}{} +\@ifclassloaded{amsproc}{\ntx@AMSloadedtrue}{} +\@ifclassloaded{amsbook}{\ntx@AMSloadedtrue}{} % Engine check \newif\ifntx@newtx @@ -50,31 +61,13 @@ %\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}{} +%\@ifundefined{ver@newtxmath.sty}{\iftutex\ntx@otfmathtrue\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} -%\ifntx@newtx -%\else\ntx@tmpx\fi} \def\ntx@defaultfeatures{} \DeclareOptionX{defaultfeatures}{\def\ntx@defaultfeatures{#1}} @@ -128,6 +121,20 @@ \newcommand*{\ntx@scale}{1} % actual scaled command in \ntx@scaled \DeclareOptionX{scale}{\renewcommand*{\ntx@scale}{#1}} \DeclareOptionX{scaled}{\renewcommand*{\ntx@scale}{#1}} +\newdimen\ntxsups@scale +\newdimen\ntxsups@raise +\def\ntxsups@raised{\z@} +\def\ntxsups@Lspaced{.03em} +\def\ntxsups@Rspaced{.03em} +\def\ntxsups@scaledval{1} +\def\ntxsups@scalefactor{1} +\newcommand*{\ntxsups@color}{black} +\DeclareOptionX{supscaled}{\renewcommand*{\ntxsups@scaledval}{#1}}%added 2023/09/16 +\DeclareOptionX{supscale}{\renewcommand*{\ntxsups@scaledval}{#1}}%added 2023/09/16 +\DeclareOptionX{supsraised}{\renewcommand*{\ntxsups@raised}{#1}}%added 2023/09/16 +\DeclareOptionX{supLspaced}{\renewcommand*{\ntxsups@Lspaced}{#1}}%added 2023/09/16 +\DeclareOptionX{supRspaced}{\renewcommand*{\ntxsups@Rspaced}{#1}}%added 2023/09/16 +\DeclareOptionX{supscolor}{\renewcommand*{\ntxsups@color}{#1}} %added 2023/09/16 \newif\ifntx@defaultsups %\newif\ifntx@adobesc % we don't use this exc. in fd, but may in future @@ -137,7 +144,8 @@ \newif\ifntx@tt \ntx@tttrue % default is to load ntxtt as typewriter font \newif\ifntx@thrm \newif\ifntx@sl - +\newif\ifntx@oldsu\ntx@oldsutrue %use old versions of sups/subs +\def\ntx@suver{alt} % sups version, alt (the old version) or {} for new version % Other options \DeclareOptionX{defaultsups}[true]{% \@nameuse{ntx@defaultsups#1} @@ -181,6 +189,7 @@ \newif\ifntx@zeroslash \def\ntx@thmlin{X} % default is to not change to lining \def\ntx@noti{T}\def\ntx@nolo{T} +\DeclareOptionX{newsu}{\def\ntx@suver{}\ntx@oldsufalse}% added 2023/09/16 \DeclareOptionX{defaultfeatures}{\def\ntx@defaultfeatures{#1}} \DeclareOptionX{oldSS}{\advance\ntx@cnt 32 } \DeclareOptionX{slashedzero}{\ntx@zeroslashtrue} @@ -196,17 +205,23 @@ \gdef\ntx@spc{.3em}\gdef\ntx@stretch{.2em}% \gdef\ntx@shrink{.1em}\def\ntx@nolo{F}} %\traceon +%\DeclareOptionX{sfracvcenter}{% +%\def\ntx@sfrVC{#1}} +%\DeclareOptionX{sfracvspacing}{% +%\def\ntx@sfrVS{#1}} +%\DeclareOptionX{sfracbarthick}{% +%\def\ntx@sfrTH{#1}} +%\DeclareOptionX{sfracscaling}{% +%\def\ntx@sfrSC{#1}} \ProcessOptionsX\relax -%% 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 +\setlength{\ntxsups@raise}{\ntxsups@raised} +\setlength{\ntxsups@scale}{\ntxsups@scaledval\p@} +\ntxsups@scale=\ntx@scale\ntxsups@scale % +\def\ntxsups@scalefactor{\strip@pt\ntxsups@scale} +\def\ntxsups@scaled{s*[\ntxsups@scalefactor]} + +%\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 @@ -224,6 +239,7 @@ \DeclareTextSymbol{#1}{#2}{#3}} \iftutex +\setstate1 \RequirePackage[no-math]{fontspec} %\ifxetex\XeTeXtracingfonts=1\fi % causing unwanted warnings in Tectonic system \ifluatex % avoid possibly uncorrected "system" fonts @@ -233,32 +249,73 @@ \fi \ifntx@otftext +\setstate1 \def\ntx@base{TeXGyreTermesX} - + \ifntx@scosf + \AtBeginDocument{% + \xpretocmd{\scshape} + {\addfontfeatures{Numbers=OldStyle}} + {}{}% + }% + \fi \newcommand{\textfrac}[3][]{{%\normalfont% \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% + {{\lfstyle#1}\kern.06em}{}% + \addfontfeatures{RawFeature=+numr}#2\char"2044% numerator + \addfontfeatures{RawFeature=-numr;+dnom;+ss20}\char"2044{}#3% }}} \else % type1 - \RequirePackage{fontaxes} +\setstate2 + + \ifntx@scosf + \AtBeginDocument{% + \xpretocmd{\scshape} + {\fontfamily{ntx\ntx@figurealign osf}} + {}{}% + }% + \fi% + % for possible use in footnote markers +% \DeclareFontFamily{OT1}{zsups}{}% +% \DeclareFontShape{OT1}{zsups}{m}{n}{% +% <-> s*[\ntxsups@scalefactor] ntxsups-Regular-ot1 +%}{} +% \DeclareFontFamily{T1}{zsups}{}% +% \DeclareFontShape{T1}{zsups}{m}{n}{% +% <-> s*[\ntxsups@scalefactor] ntxsups-Regular-t1 +%}{} +%\AtEndPreamble{% +% \@ifundefined{T@LY1}{}% true branch +% {%false branch---LY1 encoding has been declared +% \DeclareFontFamily{LY1}{zsups}{}% +% \DeclareFontShape{LY1}{zsups}{m}{n}{% +% <-> s*[\ntxsups@scalefactor] ntxsups-Regular-ly1 +%}{} +%}} +% \DeclareFontFamily{TS1}{zsups}{}% +% \DeclareFontShape{TS1}{zsups}{m}{n}{% +% <-> s*[\ntxsups@scalefactor] ntxsups-Regular-ts1 +%}{} +%\DeclareRobustCommand{\supstyle}{% +% \not@math@alphabet\supstyle\relax +% \usefont{\f@encoding}{zsups}{m}{n}} +% +%\ifdim\ntxsups@raise=\z@ +% \DeclareRobustCommand{\textsups}[1]{{\supstyle#1}} +%\else +% \DeclareRobustCommand{\textsups}[1]{% +% \raisebox{\ntxsups@raised}{\hbox{{\supstyle#1}}}} +%\fi +\RequirePackage{fontaxes} \fa@naming@exception{figures}{{superior}{proportional}}{sups} \fa@naming@exception{figures}{{superior}{tabular}}{sups} -% \def\sufigures{\@nomath\sufigures -% \fontfigurestyle{superior}\selectfont} -% \let\sustyle=\sufigures -% \DeclareTextFontCommand{\textsu}{\sufigures} -% \let\textsuperior\textsu \DeclareRobustCommand{\sustyle}{% \not@math@alphabet\sustyle\relax - \fontfamily{ntxsups}\selectfont} - \let\sufigures=\sustyle - \let\nustyle=\sustyle - \let\nufigures=\sustyle - + \fontfamily{ntxsups\ntx@suver}\selectfont} + \NewCommandCopy { \sufigures } { \sustyle } +% \let\sufigures=\sustyle%%%%% + \fa@naming@exception{figures}{{inferior}{proportional}}{inf} \fa@naming@exception{figures}{{inferior}{tabular}}{inf} % \def\infigures{\@nomath\infigures @@ -266,11 +323,23 @@ % \let\instyle=\infigures % \DeclareTextFontCommand{\textinf}{\infigures} % \let\textinferior\textinf - \DeclareRobustCommand{\instyle}{% - \not@math@alphabet\instyle\relax - \fontfamily{ntxinf}\selectfont} - \let\infigures=\instyle - + \DeclareRobustCommand{\infstyle}{% + \not@math@alphabet\infstyle\relax + \fontfamily{ntxinf\ntx@suver}\selectfont} + \NewCommandCopy { \infigures } { \infstyle } + \NewCommandCopy { \instyle } { \infstyle } +% \let\infigures=\infstyle%%%%% +% \let\instyle\infstyle + + \fa@naming@exception{figures}{{numerators}{proportional}}{numr} + \fa@naming@exception{figures}{{numerators}{tabular}}{numr} + + \DeclareRobustCommand{\nustyle}{% + \not@math@alphabet\nustyle\relax + \fontfamily{ntxnumr}\selectfont} + \NewCommandCopy { \nufigures } { \nustyle } +% \let\nufigures=\nustyle + \fa@naming@exception{figures}{{denominators}{proportional}}{dnom} \fa@naming@exception{figures}{{denominators}{tabular}}{dnom} % \def\defigures{\@nomath\defigures @@ -281,7 +350,8 @@ \DeclareRobustCommand{\destyle}{% \not@math@alphabet\destyle\relax \fontfamily{ntxdnom}\selectfont} - \let\defigures=\destyle + \NewCommandCopy { \defigures } { \defstyle } + %\let\defigures=\destyle % \fa@naming@exception{figures}{{numerators}{proportional}}{numr} % \fa@naming@exception{figures}{{numerators}{tabular}}{numr} @@ -299,7 +369,7 @@ \mbox{% \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1] {\textlf{#1}\kern.1em}{}% - {\sustyle#2}% numerator + {\nustyle#2}% numerator \StrRight{#2}{1}[\@digit@]% % look for 1, 2, 6, 7 \ifcase\@digit@% 0 @@ -331,9 +401,10 @@ }%mbox } % textfrac \fi +\setstate0 -\let\orig@footnote=\thefootnote -\let\orig@makefnmark=\@makefnmark +%\let\orig@footnote=\thefootnote +%\let\orig@makefnmark=\@makefnmark \def\bfseries@rm{b} \def\mdseries@rm{m} @@ -343,6 +414,7 @@ \@onlypreamble\useproportional \ifntx@otftext +\setstate1 \def\ntx@dflt{} \ifntx@zeroslash\edef\ntx@dflt{Numbers = SlashedZero , }\fi @@ -376,14 +448,16 @@ Scale = \ntx@scale , Extension = .otf , SmallCapsFeatures={\ifntx@scosf Numbers = OldStyle , - \fi RawFeature = +\ntx@scraw , - \ifluatex Renderer=Basic\fi} , + \fi RawFeature = +\ntx@scraw } , + \ifluatex Renderer=Basic ,\fi \ntx@dflt , RawFeature=-ss05 , \ntx@defaultfeatures , } \else % type1 + \setstate2 + \def\ntx@spacing{% \fontdimen2\font=\ntx@spc \fontdimen3\font=\ntx@stretch @@ -391,8 +465,6 @@ %\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.}} - \DeclareRobustCommand{\lfstyle}{% \not@math@alphabet\lfstyle\relax \fontfamily{ntxlf}\selectfont % @@ -411,28 +483,60 @@ } \ifntx@defaultsups % \else - \ifntx@KOMA - %\let\textsuperscript\sustyle - \else % NOT KOMA - \def\f@@tn@te{footnote} - \def\@makefnmark{% - \ifx\@mpfn\f@@tn@te% - \ifx\thefootnote\orig@footnote% - \hbox{\sustyle\hspace*{.05em}\@thefnmark\hspace*{.05em}}% - \else% - \orig@makefnmark% - \fi - \else% - \orig@makefnmark% - \fi}% - \fi + \ExplSyntaxOn + %\@textsuperscript is defined in latex.ltx to render text at about 70% size, at math superscript position + \DeclareDocumentCommand \textsuperscript {m} { + \hbox_set:Nn \l_tmpa_box {{\sustyle #1}} + \box_scale:Nnn \l_tmpa_box { \ntxsups@scalefactor } { \ntxsups@scalefactor } + \hbox_set:Nn \l_tmpa_box + { \box_move_up:nn \ntxsups@raised {\box_use:N \l_tmpa_box} } + \hspace*{\ntxsups@Lspaced}{\color{\ntxsups@color}\box_use:N \l_tmpa_box} \hspace*{\ntxsups@Rspaced}}% + + + \cs_set:Npn \@makefnmark { + \mbox{% + \footnotemarkfont\textsuperscript{\@thefnmark}} + } + \cs_if_exist:NTF \ftntm@font % will exist only for KOMA + { + \cs_new:Npn \footnotemarkfont {\normalfont \ftntm@font} + } + { + \cs_new:Npn \footnotemarkfont {\normalfont} + } + \ExplSyntaxOff + \patchcmd{\maketitle}{\@textsuperscript{\normalfont\@thefnmark}}{\normalfont{\textsuperscript\@thefnmark}}{}{} + \patchcmd{\maketitle}{\@textsuperscript{\normalfont\@thefnmark}}{\normalfont{\textsuperscript\@thefnmark}}{}{} +% \patchcmd{\maketitle} +%{\hb@xt@1.8em}{\hb@xt@1.8em}{}{} %2.18? + \ifntx@KOMA + \setkomafont{footnotereference}{\normalfont\sustyle} + \setkomafont{footnotelabel}{\normalfont\sustyle} \fi + \fi +% \ifntx@KOMA +% %\let\textsuperscript\sustyle +% \else % NOT KOMA +% \def\f@@tn@te{footnote} +% \def\@makefnmark{% +% \ifx\@mpfn\f@@tn@te% +% \ifx\thefootnote\orig@footnote% +% \hbox{\sustyle\hspace*{.05em}\@thefnmark\hspace*{.05em}}% +% \else% +% \orig@makefnmark% +% \fi +% \else% +% \orig@makefnmark% +% \fi}% +% \fi +% \fi \ifntx@helv\renewcommand*{\sfdefault}{qhv}\fi \ifntx@tt\renewcommand*{\ttdefault}{ntxtt}\fi \DeclareRobustCommand\thfamily % new family for theorem font {\not@math@alphabet\thfamily\relax \fontfamily\thdefault\selectfont} \fi % type1 +\setstate0 \ifntx@thrm %\RequirePackage{amsmath,amsthm} % in case of theoremfont @@ -452,6 +556,7 @@ \fi%} \ifntx@otftext +\setstate1 % \def\ntx@nft{\if t\ntx@thmtab Monospaced% % \else Proportional\fi} @@ -488,53 +593,94 @@ \not@math@alphabet\proportionalnums\relax \addfontfeatures{Numbers=Proportional}% } + \DeclareRobustCommand{\destyle}{% + \not@math@alphabet\destyle\relax + \addfontfeatures{RawFeature=-pnum;-onum;+dnom}% + } + \DeclareRobustCommand{\nustyle}{% + \not@math@alphabet\nustyle\relax + \addfontfeatures{RawFeature=-pnum;-onum;+numr}% + } + \DeclareRobustCommand{\sustyle}{% + \not@math@alphabet\sustyle\relax + \addfontfeatures{RawFeature=-pnum;-onum;+sups}% + } + \DeclareRobustCommand{\infstyle}{% + \not@math@alphabet\infstyle\relax + \addfontfeatures{RawFeature=-pnum;-onum;+subs}% + } +\ifntx@oldsu + \NewCommandCopy { \sustyle } { \nustyle } + \NewCommandCopy { \infstyle } { \destyle } +\fi +\NewCommandCopy { \sufigures } { \sustyle } +\NewCommandCopy { \nufigures } { \nustyle } +\NewCommandCopy { \infigures } { \infstyle } +\NewCommandCopy { \defigures } { \destyle } +% \let\sufigures\sustyle +% \let\nufigures\nustyle +% \let\infigures\infstyle +% \let\defigures\destyle - \providecommand\sufigures{% - \addfontfeatures{VerticalPosition=Superior}} - \providecommand\infigures{% - \addfontfeatures{VerticalPosition=Inferior}} -% \providecommand\nufigures{% -% \addfontfeatures{VerticalPosition=Numerator}} - \providecommand\defigures{% - \addfontfeatures{VerticalPosition=Denominator}} - \let\sustyle=\sufigures - \let\nustyle=\sufigures - \let\instyle=\infigures - \let\destyle=\defigures - \ifntx@KOMA - \setkomafont{footnotereference}{\normalfont} - \else - \renewcommand{\footnotemark}{\normalfont} - \fi \ifntx@defaultsups % \else - \RequirePackage{realscripts} - \fi -% \ifntx@scosf -% \edef\ntx@fnt{\expandafter\csname ntx\ifntx@tabular T\fi OsF\endcsname} -% \DeclareRobustCommand{\textsc}[1]{% -% {\ntx@fnt \addfontfeatures{RawFeature=+smcp}#1}}% -% \fi + %\RequirePackage{realscripts} + \ExplSyntaxOn + \RenewDocumentCommand \textsuperscript {m} { + \hbox_set:Nn \l_tmpa_box {\textsu{\tlfstyle #1}} + \box_scale:Nnn \l_tmpa_box { \ntxsups@scalefactor } { \ntxsups@scalefactor } + \hbox_set:Nn \l_tmpa_box + { \box_move_up:nn \ntxsups@raised {\box_use:N \l_tmpa_box} } + \hspace*{\ntxsups@Lspaced}{\color{\ntxsups@color}\box_use:N \l_tmpa_box} \hspace*{\ntxsups@Rspaced}} + +\cs_set:Npn \@makefnmark { + \mbox{\footnotemarkfont\textsuperscript{\@thefnmark}} +} +\cs_if_exist:NTF \ftntm@font % KOMA only +{ + \cs_new:Npn \footnotemarkfont {\ftntm@font} +} +{ + \cs_new:Npn \footnotemarkfont {\normalfont} +} + \patchcmd{\maketitle}{\@textsuperscript{\normalfont\@thefnmark}}{\normalfont{\textsuperscript\@thefnmark}}{}{} + \patchcmd{\maketitle}{\@textsuperscript{\normalfont\@thefnmark}}{\normalfont{\textsuperscript\@thefnmark}}{}{} +% \patchcmd{\maketitle} +%{\hb@xt@1.8em}{\hb@xt@1.8em}{}{} % 2.18? + \ExplSyntaxOff + \ifntx@KOMA + \setkomafont{footnotereference}{\normalfont\sustyle} + \setkomafont{footnotelabel}{\normalfont\sustyle} + \fi + \fi% end of tutex footnote handling + % \else % tutex+LTX (article,book,report) +% \patchcmd[]{\maketitle}{\normalfont\@thefnmark}{\@thefnmark}{\message{Successfully patched maketitle command}}{\message{Unable to patch maketitle command}} +% \patchcmd[]{\maketitle}{\normalfont\@thefnmark}{\@thefnmark}{\message{Successfully patched maketitle command}}{\message{Unable to patch maketitle command}} +% \def\@makefnmark% +% {\hbox{\@textsuperscript{\@thefnmark}}} +% \DeclareRobustCommand*\textsuperscript[1]{% +% \@textsuperscript{#1}} +% \def\@textsuperscript#1{% +% {\normalfont{\sustyle#1}} +% \fi \renewcommand*{\textcircled}[1]{% \StrLen{#1}[\ntx@tmpa]\ntx@tmpcnta=\ntx@tmpa\relax - \ifnum\ntx@tmpcnta>2 - #1 + \ifnum\ntx@tmpcnta>2\relax#1% \else - \ifnum\ntx@tmpcnta=\@ne - \mbox{\normalfont\addfontfeatures{RawFeature=+ss08}#1} + \ifnum\ntx@tmpcnta=\@ne% +\mbox{\normalfont\addfontfeatures{RawFeature=+ss08}#1}% \else % argument has length 2 \IfInteger{#1}{% - \ntx@tmpcnta=#1\relax - \ifnum\ntx@tmpcnta<10\relax - #1 - \else % >=10 - \ifnum\ntx@tmpcnta>20\relax - #1 + \ntx@tmpcnta=#1\relax% + %\ifnum\ntx@tmpcnta<10\relax--must be >=10 + % #1 + %\else % >=10 + \ifnum\ntx@tmpcnta>20\relax#1% \else % between 10 and 20 - \advance\ntx@tmpcnta 9311 \relax + \advance\ntx@tmpcnta 9311\relax% \symbol{"\nhex{4}{\the\ntx@tmpcnta}} \fi - \fi %\ifnum + %\fi %\ifnum }{#1} % \IfInteger \fi %ifnum \fi @@ -549,6 +695,7 @@ % \hfil \crcr \symbol{"25EF}}% % \egroup} \else % type1 +\setstate2 \renewcommand*{\textcircled}[1]{\hmode@bgroup\ooalign{% \hfil \raise .3ex\hbox{{% @@ -559,23 +706,35 @@ \fi % applies to both +\setstate0 \DeclareTextFontCommand{\textosf}{\osfstyle} \DeclareTextFontCommand{\texttosf}{\tosfstyle} \DeclareTextFontCommand{\texttlf}{\tlfstyle} \DeclareTextFontCommand{\textlf}{\lfstyle} %\show\textlf \DeclareTextFontCommand{\textsu}{\sustyle} - \let\textsuperior\textsu - \let\textsup\textsu +% \let\textsuperior\textsu +\NewCommandCopy { \textsup } { \textsu } +\NewCommandCopy { \textsups } { \textsu } +% \let\textsup\textsu +% \let\textsups\textsu \DeclareTextFontCommand{\textnum}{\nustyle} - \let\textnumerator\textnum + \NewCommandCopy { \textnu } { \textnum } + \NewCommandCopy { \textnumerator } { \textnum } +% \let\textnu\textnum +% \let\textnumerator\textnum \DeclareTextFontCommand{\textde}{\destyle} - \let\textdenominator\textde -\DeclareTextFontCommand{\textinf}{\instyle} - \let\textinferior\textinf - \let\infigures\instyle + \NewCommandCopy { \textdenominator } { \textde } + % \let\textdenominator\textde +\DeclareTextFontCommand{\textinf}{\infstyle} + \NewCommandCopy { \textinferior } { \textinf } + \NewCommandCopy { \textsub } { \textinf } +%\let\textinferior\textinf +% \let\textsub\textinf + % \let\infigures\instyle \AtEndPreamble{% \ifntx@otftext +\setstate1 \ifntx@lining \def\ntx@figurestyle{Lining} \else @@ -586,15 +745,15 @@ \else \def\ntx@figurealign{Proportional} \fi - \setmainfont + %\ifntx@scosf + \setmainfont [ Numbers = {\ntx@figurealign,\ntx@figurestyle}, - UprightFont = *-Regular , - ItalicFont = *-Italic , - BoldFont = *-Bold , - BoldItalicFont = *-BoldItalic , - SlantedFont = *-Slanted , - BoldSlantedFont= *-BoldSlanted , - ] {\ntx@base} + ] {\ntx@base} +% \else +% \setmainfont +% [ Numbers = {\ntx@figurealign,\ntx@figurestyle}, +% ] {\ntx@base} +% \fi \let\ntx@sty\ntx@figurestyle \if l\ntx@thmlin\def\ntx@sty{Lining}\fi \newcommand{\thfamily}%{\@nameuse{ntx\ntx@figurestyle}% @@ -602,9 +761,10 @@ Numbers={\ntx@figurealign,\ntx@sty} , RawFeature=+ss05} } % for theorems - \ifntx@sl\else\let\slshape=\thfamily\fi - + \ifntx@sl\else\let\slshape=\thfamily\fi % need xpatch? \else % type1 +\setstate2 + \ifntx@lining \def\ntx@figurestyle{lf} \else @@ -618,10 +778,7 @@ \renewcommand*{\rmdefault}{ntx\ntx@figurealign% \ntx@figurestyle} - \ifntx@scosf % - \DeclareRobustCommand{\textsc}[1]{% - {\fontfamily{ntx\ntx@figurealign osf}\scshape\selectfont #1}% - }\fi% use OsF in small caps + \let\familydefault\rmdefault \def\ntx@thfigurestyle{\ntx@figurestyle} \ifx\ntx@figurestyle\ntx@dfltfigurestyle @@ -634,6 +791,8 @@ \fi } %both +\setstate0 + \@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 @@ -680,7 +839,7 @@ \newcommand*{\textsfrac}[3][]{% like \textsfrac[1]{23}{34} \mbox{% \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1] - {\textlf{#1}\kern.04em}{}% + {\textlf{#1}\kern.1em}{}% {\hmode@bgroup% \ooalign{% \setbox0=\hbox{\scalefont{\tx@sfrSC}\nustyle#2}% @@ -706,6 +865,8 @@ % Define \oldstylenums, \liningnums ,\tabularnums and \proportionalnums \ifntx@otftext \else % type1 +\setstate2 + \DeclareTextFontCommand{% \oldstylenums}{\fontfamily{ntx\ntx@figurealign osf}\selectfont } \DeclareTextFontCommand{% |