From c2697fc286a1e2c94fd9968b76be6f4a6d2114cd Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 11 Apr 2020 03:09:12 +0000 Subject: CTAN sync 202004110309 --- macros/generic/expkv/README.md | 2 +- macros/generic/expkv/expkv.dtx | 40 ++++++++++++++++++++++------------------ macros/generic/expkv/expkv.pdf | Bin 388741 -> 389159 bytes 3 files changed, 23 insertions(+), 19 deletions(-) (limited to 'macros/generic') diff --git a/macros/generic/expkv/README.md b/macros/generic/expkv/README.md index aa7b2b12aa..7197a84af3 100644 --- a/macros/generic/expkv/README.md +++ b/macros/generic/expkv/README.md @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------- # expkv -- an expandable key=val implementation -Version 2020-04-09 v1.1 +Version 2020-04-10 v1.2 Released under the LaTeX Project Public License v1.3c or later See http://www.latex-project.org/lppl.txt diff --git a/macros/generic/expkv/expkv.dtx b/macros/generic/expkv/expkv.dtx index 6563d3c2ee..3fae5459b0 100644 --- a/macros/generic/expkv/expkv.dtx +++ b/macros/generic/expkv/expkv.dtx @@ -198,9 +198,9 @@ and the derived files expkv.pdf % \noindent\parfillskip=0pt % \expkv\ provides a small interface for \kv\ parsing. The parsing macro is % fully expandable, the \meta{code} of your keys might be not. \expkv\ is pretty -% fast, but not the fastest available \kv\ solution (\pkg{keyval} for instance -% is three times as fast, but not expandable and it might strip braces it -% shouldn't have stripped). +% fast, but not the fastest available \kv\ solution (\pkg{keyval} is one and a +% half times as fast, but not expandable and it might strip braces it shouldn't +% have stripped). % \end{abstract} % % \tableofcontents @@ -251,7 +251,8 @@ and the derived files expkv.pdf % user level). % % The following macros are available to define new keys. Those macros containing -% ``|def|'' in their name can be prefixed by anything allowed to prefix |\def|, +% ``|def|'' in their name can be prefixed by anything allowed to prefix |\def| +% (but \emph{don't} use |\outer|, keys defined with it won't ever be usable), % prefixes allowed for |\let| can prefix those with ``|let|'' in their name, % accordingly. Neither \set\ nor \key\ are allowed to be empty for new keys and % must not contain a |\par| or tokens that expand to it -- they must be legal @@ -536,7 +537,7 @@ and the derived files expkv.pdf % from 12 (just as some other packages in this list). Else the features of the % keys are equal to those of \pkg{keyval}, the parser has more features, though. % -% \paragraph{\pkg{options}} is a $1.5$ times slower for only a single value. It +% \paragraph{\pkg{options}} is $1.5$ times slower for only a single value. It % has a much bigger feature set. Unfortunately it also suffers from the % premature unbracing bug \pkg{keyval} has. % @@ -699,7 +700,7 @@ and the derived files expkv.pdf % To ignore duplicates will be easy if the value of the key used last will be % put first in the list, so the following will use |\ekvsneakPre| for the % user-level keys. If we wanted some key for which the first usage should be the -% the binding one we would use |\ekvsneak| instead for that key. +% binding one we would use |\ekvsneak| instead for that key. % % Providing default values can be done in different ways, we'll use a simple % approach in which we'll just put the outcome of our keys if they were used @@ -962,8 +963,8 @@ and the derived files expkv.pdf % \begin{macro}{\ekvVersion,\ekvDate} % We're on our first input, so lets store the version and date in a macro. % \begin{macrocode} -\def\ekvVersion{1.1} -\def\ekvDate{2020-04-09} +\def\ekvVersion{1.2} +\def\ekvDate{2020-04-10} % \end{macrocode} % \end{macro} % @@ -1095,7 +1096,9 @@ and the derived files expkv.pdf % We place some restrictions on the allowed names, though, namely sets and % keys are not allowed to be empty -- blanks are fine (meaning \mbox{set- % or} key-names consisting of spaces). The |\def\ekv@tmp| gobbles any \TeX\ -% prefixes which would otherwise throw errors. +% prefixes which would otherwise throw errors. This will, however, break the +% package if an |\outer| has been gobbled this way. I consider that good, +% because keys shouldn't be defined |\outer| anyways. % \begin{macrocode} \protected\def\ekv@checkvalid#1#2% {% @@ -1134,7 +1137,7 @@ and the derived files expkv.pdf \ekv@checkvalid{#1}{#2}% {% \expandafter\def\csname\ekv@name{#1}{#2}\endcsname##1{#3}% - \ekv@defset{#1}% + \expandafter\ekv@defset\csname\ekv@undefined@set{#1}\endcsname{#1}% }% } \protected\long\def\ekvdefNoVal#1#2#3% @@ -1142,7 +1145,7 @@ and the derived files expkv.pdf \ekv@checkvalid{#1}{#2}% {% \expandafter\def\csname\ekv@name{#1}{#2}N\endcsname{#3}% - \ekv@defset{#1}% + \expandafter\ekv@defset\csname\ekv@undefined@set{#1}\endcsname{#1}% }% } \protected\def\ekvlet#1#2#3% @@ -1150,7 +1153,7 @@ and the derived files expkv.pdf \ekv@checkvalid{#1}{#2}% {% \expandafter\let\csname\ekv@name{#1}{#2}\endcsname#3% - \ekv@defset{#1}% + \expandafter\ekv@defset\csname\ekv@undefined@set{#1}\endcsname{#1}% }% } \protected\def\ekvletNoVal#1#2#3% @@ -1158,7 +1161,7 @@ and the derived files expkv.pdf \ekv@checkvalid{#1}{#2}% {% \expandafter\let\csname\ekv@name{#1}{#2}N\endcsname#3% - \ekv@defset{#1}% + \expandafter\ekv@defset\csname\ekv@undefined@set{#1}\endcsname{#1}% }% } \protected\def\ekvletkv#1#2#3#4% @@ -1167,7 +1170,7 @@ and the derived files expkv.pdf {% \expandafter\let\csname\ekv@name{#1}{#2}\expandafter\endcsname \csname\ekv@name{#3}{#4}\endcsname - \ekv@defset{#1}% + \expandafter\ekv@defset\csname\ekv@undefined@set{#1}\endcsname{#1}% }% } \protected\def\ekvletkvNoVal#1#2#3#4% @@ -1176,7 +1179,7 @@ and the derived files expkv.pdf {% \expandafter\let\csname\ekv@name{#1}{#2}N\expandafter\endcsname \csname\ekv@name{#3}{#4}N\endcsname - \ekv@defset{#1}% + \expandafter\ekv@defset\csname\ekv@undefined@set{#1}\endcsname{#1}% }% } % \end{macrocode} @@ -1187,10 +1190,11 @@ and the derived files expkv.pdf % into a control sequence pretty early, so we have to define that control % sequence. % \begin{macrocode} -\protected\def\ekv@defset#1% +\protected\def\ekv@defset#1#2% {% - \expandafter\edef\csname\ekv@undefined@set{#1}\endcsname##1% - {\ekv@name@set{#1}\ekv@name@key{##1}}% + \ifx#1\relax + \edef#1##1{\ekv@name@set{#2}\ekv@name@key{##1}}% + \fi } % \end{macrocode} % \end{macro} diff --git a/macros/generic/expkv/expkv.pdf b/macros/generic/expkv/expkv.pdf index f96f204571..6f6bd295e6 100644 Binary files a/macros/generic/expkv/expkv.pdf and b/macros/generic/expkv/expkv.pdf differ -- cgit v1.2.3