diff options
author | Karl Berry <karl@freefriends.org> | 2024-02-11 02:15:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-02-11 02:15:22 +0000 |
commit | 9ebe58df9c95e0f2abd778fe469fa3f6c1c19b19 (patch) | |
tree | 6b3340b1caff6bbb7992b3e5c9dd2ea530b39506 /Master/texmf-dist/tex/latex | |
parent | 09240ebcffbe056d4bd1b66135d8276e79871e0f (diff) |
newpx (10feb24)
git-svn-id: svn://tug.org/texlive/trunk@69792 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/newpx/newpx.sty | 45 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/newpx/newpxtext.sty | 21 |
2 files changed, 53 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/newpx/newpx.sty b/Master/texmf-dist/tex/latex/newpx/newpx.sty index 6cb08a9a825..f26e2a5b540 100644 --- a/Master/texmf-dist/tex/latex/newpx/newpx.sty +++ b/Master/texmf-dist/tex/latex/newpx/newpx.sty @@ -2,8 +2,8 @@ %Package to simplify loading of newpxmath with a text font family such as newpxtext for all latex engines, or for newpxtext and an otf math package. -\def\fileversion{1.533} -\def\filedate{2023/11/08} +\def\fileversion{1.536} +\def\filedate{2024/02/09} \ProvidesPackage{newpx}[% \filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for newpxmath and newpxtext, or for newpxtext and an otf math package] @@ -14,9 +14,10 @@ \RequirePackage{ifthen,iftex,etoolbox,scalefnt,trimspaces} \forcsvlist{\listadd\zpl@mathlst}{vecsep,amsthm,nosubscriptcorrection,subscriptcorrection,varbb,vvarbb,nosymbolsc,noamssymbols,amssymbols,uprightscript,uprightGreek,slantedGreek,frenchmath,upint,smallerops,useBImacros,varg,varvw,noOT1,fracspacing,subscriptcorrectionfile,curlybraces} -%\show\zpl@mathlst -\RequirePackage{kvoptions} +\RequirePackage{kvoptions} +\def\zpl@scale{1} +\def\newpx@helvratio{1} \DeclareDefaultOption{ \xifinlist{\CurrentOptionKey}{\zpl@mathlst} {% true branch for xifinlist @@ -27,14 +28,18 @@ {\CurrentOption}{newpxtext}} \ifthenelse{\equal{scale}{\CurrentOptionKey} \OR \equal{scaled}{\CurrentOptionKey}} {% true branch for ifthenelse -%\expandafter\PassOptionsToPackage\expandafter{\CurrentOption}{newpxmath} -\edef\zpl@scale{\CurrentOptionValue} -\edef\npxmath@scaled{\CurrentOptionValue} +\xdef\zpl@scale{\CurrentOptionValue} +\xdef\npxmath@scaled{\CurrentOptionValue} }{ % false branch for ifthenelse -}} +\ifthenelse{\equal{helvratio}{\CurrentOptionKey}} +{% true branch +\xdef\newpx@helvratio{\CurrentOptionValue} +}{}}} %\newif\ifzpl@otfmath %\zpl@otfmathfalse % default is type1 math \DeclareBoolOption{otfmath}% creates and inits \ifnewpx@otfmath %{\@nameuse{if#1}\iftutex\zpl@otfmathtrue\fi\fi} +\DeclareBoolOption{nohelv}% creates and inits \ifnewpx@nohelv +\DeclareBoolOption{nott}% creates and inits \ifnewpx@nott \DeclareBoolOption{type1}%[true]{}% no effect now %{%\@nameuse{if#1}\zpl@otftextfalse\fi} @@ -76,7 +81,31 @@ %\newcommand{\PassMathScale}{\ifzpl@iszero\gdef\zpltext@scale{\zplmath@scale}\gdef\zpltext@scaled{s*[\zpltext@scale]}\fi %\PassOptionsToPackage{scaled=\zpltext@scale}{\zpl@TF} %} +\ifnewpx@otfmath +\else % t1 math + \ifthenelse{\not\equal{\sfdefault}{cmss}}% + {\newpx@nohelvtrue}{} + \ifthenelse{\not\equal{\ttdefault}{cmtt}}% + {\newpx@notttrue}{} + \ifnewpx@nohelv + \else + \renewcommand*{\sfdefault}{qhv} + \@tempdima=\zpl@scale\p@ + \@tempdima=\newpx@helvratio\@tempdima% + \edef\qhv@scale{\strip@pt\@tempdima} +% \else +% \PassOptionsToPackage{nohelv=true}{newtxtext} + \fi + \ifnewpx@nott\else% + \renewcommand*{\ttdefault}{npxtt} + \fi +% \ifthenelse{\not\equal{\newpx@helvratio}{.94}}% +% {\PassOptionsToPackage{helvratio=\newpx@helvratio}% +% {newtxtext}}{} +% \iftx@tt\else% +% \PassOptionsToPackage{nott=true}{newtxtext}\fi +\fi \ifzpl@otftext \ifnewpx@otfmath % \typeout{I} diff --git a/Master/texmf-dist/tex/latex/newpx/newpxtext.sty b/Master/texmf-dist/tex/latex/newpx/newpxtext.sty index 937112b88c4..23be56df160 100644 --- a/Master/texmf-dist/tex/latex/newpx/newpxtext.sty +++ b/Master/texmf-dist/tex/latex/newpx/newpxtext.sty @@ -8,8 +8,8 @@ % Text is now directed to an extension of TeXGyrePagella rather than ppl. % 1.5 is first version of newpxtext to support both [pdf]latex and unicode latex. -\def\fileversion{1.535} -\def\filedate{2024/01/10} +\def\fileversion{1.536} +\def\filedate{2024/02/09} \ProvidesPackage{newpxtext}[% \filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for TeXGyrePagellaX] @@ -123,6 +123,7 @@ \newif\ifzpl@scosf \newif\ifzpl@largesc \newif\ifzpl@helv \zpl@helvtrue % default is to load helvetica as sans serif font +\newif\ifzpl@tt \zpl@tttrue % default is to load npxtt \newif\ifzpl@thrm \newif\ifzpl@sl % new sups options @@ -154,8 +155,10 @@ } \DeclareOptionX{nohelv}[true]{% \@nameuse{if#1}\zpl@helvfalse\fi}% +\DeclareOptionX{nott}[true]{% +\@nameuse{if#1}\zpl@ttfalse\fi}% -\def\zpl@helvratio{.94} +\providecommand\zpl@helvratio{.94} \DeclareOptionX{helvratio}[0.94]{% \def\zpl@helvratio{#1} } @@ -206,8 +209,16 @@ \def\zpl@sfrSC{#1}} \ProcessOptionsX\relax + \ifzpl@supsflag% \PackageWarningNoLine{newpxtext}{sups options no longer handled---use superiors package (v2) instead.}\fi + +\ifthenelse{\not\equal{\sfdefault}{cmss}}% + {\zpl@helvfalse}{} +\ifthenelse{\not\equal{\ttdefault}{cmtt}}% + {\zpl@ttfalse}{} +\ifzpl@helv\renewcommand*{\sfdefault}{qhv}\fi +\ifzpl@tt\renewcommand*{\ttdefault}{npxtt}\fi %\setlength{\zplsups@raise}{\zplsups@raised} %\setlength{\zplsups@scale}{\zplsups@scaledval\p@} %\zplsups@scale=\zpl@scale\zplsups@scale % @@ -493,8 +504,8 @@ % \fi}% % \fi % \fi - \ifzpl@helv\renewcommand*{\sfdefault}{qhv}\fi - \renewcommand*{\ttdefault}{npxtt} +% \ifzpl@helv\renewcommand*{\sfdefault}{qhv}\fi +% \renewcommand*{\ttdefault}{npxtt} \DeclareRobustCommand\thfamily % new family for theorem font {\not@math@alphabet\thfamily\relax \fontfamily\thdefault\selectfont} |