From eeb016cd74e00dfc5f4efc6c9924c03a6313826e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 23 Feb 2020 00:29:27 +0000 Subject: expkv (22feb20) git-svn-id: svn://tug.org/texlive/trunk@53872 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/generic/expkv/expkv.tex | 75 +++++++++++++++------------ 1 file changed, 43 insertions(+), 32 deletions(-) (limited to 'Master/texmf-dist/tex/generic') diff --git a/Master/texmf-dist/tex/generic/expkv/expkv.tex b/Master/texmf-dist/tex/generic/expkv/expkv.tex index ca05bd10ae3..aed5e127177 100644 --- a/Master/texmf-dist/tex/generic/expkv/expkv.tex +++ b/Master/texmf-dist/tex/generic/expkv/expkv.tex @@ -39,8 +39,8 @@ \else \expandafter\endinput \fi -\def\ekvVersion{0.3} -\def\ekvDate{2020-01-22} +\def\ekvVersion{0.4} +\def\ekvDate{2020-02-22} \csname ekv@tmp\endcsname \expandafter\chardef\csname ekv@tmp\endcsname=\catcode`\@ \catcode`\@=11 @@ -69,6 +69,7 @@ \fi \@firstoftwo } + % \begin{macro}[internal] \def\ekv@ifdefined@pair#1#2% {% \expandafter\ekv@ifdefined@pair@ @@ -202,20 +203,18 @@ {##3} \long\def\ekv@set@other##1##2,% {% - \ekv@ifblank@##2\ekv@nil\ekv@ifempty@B\ekv@ifempty@true@F - \ekv@ifempty@A\ekv@ifempty@B\@firstofone + \ekv@ifstop##2\ekv@endset@other\ekv@mark\ekv@stop + \ekv@ifhas@eq@other##2=\ekv@ifempty@B\ekv@ifempty@false + \ekv@ifempty@A\ekv@ifempty@B\@firstoftwo + {\ekv@set@eq@other##1##2\ekv@stop}% {% - \ekv@ifhas@eq@other##2=\ekv@ifempty@B\ekv@ifempty@false + \ekv@ifhas@eq@active##2#2\ekv@ifempty@B\ekv@ifempty@false \ekv@ifempty@A\ekv@ifempty@B\@firstoftwo - {\ekv@set@eq@other##1##2\ekv@stop}% + {\ekv@set@eq@active##1##2\ekv@stop}% {% - \ekv@ifhas@eq@active##2#2\ekv@ifempty@B\ekv@ifempty@false - \ekv@ifempty@A\ekv@ifempty@B\@firstoftwo - {\ekv@set@eq@active##1##2\ekv@stop}% - {% - \ekv@ifstop##2\ekv@endset@other\ekv@mark\ekv@stop - \ekv@strip{##2}\ekv@set@key##1% - }% + \ekv@ifblank@##2\ekv@nil\ekv@ifempty@B\ekv@ifempty@true@F + \ekv@ifempty@A\ekv@ifempty@B\@firstofone + {\ekv@strip{##2}\ekv@set@key##1}% }% }% \ekv@set@other##1\ekv@mark% @@ -234,7 +233,10 @@ \long\def\ekv@ifhas@eq@other\ekv@mark##1={\ekv@ifempty@\ekv@ifempty@A} \long\def\ekv@ifhas@eq@active\ekv@mark##1#2{\ekv@ifempty@\ekv@ifempty@A} \long\def\ekv@endset@other - \ekv@mark\ekv@stop\ekv@strip##1\ekv@set@key##2% + \ekv@mark\ekv@stop + \ekv@ifhas@eq@other##1=\ekv@ifempty@B\ekv@ifempty@false + \ekv@ifempty@A\ekv@ifempty@B\@firstoftwo + ##2% \ekv@set@other##3\ekv@mark {} \long\def\ekvbreak##1##2\ekv@stop#1##3{##1} @@ -250,7 +252,7 @@ } \long\def\ekvparse##1##2##3% {% - \expanded{\ekv@parse##1##2\ekv@mark##3#1\ekv@stop#1}% + \ekv@parse##1##2\ekv@mark##3#1\ekv@stop#1% } \long\def\ekv@parse##1##2##3#1% {% @@ -263,20 +265,18 @@ {} \long\def\ekv@parse@other##1##2##3,% {% - \ekv@ifblank@##3\ekv@nil\ekv@ifempty@B\ekv@ifempty@true@F - \ekv@ifempty@A\ekv@ifempty@B\@firstofone + \ekv@ifstop##3\ekv@endparse@other\ekv@mark\ekv@stop + \ekv@ifhas@eq@other##3=\ekv@ifempty@B\ekv@ifempty@false + \ekv@ifempty@A\ekv@ifempty@B\@firstoftwo + {\ekv@parse@eq@other##3\ekv@stop##2}% {% - \ekv@ifhas@eq@other##3=\ekv@ifempty@B\ekv@ifempty@false + \ekv@ifhas@eq@active##3#2\ekv@ifempty@B\ekv@ifempty@false \ekv@ifempty@A\ekv@ifempty@B\@firstoftwo - {\unexpanded{##2}\ekv@parse@eq@other##3\ekv@stop}% + {\ekv@parse@eq@active##3\ekv@stop##2}% {% - \ekv@ifhas@eq@active##3#2\ekv@ifempty@B\ekv@ifempty@false - \ekv@ifempty@A\ekv@ifempty@B\@firstoftwo - {\unexpanded{##2}\ekv@parse@eq@active##3\ekv@stop}% - {% - \ekv@ifstop##3\ekv@endparse@other\ekv@mark\ekv@stop - \unexpanded{##1}{\ekv@strip{##3}\unexpanded}% - }% + \ekv@ifblank@##3\ekv@nil\ekv@ifempty@B\ekv@ifempty@true@F + \ekv@ifempty@A\ekv@ifempty@B\@firstofone + {\ekv@strip{##3}\ekv@parse@key##1}% }% }% \ekv@parse@other##1##2\ekv@mark @@ -286,19 +286,30 @@ \ekv@ifhas@eq@active##1#2\ekv@ifempty@B\ekv@ifempty@false \ekv@ifempty@A\ekv@ifempty@B\@firstoftwo {\ekv@parse@eq@active##1=}% - {{\ekv@strip{##1}\unexpanded}\ekv@parse@pair\ekv@mark}% + {\ekv@strip{##1}\ekv@parse@pair\ekv@mark}% } \long\def\ekv@parse@eq@active##1#2% {% - {\ekv@strip{##1}\unexpanded}\ekv@parse@pair\ekv@mark + \ekv@strip{##1}\ekv@parse@pair\ekv@mark } \long\def\ekv@endparse@other - \ekv@mark\ekv@stop\unexpanded##1% - \ekv@parse@other##2\ekv@mark + \ekv@mark\ekv@stop + \ekv@ifhas@eq@other##1=\ekv@ifempty@B\ekv@ifempty@false + \ekv@ifempty@A\ekv@ifempty@B\@firstoftwo + ##2% + \ekv@parse@other##3\ekv@mark {} -\long\def\ekv@parse@pair##1\ekv@stop +\long\def\ekv@parse@pair##1##2\ekv@stop + {% + \ekv@strip{##2}\ekv@parse@pair@{##1}% + } +\long\def\ekv@parse@pair@##1##2##3% + {% + \unexpanded{##3{##2}{##1}}% + } +\long\def\ekv@parse@key##1##2% {% - {\ekv@strip{##1}\unexpanded}% + \unexpanded{##2{##1}}% } } \begingroup -- cgit v1.2.3