summaryrefslogtreecommitdiff
path: root/macros/generic/expkv/expkv.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/generic/expkv/expkv.dtx')
-rw-r--r--macros/generic/expkv/expkv.dtx32
1 files changed, 27 insertions, 5 deletions
diff --git a/macros/generic/expkv/expkv.dtx b/macros/generic/expkv/expkv.dtx
index 12cf70fd87..f804e6ee0f 100644
--- a/macros/generic/expkv/expkv.dtx
+++ b/macros/generic/expkv/expkv.dtx
@@ -429,6 +429,14 @@ and the derived files expkv.pdf
% |\relax|.
% \end{function}
%
+% \begin{function}{\ekvifdefinedset}
+% \begin{syntax}
+% \cs{ekvifdefinedset}\marg{set}\marg{true}\marg{false}
+% \end{syntax}
+% This macro tests whether \set\ is defined (which it is if at least one key
+% was defined for it). If it is \meta{true} will be run, else \meta{false}.
+% \end{function}
+%
% \begin{function}{\ekvbreak,\ekvbreakPreSneak,\ekvbreakPostSneak}
% \begin{syntax}
% \cs{ekvbreak}\marg{after}
@@ -1002,8 +1010,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.3}
-\def\ekvDate{2020-07-02}
+\def\ekvVersion{1.4}
+\def\ekvDate{2020-07-04}
% \end{macrocode}
% \end{macro}
%
@@ -1029,18 +1037,23 @@ and the derived files expkv.pdf
% \begin{macro}[internal]
% {
% \@gobble,\@firstofone,\@firstoftwo,\@secondoftwo,
-% \ekv@gobbleto@stop,\ekv@fi@secondoftwo,\ekv@gobble@mark,
-% \ekv@gobble@from@mark@to@stop
+% \ekv@gobbleto@stop,\ekv@fi@gobble,\ekv@fi@firstoftwo,\ekv@fi@secondoftwo,
+% \ekv@gobble@mark,\ekv@gobble@from@mark@to@stop
% }
% Since branching tests are often more versatile than |\if...\else...\fi|
% constructs, we define helpers that are branching pretty fast. Also here are
% some other utility functions that just grab some tokens. The ones that are
-% also contained in \LaTeX\ don't use the |ekv| prefix.
+% also contained in \LaTeX\ don't use the |ekv| prefix. Not all of the ones
+% defined here are really needed by \expkv\ but are provided because packages
+% like \expkvd\ or \expkvo\ need them (and I don't want to define them in each
+% package which might need them).
% \begin{macrocode}
\long\def\@gobble#1{}
\long\def\@firstofone#1{#1}
\long\def\@firstoftwo#1#2{#1}
\long\def\@secondoftwo#1#2{#2}
+\long\def\ekv@fi@gobble\fi\@firstofone#1{\fi}
+\long\def\ekv@fi@firstoftwo\fi\@secondoftwo#1#2{\fi#1}
\long\def\ekv@fi@secondoftwo\fi\@firstoftwo#1#2{\fi#2}
\long\def\ekv@gobbleto@stop#1\ekv@stop{}
\def\ekv@gobble@mark\ekv@mark{}
@@ -1263,6 +1276,15 @@ and the derived files expkv.pdf
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ekvifdefinedset}
+% \begin{macrocode}
+\def\ekvifdefinedset#1%
+ {%
+ \ekv@ifdefined{\ekv@undefined@set{#1}}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\ekvset}
% Set up |\ekvset|, which should not be affected by active commas and equal
% signs. The equal signs are a bit harder to cope with and we'll do that later,