summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/newpx/newpxmath.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/newpx/newpxmath.sty')
-rw-r--r--Master/texmf-dist/tex/latex/newpx/newpxmath.sty90
1 files changed, 74 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/newpx/newpxmath.sty b/Master/texmf-dist/tex/latex/newpx/newpxmath.sty
index 90af727111b..b1b0c30e7d0 100644
--- a/Master/texmf-dist/tex/latex/newpx/newpxmath.sty
+++ b/Master/texmf-dist/tex/latex/newpx/newpxmath.sty
@@ -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 @@ $\m@th\hfil #2#3\hfil$\crcr}}}}
\DeclareMathSymbol{\px@UScrz}{\mathord}{letters}{247}
\DeclareMathSymbol{\px@UScrimath}{\mathord}{letters}{248}
\DeclareMathSymbol{\px@UScrjmath}{\mathord}{letters}{249}
+
+\edef\npx@scr{px@\ifpx@upscr U\fi Scr}
+\ExplSyntaxOn
+
+\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
+
+\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@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@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@scr #1 } { \msg_critical:nn {newpxmath}{Unknown cs: \npx@scr#1 }
+ }
+ }
+%\typeout{---}
+}
-\def\npx@@scr#1#2\@nil{%
- \ifiscseq{#1}{\ifcsdef{px@Scr\@xp\@gobble\string#1}{\csname px@Scr\@xp\@gobble\string#1\endcsname}{#1}}{%not a cs
- \csname px@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@UScr\@xp\@gobble\string#1}{\csname px@UScr\@xp\@gobble\string#1\endcsname}{#1}}{%not a cs
- \csname px@UScr#1\endcsname}
- \ifblank{#2}{\relax}{\npx@@uscr #2\@nil}}
-\DeclareRobustCommand*{\mathuscr}[1]{\npx@@uscr #1\@nil}
+\ExplSyntaxOff
+\NewCommandCopy{\mathscr}{\mathScr}
\ifpx@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@Scr\@xp\@gobble\string#1}{\csname px@Scr\@xp\@gobble\string#1\endcsname}{#1}}{%not a cs
+% \csname px@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@UScr\@xp\@gobble\string#1}{\csname px@UScr\@xp\@gobble\string#1\endcsname}{#1}}{%not a cs
+% \csname px@UScr#1\endcsname}
+% \ifblank{#2}{\relax}{\npx@@uscr #2\@nil}}
+%\DeclareRobustCommand*{\mathuscr}[1]{\npx@@uscr #1\@nil}
+%
+%\ifpx@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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%