texlive[49438] Master/texmf-dist: newpx (17dec18)

commits+karl at tug.org commits+karl at tug.org
Mon Dec 17 22:30:58 CET 2018


Revision: 49438
          http://tug.org/svn/texlive?view=revision&revision=49438
Author:   karl
Date:     2018-12-17 22:30:58 +0100 (Mon, 17 Dec 2018)
Log Message:
-----------
newpx (17dec18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/fonts/newpx/README
    trunk/Master/texmf-dist/tex/latex/newpx/newpxmath.sty

Modified: trunk/Master/texmf-dist/doc/fonts/newpx/README
===================================================================
--- trunk/Master/texmf-dist/doc/fonts/newpx/README	2018-12-17 21:30:22 UTC (rev 49437)
+++ trunk/Master/texmf-dist/doc/fonts/newpx/README	2018-12-17 21:30:58 UTC (rev 49438)
@@ -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.321 2017-08-18
+Current version: 1.33 2018-12-16
 
 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.33
+Modified newpxmath.sty to correct the macros involving selection of Blackboard Bold alphabets.
+
 Changes in version 1.321
 Modified the footnote marker code to remove a clash with the KOMA classes.
 

Modified: trunk/Master/texmf-dist/tex/latex/newpx/newpxmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/newpx/newpxmath.sty	2018-12-17 21:30:22 UTC (rev 49437)
+++ trunk/Master/texmf-dist/tex/latex/newpx/newpxmath.sty	2018-12-17 21:30:58 UTC (rev 49438)
@@ -11,8 +11,8 @@
 % of glyph collisions.
 % These modifications are by Michael Sharpe, msharpe at ucsd dot edu
 
-\def\fileversion{1.32}
-\def\filedate{2017/05/31}
+\def\fileversion{1.33}
+\def\filedate{2018/11/22}
 \ProvidesPackage{newpxmath}
 	[\filedate\space v\fileversion]
 %\@ifundefined{newpxmathLoaded}{}{\endinput}
@@ -22,7 +22,10 @@
 %\csname newpxmathLoaded\endcsname
 %\let\newpxmathLoaded\endinput
 \RequirePackage{amsmath} % for better \left
-%\def\ly at one{LY1}
+\RequirePackage{etoolbox}
+%\RequirePackage{etextools} % for \ifiscs, conflicts with biblatex
+% replacement for \ifiscs
+\def\ifiscseq#1{\ifcat$\expandafter\@gobble\string#1$\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}%\def\ly at one{LY1}
 \def\t at one{T1}
 %\def\ot at one{OT1}
 
@@ -201,26 +204,44 @@
    \DeclareMathSymbol{#1}{#2}{#3}{#4}
    \advance #4 by1}
 
+\DeclareRobustCommand{\BI@}[1]{%
+\begingroup\text{\mathversion{bold}$#1$}\endgroup}
+%\DeclareRobustCommand{\BIA}{\BI@{A}} % etc
+
+\newcount\px at cntz
+\newcount\px at IsAlNum
 \def\px at isdigit#1{% #1 should be a single character
 \px at Isdigit=\z@ %
-\count0=\number`#1\relax% 
-\ifnum\count0>47\relax% 
-\ifnum\count0<58\relax% 
+\px at cntz=\number`#1\relax% 
+\ifnum\px at cntz>47\relax% 
+\ifnum\px at cntz<58\relax% 
 \px at Isdigit=\@ne % 
 \fi% 
 \fi%
 }
-\DeclareRobustCommand{\BI@}[1]{%
-\begingroup\text{\mathversion{bold}$#1$}\endgroup}
-%\DeclareRobustCommand{\BIA}{\BI@{A}} % etc
+\def\px at isAlNum#1{% #1 should be a single character
+\px at IsAlNum=\z@ %
+\px at cntz=\number`#1\relax% 
+\ifnum\px at cntz>47\relax% 
+	\ifnum\px at cntz<58\relax% 
+		\px at IsAlNum=\@ne %
+	\else
+		\ifnum\px at cntz>64\relax%
+			\ifnum\px at cntz<91\relax%
+			 	\px at IsAlNum=\tw@ %
+			\else
+				\ifnum\px at cntz>96\relax%
+					\ifnum\px at cntz<123\relax%
+			 			\px at IsAlNum=3\relax %
+					\fi
+				\fi
+			\fi
+		\fi
+	\fi
+\fi 
+}
 
-\def\px at XXX#1#2\@nil{% #1=first character, #2=rest of string
-\px at isdigit{#1}%
-\ifnum\px at Isdigit>\z@ $#1$\else#1\fi%
-\if\relax\detokenize{#2}\relax \else
-\edef\px at XXXcmd{\noexpand\px at XXX #2\noexpand\@nil}\px at XXXcmd \fi}
 
-\def\equalht#1{\px at XXX #1\@nil}
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1524,98 +1545,185 @@
 \re at DeclareMathSymbol{\varg}{\mathord}{lettersA}{49}
 \DeclareMathSymbol{\uppartial}{\mathord}{lettersA}{64}
 
-\def\npx at UC{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}
-\def\npx at lc{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}
-\def\npx at num{0,1,2,3,4,5,6,7,8,9}
+%\def\npx at UC{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}
+%\def\npx at lc{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}
+%\def\npx at num{0,1,2,3,4,5,6,7,8,9}
 
 
-%\@for\npx at x:=\npx at UC\do{\edef\npx at tmp{\edef\csname
+%%\@for\npx at x:=\npx at UC\do{\edef\npx at tmp{\edef\csname
+%%\DeclareMathSymbol{\m at thbbch@rA}{\mathord}{lettersA}{129}
 %\DeclareMathSymbol{\m at thbbch@rA}{\mathord}{lettersA}{129}
-\DeclareMathSymbol{\m at thbbch@rA}{\mathord}{lettersA}{129}
-\DeclareMathSymbol{\m at thbbch@rB}{\mathord}{lettersA}{130}
-\DeclareMathSymbol{\m at thbbch@rC}{\mathord}{lettersA}{131}
-\DeclareMathSymbol{\m at thbbch@rD}{\mathord}{lettersA}{132}
-\DeclareMathSymbol{\m at thbbch@rE}{\mathord}{lettersA}{133}
-\DeclareMathSymbol{\m at thbbch@rF}{\mathord}{lettersA}{134}
-\DeclareMathSymbol{\m at thbbch@rG}{\mathord}{lettersA}{135}
-\DeclareMathSymbol{\m at thbbch@rH}{\mathord}{lettersA}{136}
-\DeclareMathSymbol{\m at thbbch@rI}{\mathord}{lettersA}{137}
-\DeclareMathSymbol{\m at thbbch@rJ}{\mathord}{lettersA}{138}
-\DeclareMathSymbol{\m at thbbch@rK}{\mathord}{lettersA}{139}
-\DeclareMathSymbol{\m at thbbch@rL}{\mathord}{lettersA}{140}
-\DeclareMathSymbol{\m at thbbch@rM}{\mathord}{lettersA}{141}
-\DeclareMathSymbol{\m at thbbch@rN}{\mathord}{lettersA}{142}
-\DeclareMathSymbol{\m at thbbch@rO}{\mathord}{lettersA}{143}
-\DeclareMathSymbol{\m at thbbch@rP}{\mathord}{lettersA}{144}
-\DeclareMathSymbol{\m at thbbch@rQ}{\mathord}{lettersA}{145}
-\DeclareMathSymbol{\m at thbbch@rR}{\mathord}{lettersA}{146}
-\DeclareMathSymbol{\m at thbbch@rS}{\mathord}{lettersA}{147}
-\DeclareMathSymbol{\m at thbbch@rT}{\mathord}{lettersA}{148}
-\DeclareMathSymbol{\m at thbbch@rU}{\mathord}{lettersA}{149}
-\DeclareMathSymbol{\m at thbbch@rV}{\mathord}{lettersA}{150}
-\DeclareMathSymbol{\m at thbbch@rW}{\mathord}{lettersA}{151}
-\DeclareMathSymbol{\m at thbbch@rX}{\mathord}{lettersA}{152}
-\DeclareMathSymbol{\m at thbbch@rY}{\mathord}{lettersA}{153}
-\DeclareMathSymbol{\m at thbbch@rZ}{\mathord}{lettersA}{154}
-
-\DeclareMathSymbol{\m at thbbch@rk}{\mathord}{lettersA}{171}
-% Original \varmathbb macro, slightly polished
-\def\DoFutureLet{% 
-   \def\@FutureLetDecide{%
-     \ifx\@nil\@FutureLetToken
-        \def\@FutureLetNext{\@EachCharacterDone}
-     \else
-        \def\@FutureLetNext{\@PickUpTheCharacter}
-     \fi
-     \@FutureLetNext
-   }%
-\futurelet\@FutureLetToken\@FutureLetDecide}% end DoFutureLet
-
-%\def\m at keCharacter#1{%
-%  \@tempcnta=`#1\relax \advance\@tempcnta "40\relax
-%  \edef\npx at char{\npx at lettersA\nhex{2}{\the\@tempcnta}}
-%  \expandafter\mathchar\npx at char}
-%\def\@PickUpTheCharacter#1{\m at keCharacter{#1}\DoFutureLet}
-%\def\@EachCharacterDone \@nil{}% cleanup---get rid of \@nil
-%\newif\ifnpx at notnil
-%\def\@EachCharacter{%
-%   \DoFutureLet{\@EachCharacterDone}{\@PickUpTheCharacter}}
+%\DeclareMathSymbol{\m at thbbch@rB}{\mathord}{lettersA}{130}
+%\DeclareMathSymbol{\m at thbbch@rC}{\mathord}{lettersA}{131}
+%\DeclareMathSymbol{\m at thbbch@rD}{\mathord}{lettersA}{132}
+%\DeclareMathSymbol{\m at thbbch@rE}{\mathord}{lettersA}{133}
+%\DeclareMathSymbol{\m at thbbch@rF}{\mathord}{lettersA}{134}
+%\DeclareMathSymbol{\m at thbbch@rG}{\mathord}{lettersA}{135}
+%\DeclareMathSymbol{\m at thbbch@rH}{\mathord}{lettersA}{136}
+%\DeclareMathSymbol{\m at thbbch@rI}{\mathord}{lettersA}{137}
+%\DeclareMathSymbol{\m at thbbch@rJ}{\mathord}{lettersA}{138}
+%\DeclareMathSymbol{\m at thbbch@rK}{\mathord}{lettersA}{139}
+%\DeclareMathSymbol{\m at thbbch@rL}{\mathord}{lettersA}{140}
+%\DeclareMathSymbol{\m at thbbch@rM}{\mathord}{lettersA}{141}
+%\DeclareMathSymbol{\m at thbbch@rN}{\mathord}{lettersA}{142}
+%\DeclareMathSymbol{\m at thbbch@rO}{\mathord}{lettersA}{143}
+%\DeclareMathSymbol{\m at thbbch@rP}{\mathord}{lettersA}{144}
+%\DeclareMathSymbol{\m at thbbch@rQ}{\mathord}{lettersA}{145}
+%\DeclareMathSymbol{\m at thbbch@rR}{\mathord}{lettersA}{146}
+%\DeclareMathSymbol{\m at thbbch@rS}{\mathord}{lettersA}{147}
+%\DeclareMathSymbol{\m at thbbch@rT}{\mathord}{lettersA}{148}
+%\DeclareMathSymbol{\m at thbbch@rU}{\mathord}{lettersA}{149}
+%\DeclareMathSymbol{\m at thbbch@rV}{\mathord}{lettersA}{150}
+%\DeclareMathSymbol{\m at thbbch@rW}{\mathord}{lettersA}{151}
+%\DeclareMathSymbol{\m at thbbch@rX}{\mathord}{lettersA}{152}
+%\DeclareMathSymbol{\m at thbbch@rY}{\mathord}{lettersA}{153}
+%\DeclareMathSymbol{\m at thbbch@rZ}{\mathord}{lettersA}{154}
 %
-\def\m at keCharacter#1{\csname\F at ntPrefix#1\endcsname}
-\def\@PickUpTheCharacter#1{\m at keCharacter{#1}\DoFutureLet}
-\def\@EachCharacterDone \@nil{}
+%\DeclareMathSymbol{\m at thbbch@rk}{\mathord}{lettersA}{171}
+%% Original \varmathbb macro, slightly polished
+%\def\DoFutureLet{% 
+%   \def\@FutureLetDecide{%
+%     \ifx\@nil\@FutureLetToken
+%        \def\@FutureLetNext{\@EachCharacterDone}
+%     \else
+%        \def\@FutureLetNext{\@PickUpTheCharacter}
+%     \fi
+%     \@FutureLetNext
+%   }%
+%\futurelet\@FutureLetToken\@FutureLetDecide}% end DoFutureLet
 %
+%%\def\m at keCharacter#1{%
+%%  \@tempcnta=`#1\relax \advance\@tempcnta "40\relax
+%%  \edef\npx at char{\npx at lettersA\nhex{2}{\the\@tempcnta}}
+%%  \expandafter\mathchar\npx at char}
+%%\def\@PickUpTheCharacter#1{\m at keCharacter{#1}\DoFutureLet}
+%%\def\@EachCharacterDone \@nil{}% cleanup---get rid of \@nil
+%%\newif\ifnpx at notnil
+%%\def\@EachCharacter{%
+%%   \DoFutureLet{\@EachCharacterDone}{\@PickUpTheCharacter}}
+%%
+%\def\m at keCharacter#1{\csname\F at ntPrefix#1\endcsname}
+%\def\@PickUpTheCharacter#1{\m at keCharacter{#1}\DoFutureLet}
+%\def\@EachCharacterDone \@nil{}
+%%
+%%\DeclareRobustCommand*{\varmathbb}[1]{\gdef\F at ntPrefix{m at thbbch@r}%
+%%  \@EachCharacter #1\@nil}
 %\DeclareRobustCommand*{\varmathbb}[1]{\gdef\F at ntPrefix{m at thbbch@r}%
-%  \@EachCharacter #1\@nil}
-\DeclareRobustCommand*{\varmathbb}[1]{\gdef\F at ntPrefix{m at thbbch@r}%
-  \DoFutureLet #1\@nil}
+%  \DoFutureLet #1\@nil}
 
 % Additional macros to access process a single character only, work with \bm
-\def\npx at char{}
-\DeclareRobustCommand*{\vmathbb}[1]{% for original variant bb
-  \@tempcnta=`#1\relax \advance\@tempcnta "40\relax
-  \edef\npx at char{"\hexnumber@\symlettersA\nhex{2}{\the\@tempcnta}}
-  \expandafter\mathchar\npx at char
-}
-\DeclareRobustCommand*{\vvmathbb}[1]{% for new (STIX) variant
-  \@tempcnta=`#1\relax \advance\@tempcnta "80\relax
-  \edef\npx at char{"\hexnumber@\symlettersA\nhex{2}{\the\@tempcnta}}
-  \expandafter\mathchar\npx at char
-}
+%\def\npx at char{}
+%\DeclareRobustCommand*{\vmathbb}[1]{% for original variant bb
+%  \@tempcnta=`#1\relax \advance\@tempcnta "40\relax
+%  \edef\npx at char{"\hexnumber@\symlettersA\nhex{2}{\the\@tempcnta}}
+%  \expandafter\mathchar\npx at char
+%}
+%\DeclareRobustCommand*{\vvmathbb}[1]{% for new (STIX) variant
+%  \@tempcnta=`#1\relax \advance\@tempcnta "80\relax
+%  \edef\npx at char{"\hexnumber@\symlettersA\nhex{2}{\the\@tempcnta}}
+%  \expandafter\mathchar\npx at char
+%}
 %\DeclareRobustCommand*{\vvmathbbb}[1]{% for new (STIX) variant
 %  \@tempcnta=`#1\relax \advance\@tempcnta "80\relax
 %  \edef\npx at char{"\hexnumber@\symboldlettersA\nhex{2}{\the\@tempcnta}}
 %  \expandafter\mathchar\npx at char
 %}
+% Experimental code May 8, 2018
+\newcount\npx at numstart 
+\newcount\npx at UCstart 
+\newcount\npx at lcstart
+\newcount\npx at tmpc
+\newcount\npx at imath
+\newcount\npx at jmath
+\newif\ifnpx at notempty
+\def\npx at fam{}
+\def\npx at char{}
+\def\npx at alfa#1#2#3#4#5#6#7{%#1=string, #2=UC,#3=lc,#4=imath,#5=jmath,#6=numstart,#7=fam
+	\npx at UCstart=#2 
+	%\gdef\xx{x#3x}
+	\@xp\ifblank\@xp{#3}{\npx at lcstart=512 }{\npx at lcstart=#3}
+	\@xp\ifblank\@xp{#4}{\npx at imath=512 }{\npx at imath=#4}
+	\@xp\ifblank\@xp{#5}{\npx at jmath=512 }{\npx at jmath=#5}
+	\@xp\ifblank\@xp{#6}{\npx at numstart=512 }{\npx at numstart=#6}
+	\def\npx at fam{#7}
+	\@xp\ifblank\@xp{#1}{\relax}{\@xp\npx@@alfa #1\@nil}}
+	
+\def\npx@@alfa#1#2\@nil{%
+	\npx at out{#1}
+	\ifblank{#2}{\relax}{\npx@@alfa #2\@nil}}
+	
+\def\npx at out#1{% #1 is always a single token---use values from \npx at alfa
+	%\showthe\npx at numstart
+	\npx at tmpc=\z@
+	\ifx#1\imath\npx at tmpc=128\relax
+		\ifnum\npx at imath>255\relax #1\npx at tmpc=256 \message{^^JNo imath in this alphabet^^J}\fi
+	\else % not \imath
+		\ifx#1\jmath\npx at tmpc=129\relax
+			\ifnum\npx at jmath>255\relax #1\npx at tmpc=256 \message{^^JNo jmath in this alphabet^^J}\fi
+		\else % neither \imath nor \jmath
+			\ifiscseq{#1}{#1\npx at tmpc=256 }{% not a cs
+			\npx at tmpc=\number\@xp`#1}
+		\fi
+	\fi
+	%\message{^^JCharacter index = \the\npx at tmpc^^J}
+  \ifnum\npx at tmpc<128\relax % neither \imath nor \jmath nor cs
+	\px at isAlNum{#1}
+	%\message{^^JIsAlNum = \the\px at IsAlNum^^J}
+	\ifnum\px at IsAlNum=\@ne % it's a digit
+		\ifnum\npx at numstart>255\relax #1\npx at tmpc=256 \message{^^JNo digits in this alphabet^^J}
+		\else
+			\advance\npx at tmpc -48 % 0..9
+			\advance\npx at tmpc \npx at numstart 
+		\fi
+	\else
+		\ifnum\px at IsAlNum=\tw@ % it's UC
+			\advance\npx at tmpc -65 % 0..25
+			\advance\npx at tmpc\npx at UCstart
+		\else
+			\ifnum\px at IsAlNum>\tw@ % it's lc
+				\ifnum\npx at lcstart>255 #1\npx at tmpc=256 \message{^^JNo lowercase in this alphabet^^J}
+				\else
+					%\message{^^JCharacter index = \the\npx at tmpc^^J
+					%lcstart = \the\npx at lcstart^^J}
+					\advance\npx at tmpc -97 % 0..25
+					\advance\npx at tmpc\npx at lcstart
+					%\message{^^JCharacter index = \the\npx at tmpc^^J}
+				\fi
+			\else % it must be a character outside alphanumerics
+				#1
+			\fi
+		\fi			
+	\fi
+   \else % npx at tmpc>127
+		\ifnum\npx at tmpc=128\relax % imath
+			\npx at tmpc=\npx at imath
+		\else
+			\ifnum\npx at tmpc=129\relax % jmath
+				\npx at tmpc=\npx at jmath
+			\fi
+		\fi
+	\fi
+	\ifnum\npx at tmpc<256\relax
+		\edef\npx at char{"\@xp\hexnumber@\csname sym\npx at fam\endcsname\nhex{2}{\the\npx at tmpc}}
+		%\message{^^Joutput char = \npx at char^^J}
+  		\@xp\mathchar\npx at char%\traceoff
+  	\fi %end of ifnum <256
+}
+
+\DeclareRobustCommand{\vmathbb}[1]{\npx at alfa{#1}{129}{159}{}{}{}{lettersA}}
+\DeclareRobustCommand{\vvmathbb}[1]{\npx at alfa{#1}{193}{225}{}{}{176}{lettersA}}
+
 \ifpx at vvarbb
   \let\mathbb\vvmathbb
 \else
   \ifpx at varbb 
-    \let\mathbb\varmathbb
+    \let\mathbb\vmathbb
   \else
-    \ifpx at ams\else\let\mathbb\varmathbb\fi
+    \ifpx at ams\else\let\mathbb\vmathbb\fi
   \fi
 \fi
+\let\varmathbb\vmathbb
+\let\vvarmathbb\vvmathbb
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Math Extension (npxex) Definition % largesymbols
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex-live-commits mailing list