texlive[73574] Master/texmf-dist: newpx (24jan25)
commits+karl at tug.org
commits+karl at tug.org
Fri Jan 24 22:04:41 CET 2025
Revision: 73574
https://tug.org/svn/texlive?view=revision&revision=73574
Author: karl
Date: 2025-01-24 22:04:41 +0100 (Fri, 24 Jan 2025)
Log Message:
-----------
newpx (24jan25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/fonts/newpx/README
trunk/Master/texmf-dist/tex/latex/newpx/newpx.sty
trunk/Master/texmf-dist/tex/latex/newpx/newpxmath.sty
trunk/Master/texmf-dist/tex/latex/newpx/newpxtext.sty
Modified: trunk/Master/texmf-dist/doc/fonts/newpx/README
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/newpx/README 2025-01-24 21:04:12 UTC (rev 73573)
+++ trunk/Master/texmf-dist/doc/fonts/newpx/README 2025-01-24 21:04:41 UTC (rev 73574)
@@ -1,10 +1,15 @@
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.538 2024-12-16
+Current version: 1.539 2025-01-24
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.539
+1. Corrected a bug in processing math Blackboard Bold in the case where the argument
+is a macro other than \imath or \jmath. (Thanks, Romano Giannetti).
+2. Corrected newpx and newpxtext to prevent irritating spurious errors and warnings.
+
Changes in version 1.538
Corrected a duplicate line in t1zpllf.fd and the \ProvidesFile name. (Thanks, Martin
Münch)
Modified: trunk/Master/texmf-dist/tex/latex/newpx/newpx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newpx/newpx.sty 2025-01-24 21:04:12 UTC (rev 73573)
+++ trunk/Master/texmf-dist/tex/latex/newpx/newpx.sty 2025-01-24 21:04:41 UTC (rev 73574)
@@ -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.537}
-\def\filedate{2024/11/16}
+\def\fileversion{1.539}
+\def\filedate{2025/01/24}
\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]
@@ -37,9 +37,9 @@
}{}}}
\def\zpl at scaled{s*[\zpl at scale]}% used in fd files
-%\newif\ifzpl at otfmath %\zpl at otfmathfalse % default is type1 math
+%\newif\ifnewpx at otfmath %\zpl at otfmathfalse % default is type1 math
\DeclareBoolOption{otfmath}% creates and inits \ifnewpx at otfmath
-%{\@nameuse{if#1}\iftutex\zpl at otfmathtrue\fi\fi}
+{\@nameuse{if#1}\iftutex\newpx at otfmathtrue\fi\fi}
\DeclareBoolOption{nohelv}% creates and inits \ifnewpx at nohelv
\DeclareBoolOption{nott}% creates and inits \ifnewpx at nott
@@ -70,7 +70,7 @@
%\newcommand*{\zpltext at sf}{}% not understood by libertinus-otf
-
+\ifnewpx at otfmath\else
\def\zpl at dfltTF{newpxtext} % the default text font package name
\def\zpl at text{\let\zpl at TF=\zpl at dfltTF % the text font package name
\def\zpl at MF{newpxmath}
@@ -79,7 +79,7 @@
\def\zpl at minfam{zpltlf} %roman font, tabular lining fd, used in math
}
\zpl at text % set the defaults%
-
+\fi
%\newcommand{\PassMathScale}{\ifzpl at iszero\gdef\zpltext at scale{\zplmath at scale}\gdef\zpltext at scaled{s*[\zpltext at scale]}\fi
%\PassOptionsToPackage{scaled=\zpltext at scale}{\zpl at TF}
%}
@@ -128,7 +128,7 @@
\usepackage{newpxmath} % options will be as passed from newpx
\usepackage{\zpl at TF} % should load tt and sans math before newpx
\fi
+\show\xxx
-
\endinput
Modified: trunk/Master/texmf-dist/tex/latex/newpx/newpxmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newpx/newpxmath.sty 2025-01-24 21:04:12 UTC (rev 73573)
+++ trunk/Master/texmf-dist/tex/latex/newpx/newpxmath.sty 2025-01-24 21:04:41 UTC (rev 73574)
@@ -1,4 +1,4 @@
-\NeedsTeXFormat{LaTeX2e}[1997/06/01]
+\NeedsTeXFormat{LaTeX2e}[2020/06/01]
%
% Based on Young Ryu's pxfonts.sty, v.3.2.1
% Text and math are now loaded in separate sty files---the text
@@ -11,8 +11,8 @@
% of glyph collisions.
% These modifications are by Michael Sharpe, msharpe at ucsd dot edu
-\def\fileversion{1.533}
-\def\filedate{2023/11/08}
+\def\fileversion{1.539}
+\def\filedate{2025/01/24}
\ProvidesPackage{newpxmath}
[\filedate\space v\fileversion]
@@ -2307,29 +2307,87 @@
\DeclareMathSymbol{\px at UScrz}{\mathord}{letters}{247}
\DeclareMathSymbol{\px at UScrimath}{\mathord}{letters}{248}
\DeclareMathSymbol{\px at UScrjmath}{\mathord}{letters}{249}
+
+\edef\npx at scr{px@\ifpx at upscr U\fi Scr}
+\ExplSyntaxOn
-\def\npx@@scr#1#2\@nil{%
- \ifiscseq{#1}{\ifcsdef{px at Scr\@xp\@gobble\string#1}{\csname px at Scr\@xp\@gobble\string#1\endcsname}{#1}}{%not a cs
- \csname px at Scr#1\endcsname}
- \ifblank{#2}{\relax}{\npx@@scr #2\@nil}}
-\DeclareRobustCommand*{\mathslscr}[1]{\npx@@scr #1\@nil}
+\tl_set:Nn \l_tmpa_tl {imath}
+\str_const:Nn \npx_imath_str {\l_tmpa_tl}
+\tl_set:Nn \l_tmpa_tl {jmath}
+\str_const:Nn \npx_jmath_str {\l_tmpa_tl}
+\str_new:N \npx_tmpa_str
+\str_new:N \npx_tmpb_str
-\def\npx@@uscr#1#2\@nil{%
- \ifiscseq{#1}{\ifcsdef{px at UScr\@xp\@gobble\string#1}{\csname px at UScr\@xp\@gobble\string#1\endcsname}{#1}}{%not a cs
- \csname px at UScr#1\endcsname}
- \ifblank{#2}{\relax}{\npx@@uscr #2\@nil}}
-\DeclareRobustCommand*{\mathuscr}[1]{\npx@@uscr #1\@nil}
+\NewDocumentCommand{\mathScr}{m}
+ {
+ \tl_map_function:nN { #1 } \newpx_mathscr:n
+ }
+\cs_new_protected:Nn \newpx_mathscr:n
+ {%\typeout{A}
+ \token_if_cs:NTF {#1}
+ {% #1 is a cs
+ %\typeout{B}
+ \tl_set:Nn \npx_tmpa_str { \cs_to_str:N #1 }
+ \tl_set:Nn \npx_tmpb_str { \npx at scr \cs_to_str:N #1 }
+ %\typeout{\npx_tmpb_str}
+ \str_case_e:nnTF { \npx_tmpa_str }
+ {
+ { imath }{}
+ { jmath }{}
+ }
+ {% matches imath or jmath
+ %\typeout{C}
+\cs_if_exist_use:cF { \npx_tmpb_str} {\msg_critical:nn {newpxmath}{Unknown cs: \npx_tmpb_str }
+ }}
+ {% #1 is a cs but not \imath nor \jmath--expand it
+ %\typeout{D}
+ \tl_set:Nn \npx_tmpb_str { \npx at scr #1 }
+\cs_if_exist_use:cF { \npx_tmpb_str } { \msg_critical:nn {newpxmath}{Unknown cs: \npx_tmpb_str }
+ }}}
+ {% #1 not a cs
+ %\typeout{E}
+\cs_if_exist_use:cF { \npx at scr #1 } { \msg_critical:nn {newpxmath}{Unknown cs: \npx at scr#1 }
+ }
+ }
+%\typeout{---}
+}
+
+\ExplSyntaxOff
+
+\NewCommandCopy{\mathscr}{\mathScr}
\ifpx at upscr
- \let\mathscr=\mathuscr
\DeclareMathSymbol{\imathscr}{\mathord}{letters}{248}
\DeclareMathSymbol{\jmathscr}{\mathord}{letters}{249}
\else
- \let\mathscr=\mathslscr
\DeclareMathSymbol{\imathscr}{\mathord}{letters}{194}
\DeclareMathSymbol{\jmathscr}{\mathord}{letters}{195}
\fi
+
+
+%\def\npx@@scr#1#2\@nil{%
+% \ifiscseq{#1}{\ifcsdef{px at Scr\@xp\@gobble\string#1}{\csname px at Scr\@xp\@gobble\string#1\endcsname}{#1}}{%not a cs
+% \csname px at Scr#1\endcsname}
+% \ifblank{#2}{\relax}{\npx@@scr #2\@nil}}
+%\DeclareRobustCommand*{\mathslscr}[1]{\npx@@scr #1\@nil}
+%
+%\def\npx@@uscr#1#2\@nil{%
+% \ifiscseq{#1}{\ifcsdef{px at UScr\@xp\@gobble\string#1}{\csname px at UScr\@xp\@gobble\string#1\endcsname}{#1}}{%not a cs
+% \csname px at UScr#1\endcsname}
+% \ifblank{#2}{\relax}{\npx@@uscr #2\@nil}}
+%\DeclareRobustCommand*{\mathuscr}[1]{\npx@@uscr #1\@nil}
+%
+%\ifpx at upscr
+% \let\mathscr=\mathuscr
+% \DeclareMathSymbol{\imathscr}{\mathord}{letters}{248}
+% \DeclareMathSymbol{\jmathscr}{\mathord}{letters}{249}
+%\else
+% \let\mathscr=\mathslscr
+% \DeclareMathSymbol{\imathscr}{\mathord}{letters}{194}
+% \DeclareMathSymbol{\jmathscr}{\mathord}{letters}{195}
+%\fi
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Math Extension (npxex) Definition % largesymbols
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Modified: trunk/Master/texmf-dist/tex/latex/newpx/newpxtext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newpx/newpxtext.sty 2025-01-24 21:04:12 UTC (rev 73573)
+++ trunk/Master/texmf-dist/tex/latex/newpx/newpxtext.sty 2025-01-24 21:04:41 UTC (rev 73574)
@@ -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.536}
-\def\filedate{2024/02/09}
+\def\fileversion{1.539}
+\def\filedate{2025/01/24}
\ProvidesPackage{newpxtext}[%
\filedate\space v\fileversion (Michael Sharpe) latex and unicode latex support for TeXGyrePagellaX]
@@ -17,13 +17,11 @@
\RequirePackage[T1]{fontenc}
\RequirePackage{xcolor}
-\renewcommand*{\rmdefault}{zpltlf} % the default until end of preamble
-\renewcommand*{\familydefault}{\rmdefault}
+
\RequirePackage{xpatch} % need to patch \scshape
\RequirePackage{iftex,xkeyval,etoolbox,textcomp}
\RequirePackage{xstring,ifthen,scalefnt} % for \textfrac
\IfFileExists{mweights.sty}{\RequirePackage{mweights}}{}
-\DeclareEncodingSubset{TS1}{zpl*}{0}
%KOMA check
\newif\ifzpl at KOMA
@@ -36,10 +34,13 @@
% Engine check
\newif\ifzpl at otf
-\iftutex\zpl at otftrue
-%\else % [pdf]LaTeX
-% \zpl at otffalse
+\iftutex
+ \zpl at otftrue
+\else
+ \DeclareEncodingSubset{TS1}{zpl*}{0}
\fi
+\@ifundefined{newpx at otfmathtrue}{\newif\ifnewpx at otfmath}{}
+
\def\zpl at divide#1#2{\strip at pt\dimexpr 1pt * (\dimexpr #1pt\relax) / \dimexpr #2pt\relax\relax}
%%%%%%%%%%%%%%%%%%
\IfFileExists{xkeyval.sty}{
@@ -144,6 +145,9 @@
\DeclareOptionX{supspaced}{\zpl at supsflagtrue}%\DeclareOptionX{supscolor}{\zpl at supsflagtrue}%{\renewcommand*{\zplsups at color}{#1}}
% Other options
+\DeclareOptionX{otfmath}[true]{%
+\@nameuse{if#1}\newpx at otfmathtrue\fi
+}
\DeclareOptionX{defaultsups}[true]{%
\@nameuse{zpl at defaultsups#1}
}
@@ -213,6 +217,18 @@
\ifzpl at supsflag%
\PackageWarningNoLine{newpxtext}{sups options no longer handled---use superiors package (v2) instead.}\fi
+% otfmath beats no-math
+\ifnewpx at otfmath\zpl at nomathfalse\fi
+
+\iftutex\else
+\renewcommand*{\rmdefault}{minzpltlf} % the default until end of preamble
+\renewcommand*{\familydefault}{\rmdefault}
+\fi
+\ifzpl at nomath
+\renewcommand*{\rmdefault}{minzpltlf} % the default until end of preamble
+\renewcommand*{\familydefault}{\rmdefault}
+\fi
+
\ifthenelse{\not\equal{\sfdefault}{cmss}}%
{\zpl at helvfalse}{}
\ifthenelse{\not\equal{\ttdefault}{cmtt}}%
@@ -794,11 +810,11 @@
\DeclareTextFontCommand{%
\proportionalnums}{\fontfamily{zpl\zpl at figurestyle}\selectfont }
\re at DeclareTextSymbol{\textdollar}{OT1}{36}
-\fi
\DeclareFontFamilySubstitution{\encodingdefault}{zplLF}{zpllf}
\DeclareFontFamilySubstitution{\encodingdefault}{zplTLF}{zpltlf}
\DeclareFontFamilySubstitution{\encodingdefault}{zplOsF}{zplosf}
\DeclareFontFamilySubstitution{\encodingdefault}{zplTOsF}{zpltosf}
+\fi
\endinput
More information about the tex-live-commits
mailing list.