summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-02-01 21:51:19 +0000
committerKarl Berry <karl@freefriends.org>2015-02-01 21:51:19 +0000
commitcd285ac1d0661956809666ac560c257b531a0bd4 (patch)
treeea37c48c3358aa51e3e09c29ca73bf0649a2e2d9 /Master/texmf-dist/tex/latex/newtx/newtxtext.sty
parentb8545db1347b09f7ebd9c6394232cbd065c6f084 (diff)
newtx (1feb15)
git-svn-id: svn://tug.org/texlive/trunk@36182 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.sty109
1 files changed, 77 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/newtx/newtxtext.sty b/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
index a9f40bb27b6..b8dc42eb5d8 100644
--- a/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
+++ b/Master/texmf-dist/tex/latex/newtx/newtxtext.sty
@@ -1,82 +1,123 @@
\NeedsTeXFormat{LaTeX2e}
-% Based on Young Ryu's txfonts.sty, v.3.2.1
-% Changes to original txfonts.sty:
-% Change by Thomas Esser, June 2002:
-% Replaced hex numbers by octal to avoid trouble with active "
-% as in german.sty.
-% Approved for release by Young Ryu (the author) in January 2005.
-%
-% Changes from original txfonts.sty by Michael Sharpe, msharpe at ucsd dot edu;
-% Text and math versions now separate.
-% Math version doesn't require newtxtext.sty;
-% Added scaled keyword and osf option;
-% Modified the definition of \k to bypass problem with grouping;
-
-\def\fileversion{1.322}
-\def\filedate{2015/01/06}
+\def\fileversion{1.4}
+\def\filedate{2015/01/31}
\ProvidesPackage{newtxtext}[\filedate\space v\fileversion]
-\message{`newtxtext' v\fileversion, \filedate\space Text macros based on txfonts (msharpe)}
+\message{`newtxtext' v\fileversion, \filedate\space Text macros taking advantage of TeX-Gyre Termes fonts (msharpe)}
\RequirePackage{fontaxes}% so we can have [bold] italic small caps
\let\orig@footnote=\thefootnote
\let\orig@makefnmark=\@makefnmark
-
+\newdimen\ntx@fs
\RequirePackage{xkeyval,etoolbox}
-\renewcommand*{\rmdefault}{ntxrx}
-\def\useosf{\AtEndPreamble{\renewcommand*{\rmdefault}{ntxrj}}}
+\renewcommand*{\rmdefault}{ntxtlf} % always TLF for math
+\renewcommand*{\familydefault}{\rmdefault}
+\def\useosf{\edef\ntx@figurestyle{osf}}
\@onlypreamble\useosf
+\def\ntx@figurestyle{lf}% default is lining figure style
+\def\ntx@figurealign{t}% default is tabular figure alignment
\newif\ifntx@defaultsups
\newif\ifntx@adobesc
\newif\ifntx@scosf
+\newif\ifntx@largesc
\define@boolkey{ntx}{defaultsups}[true]{%
\csname ntx@defaultsups#1\endcsname}
+\define@boolkey{ntx}{largesc}[true]{%
+\csname ntx@largesc#1\endcsname}
+\define@boolkey{ntx}{proportional}[true]{%
+\csname ntx@prop#1\endcsname}
\define@boolkey{ntx}{adobesc}[true]{%
\csname ntx@adobesc#1\endcsname}
\define@key{ntx}{helvratio}[0.9]{\def\ntx@helvratio{#1}}
\define@key{ntx}{scaled}[1.0]{\def\ntx@scaled{s*[#1]}%
\def\ntx@scale{#1}}
+\setkeys{ntx}{helvratio} % set this first, at least to default 0.9
+\setkeys{ntx}{scaled} % get at least default
+\DeclareOption{lining}{\edef\ntx@figurestyle{lf}}
+\DeclareOption{lf}{\edef\ntx@figurestyle{lf}}
+\DeclareOption{oldstyle}{\useosf}
+\DeclareOption{osf}{\useosf}
+\DeclareOption{tabular}{\edef\ntx@figurealign{t}}
+\DeclareOption{p}{\edef\ntx@figurealign{}}
+\DeclareOption{proportional}{\edef\ntx@figurealign{}}
+%\DeclareOption{sups}{\ntx@defaultsupsfalse}
+\DeclareOption{scosf}{\ntx@scosftrue}
+\ExecuteOptions{lining,tabular}
+
\DeclareOption*{%
\begingroup
\edef\x{\endgroup
\noexpand\setkeys{ntx}{\CurrentOption}}%
\x}
-\def\ntx@style{x}% default is lining figures
-\DeclareOption{osf}{\useosf}
-%\DeclareOption{osf}{\def\ntx@style{j}}
-\DeclareOption{oldstyle}{\useosf}
-\DeclareOption{scosf}{\ntx@scosftrue}
-\setkeys{ntx}{helvratio} % set this first, at least to default 0.9
-\setkeys{ntx}{scaled} % get at least default
+
\ProcessOptions*
+%Each tosf fd file should contain:
+%\def\ntx@asfx{}
+%\ifdefined\ntx@adobescfalse %
+% \ifntx@adobesc \def\ntx@asfx{a}\def\ntx@lsfx{l}
+%\else
+%\ifntx@largesc\def\ntx@asfx{l}\fi
+%\fi\fi
\@tempdima=\ntx@scale\p@\@tempdima=\ntx@helvratio\@tempdima%
\edef\qhv@scale{\strip@pt\@tempdima}
\RequirePackage[T1]{fontenc}
-\RequirePackage{textcomp}
+\RequirePackage[full]{textcomp}
\ifntx@scosf %
\DeclareRobustCommand{\textsc}[1]{%
-{\fontfamily{ntxrj}\scshape\selectfont #1}%
+{\fontfamily{ntx\ntx@figurealign osf}\scshape\selectfont #1}%
}\fi% use OsF in small caps
+\DeclareRobustCommand{\lfstyle}{%
+ \not@math@alphabet\lfstyle\relax
+ \fontfamily{ntxlf}\selectfont %
+}% to get lf
+\DeclareRobustCommand{\tlfstyle}{%
+ \not@math@alphabet\tlfstyle\relax
+ \fontfamily{ntxtlf}\selectfont %
+}% to get tlf
+\DeclareRobustCommand{\osfstyle}{%
+ \not@math@alphabet\osfstyle\relax
+ \fontfamily{ntxosf}\selectfont %
+}% to get osf
+\DeclareRobustCommand{\tosfstyle}[1]{%
+ \not@math@alphabet\tosfstyle\relax
+ \fontfamily{ntxtosf}\selectfont %
+}% to get tosf
+\DeclareRobustCommand{\textlf}[1]{%
+ {\lfstyle #1}%
+}% to get lf
+\DeclareRobustCommand{\texttlf}[1]{%
+ {\tlfstyle #1}%
+}% to get tlf
+\DeclareRobustCommand{\textosf}[1]{%
+ {\osfstyle #1}%
+}% to get osf
+\DeclareRobustCommand{\texttosf}[1]{%
+ {\tosfstyle #1}%
+}% to get tosf
+
\DeclareRobustCommand{\sustyle}{%
\not@math@alphabet\sustyle\relax
- \fontfamily{ntxr1}\selectfont}
+ \fontfamily{ntxsups}\selectfont}
\DeclareTextFontCommand{\textsu}{\sustyle}
%\def\@makefnmark{\ifx \thefootnote\orig@footnote \hbox{\sustyle\hspace*{.04em}\@thefnmark}\else\orig@makefnmark\fi}
\ifntx@defaultsups %
\else
\def\f@@tn@te{footnote}
\def\@makefnmark{%
- \ifx\@mpfn\f@@tn@te%
+ \ifx\@mpfn\f@@tn@te% footnote not in a minipage
\ifx\thefootnote\orig@footnote%
\hbox{\sustyle\hspace*{.04em}\@thefnmark\hspace*{.03em}}%
\else%
\orig@makefnmark%
\fi
- \else%
+ \else% footnote in a minipage
+% \ntx@fs=\f@size\p@
+% \ntx@fs=1.05\ntx@fs
+%\hbox{{\itshape\sustyle\fontsize{\strip@pt\ntx@fs}{12}\selectfont \@thefnmark\hspace*{.1em}}}%
\orig@makefnmark%
\fi}
\fi
@@ -163,5 +204,9 @@
\ifx\encodingdefault\LY@n@@nc@d@ng\LY@n@@nc@d@ngM@cr@M@d\fi%
}
-\endinput
+\AtEndPreamble{%
+\renewcommand*{\rmdefault}{ntx\ntx@figurealign%
+\ntx@figurestyle}
+\normalfont}
+\endinput