summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/newpx/newpxtext.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/newpx/newpxtext.sty')
-rw-r--r--Master/texmf-dist/tex/latex/newpx/newpxtext.sty105
1 files changed, 94 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/newpx/newpxtext.sty b/Master/texmf-dist/tex/latex/newpx/newpxtext.sty
index be50704ade9..14886d632bd 100644
--- a/Master/texmf-dist/tex/latex/newpx/newpxtext.sty
+++ b/Master/texmf-dist/tex/latex/newpx/newpxtext.sty
@@ -1,41 +1,63 @@
\NeedsTeXFormat{LaTeX2e}
-% Based on Young Ryu's pxfonts.sty, v.1.1.1
+% Based originally on Young Ryu's pxfonts.sty, v.1.1.1
%
% Changes from original pxfonts.sty by Michael Sharpe, msharpe at ucsd dot edu;
% Text and math versions now separate.
% Added scaled keyword and osf option;
% Modified the definition of \k to bypass problem with grouping.
-% Text is now directed to a small modification of TeXGyrePagella rather than ppl.
+% Text is now directed to an extension of TeXGyrePagella rather than ppl.
-\def\fileversion{1.13}
-\def\filedate{2014/06/25}
+\def\fileversion{1.2}
+\def\filedate{2015/02/08}
\ProvidesPackage{newpxtext}[\filedate\space v\fileversion]
-\message{`newpxtext' v\fileversion, \filedate\space Text macros based on pxfonts (msharpe)}
+\message{`newpxtext' v\fileversion, \filedate\space Text macros taking advantage of TeXGyre Pagella and its extensions (msharpe)}
\RequirePackage{fontaxes}% so we can have [bold] italic small caps
\let\orig@footnote=\thefootnote
\let\orig@makefnmark=\@makefnmark
\RequirePackage{xkeyval,etoolbox}
-\renewcommand*{\rmdefault}{zplx} % the default until end of preamble
-\def\useosf{\AtEndPreamble{\renewcommand*{\rmdefault}{zplj}}}
+\renewcommand*{\rmdefault}{zpltlf} % the default until end of preamble
+\def\useosf{\edef\zpl@figurestyle{osf}}
\@onlypreamble\useosf
\newif\ifzpl@defaultsups
+\newif\ifzpl@adobesc % we don't use this exc. in fd, but may in future
+\newif\ifzpl@scosf
+\newif\ifzpl@largesc
+
\define@boolkey{zpl}{defaultsups}[true]{%
\csname zpl@defaultsups#1\endcsname}
+\define@boolkey{zpl}{largesc}[true]{%
+\csname zpl@largesc#1\endcsname}
+\define@boolkey{zpl}{proportional}[true]{%
+\csname zpl@prop#1\endcsname}
+\newif\ifzpl@babel
+\define@key{zpl}{babel}[true]{%
+\csname zpl@babel#1\endcsname}
+\newif\ifzpl@thrm
+\define@key{zpl}{babel}[true]{%
+\csname zpl@babel#1\endcsname}
\define@key{zpl}{helvratio}[0.94]{\def\zpl@helvratio{#1}}
\define@key{zpl}{scaled}[1.0]{\def\zpl@scaled{s*[#1]}%
\def\zpl@scale{#1}}
+\DeclareOption{lining}{\edef\zpl@figurestyle{lf}}
+\DeclareOption{lf}{\edef\zpl@figurestyle{lf}}
+\DeclareOption{theoremfont}{\zpl@thrmtrue}
+\DeclareOption{oldstyle}{\useosf}
+\DeclareOption{osf}{\useosf}
+\DeclareOption{tabular}{\edef\zpl@figurealign{t}}
+\DeclareOption{p}{\edef\zpl@figurealign{}}
+\DeclareOption{proportional}{\edef\zpl@figurealign{}}
+\DeclareOption{scosf}{\zpl@scosftrue}
+\ExecuteOptions{lining,tabular}
\DeclareOption*{%
\begingroup
\edef\x{\endgroup
\noexpand\setkeys{zpl}{\CurrentOption}}%
\x}
-\def\zpl@style{x}% default is lining figures
-\DeclareOption{osf}{\useosf}% oldstyle figures
-\DeclareOption{oldstyle}{\useosf}% oldstyle figures
+%\def\zpl@style{x}% default is lining figures
\setkeys{zpl}{helvratio} % set this first, at least to default
\setkeys{zpl}{scaled} % get at least default
\ProcessOptions*
@@ -47,7 +69,7 @@
\DeclareRobustCommand{\sustyle}{%
\not@math@alphabet\sustyle\relax
- \fontfamily{zpl1}\selectfont}
+ \fontfamily{zplsups}\selectfont}
%\def\@makefnmark{\ifx \thefootnote\orig@footnote \hbox{\sustyle\hspace*{.04em}\@thefnmark}\else\orig@makefnmark\fi}
\ifzpl@defaultsups %
@@ -64,6 +86,56 @@
\orig@makefnmark%
\fi}
\fi
+\ifzpl@scosf %
+\DeclareRobustCommand{\textsc}[1]{%
+{\fontfamily{zpl\zpl@figurealign osf}\scshape\selectfont #1}%
+}\fi% use OsF in small caps
+
+\DeclareRobustCommand{\lfstyle}{%
+ \not@math@alphabet\lfstyle\relax
+ \fontfamily{zpllf}\selectfont %
+}% to get lf
+\DeclareRobustCommand{\tlfstyle}{%
+ \not@math@alphabet\tlfstyle\relax
+ \fontfamily{zpltlf}\selectfont %
+}% to get tlf
+\DeclareRobustCommand{\osfstyle}{%
+ \not@math@alphabet\osfstyle\relax
+ \fontfamily{zplosf}\selectfont %
+}% to get osf
+\DeclareRobustCommand{\tosfstyle}[1]{%
+ \not@math@alphabet\tosfstyle\relax
+ \fontfamily{zpltosf}\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{\textsu}[1]{%
+ {\sustyle #1}%
+}% to get sup style
+
+\ifzpl@thrm
+ \ifdefined\newtheoremstyle
+ \newtheoremstyle{plain}
+ {\topsep} % ABOVESPACE
+ {\topsep} % BELOWSPACE
+ {\slshape} % BODYFONT--\slshape is defined to be \itshape with upright figures and punctuation
+ {} % INDENT (empty value is the same as 0pt)
+ {\bfseries} % HEADFONT--you may want to add \tlfstyle so the number is tab lining, regardless of text figure selection
+ {.} % HEADPUNCT
+ {5pt plus 1pt minus 1pt} % HEADSPACE
+ {} % CUSTOM-HEAD-SPEC\newtheorem{thm}{Theorem}[section]
+ \fi%
+\fi
%%%%%%%%%%%%%%%%%%%%%%
% Text Serif (TGPagellaX) %
@@ -126,5 +198,16 @@
\ifx\encodingdefault\LY@n@@nc@d@ng\LY@n@@nc@d@ngM@cr@M@d\fi%
}
+\ifzpl@babel
+ \renewcommand*{\rmdefault}{zpl\zpl@figurealign%
+\zpl@figurestyle}
+ \normalfont
+\else
+ \AtEndPreamble{%
+\renewcommand*{\rmdefault}{zpl\zpl@figurealign%
+\zpl@figurestyle}
+ \normalfont}
+\fi
+
\endinput