summaryrefslogtreecommitdiff
path: root/fonts/newpx
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/newpx')
-rw-r--r--fonts/newpx/README5
-rw-r--r--fonts/newpx/doc/newpxdoc.pdfbin426049 -> 426317 bytes
-rw-r--r--fonts/newpx/doc/newpxdoc.tex8
-rw-r--r--fonts/newpx/tex/newpx.sty45
-rw-r--r--fonts/newpx/tex/newpxtext.sty21
5 files changed, 61 insertions, 18 deletions
diff --git a/fonts/newpx/README b/fonts/newpx/README
index c3322dea06..6de20aa500 100644
--- a/fonts/newpx/README
+++ b/fonts/newpx/README
@@ -1,10 +1,13 @@
This package, based initially on pxfonts, provides many fixes and enhancements to that package, splitting it in two parts---newpxtext and newpxmath---which may be run independently of one another. It provides scaling, improved metrics, and other options. For proper operation, the packages require that the packages newtxmath, pxfonts and TeXGyrePagella be installed and their map files enabled. The text package now relies on an extension of the TeXGyrePagella Type1 fonts that is provided with this package. The accompanying MANIFEST-newpx.txt provides details of the extension as requested by GUST-FONT-LICENSE.txt
-Current version: 1.535 2024-01-10
+Current version: 1.536 2024-02-09
This material is subject to the LaTeX Project Public License. See http://www.ctan.org/license/lppl1.3
for the details of that license.
+Changes in version 1.536
+Corrected handling of sans and tt fonts in math mode using newpx.sty.
+
Changes in version 1.535
Moved all sups code from newpxtext.sty to superiors.sty, version 2,
leaving a stub in place to warn users of the associated newpxtext options
diff --git a/fonts/newpx/doc/newpxdoc.pdf b/fonts/newpx/doc/newpxdoc.pdf
index 9925313328..48b9394258 100644
--- a/fonts/newpx/doc/newpxdoc.pdf
+++ b/fonts/newpx/doc/newpxdoc.pdf
Binary files differ
diff --git a/fonts/newpx/doc/newpxdoc.tex b/fonts/newpx/doc/newpxdoc.tex
index bb61b9199a..04f08b2fc3 100644
--- a/fonts/newpx/doc/newpxdoc.tex
+++ b/fonts/newpx/doc/newpxdoc.tex
@@ -188,7 +188,7 @@ braces and other delimiters are now larger and, I believe, more pleasing to olde
\item \verb|\coloneq| and \verb|\eqcolon| now point to the correct glyphs;
\item The problem with the {\tt ogonek} accent and tabular environments (bad definition of \verb|\k|) is fixed;
\item The default encoding for \textsf{newpxtext} is now T$1$, but support is offered also for OT$1$ and LY$1$. As some add-on packages are available only in T$1$, that seems the best current choice.
-\item The font collection used for rendering text is based on TeXGyrePagella with a number of additions, denoted by TeXGyrePagellaX. The superior figures in this addition are set by default to render footnote markers. (It is also possible customize footnote markers by redefining \verb|\thefootnote| after loading {\tt newpxtext.sty}.)
+\item The font collection used for rendering text is based on TeXGyrePagella with a number of additions, named TeXGyrePagellaX. The superior figures in this addition are set by default to render footnote markers. (It is also possible customize footnote markers by redefining \verb|\thefootnote| after loading {\tt newpxtext.sty}.)
\item Sans serif is by default taken from TeXGyreHeros, a Helvetica clone, and by default at 94\% of the scale factor (set by {\tt scaled}, default value {\tt1}). The option {\tt helvratio=.98} will change that to 98\%. As of newpx version 1.415, there is an option {\tt nohelv} that prevents this loading.
\item New math accents such as \verb|\widearc| have been introduced in tandem with the {\tt newtx} package, where they are documented.
\end{itemize}
@@ -240,7 +240,7 @@ load roman and typewriter text fonts at 95\% of normal size, and the sans serif
The option \texttt{osf} instructs the text fonts to use old-style figures \oldstylenums{1234567890} rather than the default lining figures \texttlf{1234567890}. As of version 1.23, {\tt newpxtext} loads initially with lining figures so the math package uses lining figures in math mode. The option {\tt osf} switches to old-style figures in text at the very end of the preamble, forcing the use of oldstyle figures in text, but not math. In previous versions, it was necessary to run
\verb|\useosf| after loading math. This is no longer required, but does no harm. See the discussion in section 4 for further details. A similar macro \verb|\useproportional| makes proportional figures the default outside math mode.
-As of version 1.415, the new option {\tt nohelv} prevents the loading of the default Helvetica clone as the sans serif text font. If you use this option, you should load your preferred sans serif font, otherwise you will be left with the Computer Modern default, most likely in a metafont version if not using OT1 encoding.
+As of version 1.415, the new option {\tt nohelv} prevents the loading of the default Helvetica clone as the sans serif text font. If you use this option, you should load your preferred sans serif font, otherwise you will be left with the Computer Modern default.
As described above, option {\tt largesc} increases the size of small caps by 5.33\% so that the height matches that of the small caps in Linotype Palatino.
@@ -304,7 +304,7 @@ Supports an arbitrary otf math font with otf text using {\tt TeXGyreTermesX}.
\textsc{Notes:}
\begin{itemize}
\item Your option list to {\tt newpx[text]} must include {\tt otfmath}, otherwise it will load {\tt newpxmath}.
-\item With {\tt newpx}, you may specify some other otf text fonts.
+\item With {\tt newpx}, you may specify certain other otf text fonts.
\item After loading {\tt newpx}, you must load your chosen unicode math package with \verb|\setmathfont{}[]|.
\item
You do not need to load {\tt amsmath}: it is loaded by {\tt unicode-math}.
@@ -331,6 +331,7 @@ Supports {\tt newpxmath} with an otf text font.
\textsc{Notes:}
\begin{itemize}
\item No special option requirements---this is the default case.
+\item You may load sans and tt text fonts before {\tt newpx} if you wish \verb|\mathsf| and \verb|\mathsf| not to be the default {\tt helvetica} and {\tt cmtt}.
\item Babel, if used, must be specified before {\tt newpx[text]}, which loads {\tt fontspec}.
\item Polyglossia, if used, must be specified after loading {\tt newpx[text]}.
\end{itemize}
@@ -372,7 +373,6 @@ For this arrangement, the math package needs information about the text font cur
\usepackage[<list of text and math options>]{newpx}
\end{verbatim}
\textsc{Notes:}
-
\begin{itemize}
\item Babel, if used, must be specified before {\tt newpx[text]}.
\end{itemize}
diff --git a/fonts/newpx/tex/newpx.sty b/fonts/newpx/tex/newpx.sty
index 6cb08a9a82..f26e2a5b54 100644
--- a/fonts/newpx/tex/newpx.sty
+++ b/fonts/newpx/tex/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/fonts/newpx/tex/newpxtext.sty b/fonts/newpx/tex/newpxtext.sty
index 937112b88c..23be56df16 100644
--- a/fonts/newpx/tex/newpxtext.sty
+++ b/fonts/newpx/tex/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}