diff options
author | Karl Berry <karl@freefriends.org> | 2021-12-13 20:52:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-12-13 20:52:17 +0000 |
commit | f2fef87d1b1a46e5ea63693d33e7a7ec1752956a (patch) | |
tree | 644c63efb2c92b290ee690dc82e681fc80c22b42 /Master/texmf-dist/tex | |
parent | 71002954509189aee20d9019e6bee3b20102614b (diff) |
pxpic (13dec21)
git-svn-id: svn://tug.org/texlive/trunk@61294 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/pxpic/pxpic.sty | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/pxpic/pxpic.sty b/Master/texmf-dist/tex/latex/pxpic/pxpic.sty index bfc93276911..2b29dfec26f 100644 --- a/Master/texmf-dist/tex/latex/pxpic/pxpic.sty +++ b/Master/texmf-dist/tex/latex/pxpic/pxpic.sty @@ -29,20 +29,22 @@ %% and the derived files pxpic.pdf %% pxpic.sty %% -\ProvidesPackage{pxpic}[2021-01-16 v1.2 draw pixel pictures] +\ProvidesPackage{pxpic}[2021-12-12 v1.3 draw pixel pictures] \RequirePackage{xcolor} \RequirePackage{expkv} \@ifdefinable\pxpicHT{\newdimen\pxpicHT} \@ifdefinable\pxpicWD{\newdimen\pxpicWD} -\pxpicHT1pt -\pxpicWD\pxpicHT +\pxpicHT=\p@ +\pxpicWD=\pxpicHT \@ifdefinable\pxpic@kern{\newdimen\pxpic@kern} -\pxpic@kern\z@ +\pxpic@kern=\z@ +\@ifdefinable\pxpic@inner@box{\let\pxpic@inner@box\vbox} +\@ifdefinable\pxpic@after@inner@box{\let\pxpic@after@inner@box\@empty} \protected\ekvdef{pxpic}{size} - {\pxpicHT\dimexpr#1\relax\pxpicWD\dimexpr#1\relax} -\protected\ekvdef{pxpic}{ht}{\pxpicHT\dimexpr#1\relax} -\protected\ekvdef{pxpic}{wd}{\pxpicWD\dimexpr#1\relax} -\protected\ekvdef{pxpic}{gap-hack}{\pxpic@kern\dimexpr#1\relax} + {\pxpicHT=\dimexpr#1\relax\pxpicWD=\pxpicHT} +\protected\ekvdef{pxpic}{ht}{\pxpicHT=\dimexpr#1\relax} +\protected\ekvdef{pxpic}{wd}{\pxpicWD=\dimexpr#1\relax} +\protected\ekvdef{pxpic}{gap-hack}{\pxpic@kern=\dimexpr#1\relax} \protected\ekvdef{pxpic}{skip}{\ekvdefNoVal{pxpic@px}{#1}{\pxskip}} \protected\ekvdef{pxpic}{colors}{\ekvparse\pxpic@err@noval\pxpic@setcolor{#1}} \ekvletkv{pxpic}{colours}{pxpic}{colors} @@ -62,32 +64,48 @@ {\csname pxpic@colorlist@#1\endcsname}% } \ekvletkv{pxpic}{colour-list}{pxpic}{color-list} +\protected\ekvdefNoVal{pxpic}{b} + {% + \let\pxpic@inner@box\vbox + \let\pxpic@after@inner@box\@empty + } +\protected\ekvdefNoVal{pxpic}{c} + {% + \def\pxpic@inner@box{\setbox0=\vbox}% + \def\pxpic@after@inner@box{\lower.5\ht0\box0}% + } +\protected\ekvdefNoVal{pxpic}{t} + {% + \let\pxpic@inner@box\vtop + \let\pxpic@after@inner@box\@empty + } \@ifdefinable\pxpic{\protected\def\pxpic{\hbox\bgroup\pxpic@}} \newcommand\pxpic@[2][] {% - \vbox + \pxpicsetup{#1}% + \pxpic@inner@box {% - \pxpicsetup{#1}% \let\px\pxpic@px \let\pxskip\pxpic@skip \advance\pxpicHT\pxpic@kern \advance\pxpicWD\pxpic@kern - \baselineskip\pxpicHT + \baselineskip=\pxpicHT \kern\pxpic@kern \pxpic@parse#2\pxpic@end }% + \pxpic@after@inner@box \egroup } \ekvsetdef\pxpicsetup{pxpic} \newcommand*\pxpiclogo[1][.13ex] {% \begingroup - \pxpicHT\dimexpr#1\relax - \pxpicWD\pxpicHT - \pxpic@kern\z@ + \pxpicHT=\dimexpr#1\relax + \pxpicWD=\pxpicHT + \pxpic@kern=\z@ \leavevmode \lower3.2\pxpicHT\pxpic - [mode=px,colours={o=[HTML]{9F393D},g=black!75},skip=.] + [b,mode=px,colours={o=[HTML]{9F393D},g=black!75},skip=.] { {............................................g} {...........................................gggg} @@ -120,8 +138,8 @@ {\pxpic@err@defined@colorlist{#1}\@gobble}% } \protected\def\pxpicsetcolorlist#1% - {\expandafter\pxpicsetcolorlist@\csname pxpic@colorlist@#1\endcsname} -\protected\long\def\pxpicsetcolorlist@#1#2% + {\expandafter\pxpic@setcolorlist\csname pxpic@colorlist@#1\endcsname} +\protected\long\def\pxpic@setcolorlist#1#2% {% \edef#1{\ekvparse\pxpic@experr@noval\pxpic@setcolor@colorlist{#2}}% \begingroup\edef#1{\endgroup\protected\def\unexpanded{#1}{#1}}% @@ -131,9 +149,9 @@ {% \@ifundefined{pxpic@colorlist@#1} {\pxpic@err@unknown@colorlist{#1}\@gobble} - {\expandafter\pxpicaddcolorlist@\csname pxpic@colorlist@#1\endcsname}% + {\expandafter\pxpic@addcolorlist\csname pxpic@colorlist@#1\endcsname}% } -\protected\long\def\pxpicaddcolorlist@#1#2% +\protected\long\def\pxpic@addcolorlist#1#2% {% \begingroup \edef\pxpic@tmp @@ -206,7 +224,7 @@ \pxpic@tmp{wave} \let\pxpic@tmp\pxpic@undef \newcommand\pxpic@px{\vrule height\pxpicHT width\pxpicWD depth\z@} -\newcommand\pxpic@skip{\hskip\pxpicWD} +\newcommand\pxpic@skip{\kern\pxpicWD} \newcommand\pxpic@setcolor[2] {% \pxpic@ifbracket\pxpic@end#2.\pxpic@end[]\pxpic@end @@ -248,7 +266,7 @@ {% \expandafter\expandafter\expandafter \pxpic@ifend - \@firstofone{#1##1}% + \@firstofone{#1##1.}% \pxpic@end }% } |