summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-03 22:02:56 +0000
committerKarl Berry <karl@freefriends.org>2020-03-03 22:02:56 +0000
commit8b6d64fa9d06d6ff5428f42c773c7e5d6a42a10f (patch)
treebbda573f1188404a7e1e8e9f5c3940eff18887f2 /Master/texmf-dist/tex/latex/newtx/newtxtext.sty
parent1276e25d72eec470966b7a12a8c4632c95eb4ccc (diff)
newtx (3mar20)
git-svn-id: svn://tug.org/texlive/trunk@54028 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/newtx/newtxtext.sty')
-rw-r--r--Master/texmf-dist/tex/latex/newtx/newtxtext.sty35
1 files changed, 32 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/newtx/newtxtext.sty b/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
index 11e388118cc..bc8191c238f 100644
--- a/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
+++ b/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{1.531}
-\def\filedate{2018/03/27}
+\def\fileversion{1.625}
+\def\filedate{2020/03/02}
\ProvidesPackage{newtxtext}[\filedate\space v\fileversion]
\message{`newtxtext' v\fileversion, \filedate\space Text macros taking advantage of TeX-Gyre Termes fonts (msharpe)}
@@ -18,6 +18,7 @@
\@onlypreamble\useosf
\def\useproportional{\edef\ntx@figurealign{}}
\@onlypreamble\useproportional
+\RequirePackage{etoolbox}
\def\ntx@figurestyle{lf}% default is lining figure style
\def\ntx@figurealign{t}% default is tabular figure alignment
@@ -92,7 +93,35 @@
\DeclareRobustCommand{\sustyle}{%
\not@math@alphabet\sustyle\relax
\fontfamily{ntxsups}\selectfont}
-
+\DeclareRobustCommand{\infigures}{%
+ \not@math@alphabet\infigures\relax
+ \fontfamily{ntxdenoms}\selectfont}
+\DeclareTextFontCommand{\textin}{\infigures}
+\providecommand*{\textfrac}[2]{%
+ {\ntxt@printfalse\edef\ntxt@denom{#1\char"F5}\ntxt@textinf #2\@nil%
+ \ifntxt@print\textsu{\ntxt@denom}\fi}}
+
+\newcount\ntxt@cntz
+\newif\ifntxt@print
+%\newcount\ntxt@Isdigit
+\def\ntxt@isdigit#1{% #1 should be a single character
+\ntxt@cntz=\number`#1\relax%
+\ifnum\ntxt@cntz>47\relax%
+ \ifnum\ntxt@cntz<58\relax%
+ \advance\ntxt@cntz by 198 % 246 (0.inf) -48
+ \edef\ntxt@denom{\ntxt@denom\char\the\ntxt@cntz}%
+ \else
+ \edef\ntxt@denom{\ntxt@denom X}%
+ \fi%
+\else
+ \edef\ntxt@denom{\ntxt@denom X}%
+\fi%
+%\show\ntxt@denom
+}
+\def\ntxt@textinf#1#2\@nil{%
+\ntxt@isdigit{#1}%
+\ifblank{#2}{\ntxt@printtrue}{\ntxt@textinf #2\@nil}%
+}
\ifntx@scosf %
\DeclareRobustCommand{\textsc}[1]{%
{\fontfamily{ntx\ntx@figurealign osf}\scshape\selectfont #1}%