diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-25 20:46:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-25 20:46:32 +0000 |
commit | c9c5327330cc47c3c0b99ae3956c5ae4af7e52e7 (patch) | |
tree | d6534d550770cb0dab4eb3d59af392cba7501155 /Master/texmf-dist/tex/generic/expkv-cs | |
parent | 881a80a648cf13fd0b856493d5320d3ab6a74250 (diff) |
expkv-cs (25may21)
git-svn-id: svn://tug.org/texlive/trunk@59340 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/expkv-cs')
-rw-r--r-- | Master/texmf-dist/tex/generic/expkv-cs/expkv-cs.tex | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/generic/expkv-cs/expkv-cs.tex b/Master/texmf-dist/tex/generic/expkv-cs/expkv-cs.tex index 8bcce4fcee5..5bdadad97a9 100644 --- a/Master/texmf-dist/tex/generic/expkv-cs/expkv-cs.tex +++ b/Master/texmf-dist/tex/generic/expkv-cs/expkv-cs.tex @@ -35,14 +35,25 @@ \else \expandafter\endinput \fi -\def\ekvcVersion{0.8} -\def\ekvcDate{2021-04-12} +\def\ekvcVersion{0.9} +\def\ekvcDate{2021-05-24} \csname ekvc@tmp\endcsname \expandafter\chardef\csname ekvc@tmp\endcsname=\catcode`\@ \catcode`\@=11 \newcount\ekvc@keycount -\def\ekvc@long{} -\def\ekvc@any@long{} +\let\ekvc@long\ekv@empty +\let\ekvc@any@long\ekv@empty +\long\def\ekvc@ifdefined#1% + {% + \ifdefined#1% + \ifx\relax#1% + \ekv@fi@gobble + \fi + \@firstofone + \ekv@fi@firstoftwo + \fi + \@secondoftwo + } \def\ekvc@ekvset@pre@expander#1% {% \expandafter\ekvc@ekvset@pre@expander@a\ekvset{#1}\ekvc@stop\ekvc@stop @@ -53,12 +64,14 @@ } \def\ekvc@ekvset@pre@expander@b#1\ekvc@stop#2\ekvc@stop {% + \unexpanded\expandafter{\ekv@alignsafe}% \unexpanded{#1}##1\unexpanded{#2}% + \unexpanded\expandafter{\ekv@endalignsafe}% } \protected\long\def\ekvcSplitAndUse#1#2% {% \let\ekvc@helpers@needed\@firstoftwo - \ekv@ifdefined{\expandafter\@gobble\string#1}% + \ekvc@ifdefined#1% {\ekvc@err@already@defined#1}% {\ekvcSplitAndUse@#1{}{#2}}% } @@ -88,14 +101,14 @@ \protected\long\def\ekvcSplitAndForward#1#2#3% {% \let\ekvc@helpers@needed\@firstoftwo - \ekv@ifdefined{\expandafter\@gobble\string#1}% + \ekvc@ifdefined#1% {\ekvc@err@already@defined#1}% {\ekvcSplitAndUse@#1{{#2}}{#3}}% } \protected\long\def\ekvcSplit#1#2#3% {% \let\ekvc@helpers@needed\@secondoftwo - \ekv@ifdefined{\expandafter\@gobble\string#1}% + \ekvc@ifdefined#1% {\ekvc@err@already@defined#1}% {% \expandafter @@ -135,14 +148,14 @@ \protected\long\def\ekvc@SetupSplitKeys {% \ekvc@keycount=0 - \def\ekvc@any@long{}% - \def\ekvc@initials{}% + \let\ekvc@any@long\ekv@empty + \let\ekvc@initials\ekv@empty \ekvparse\ekvc@err@value@required\ekvc@SetupSplitKeys@a } \protected\def\ekvc@SetupSplitKeys@a#1% {% \advance\ekvc@keycount1 - \def\ekvc@long{}% + \let\ekvc@long\ekv@empty \ekvc@ifspace{#1}% {\ekvc@SetupSplitKeys@b#1\ekvc@stop}% {\ekvc@SetupSplitKeys@c{#1}}% @@ -276,7 +289,7 @@ \protected\long\def\ekvcHashAndUse#1#2% {% \let\ekvc@helpers@needed\@firstoftwo - \ekv@ifdefined{\expandafter\@gobble\string#1}% + \ekvc@ifdefined#1% {\ekvc@err@already@defined#1}% {\ekvcHashAndUse@#1{}{#2}}% } @@ -305,14 +318,14 @@ \protected\long\def\ekvcHashAndForward#1#2#3% {% \let\ekvc@helpers@needed\@firstoftwo - \ekv@ifdefined{\expandafter\@gobble\string#1}% + \ekvc@ifdefined#1% {\ekvc@err@already@defined#1}% {\ekvcHashAndUse@#1{{#2}}{#3}}% } \protected\long\def\ekvcHash#1#2#3% {% \let\ekvc@helpers@needed\@secondoftwo - \ekv@ifdefined{\expandafter\@gobble\string#1}% + \ekvc@ifdefined#1% {\ekvc@err@already@defined#1}% {% \expandafter @@ -325,13 +338,13 @@ \long\def\ekvc@hash@pack@argument#1\ekvc@stop#2{#2{#1}} \protected\long\def\ekvc@SetupHashKeys#1% {% - \def\ekvc@any@long{}% - \def\ekvc@initials{}% + \let\ekvc@any@long\ekv@empty + \let\ekvc@initials\ekv@empty \ekvparse\ekvc@err@value@required\ekvc@SetupHashKeys@a{#1}% } \protected\def\ekvc@SetupHashKeys@a#1% {% - \def\ekvc@long{}% + \let\ekvc@long\ekv@empty \ekvc@ifspace{#1}% {\ekvc@SetupHashKeys@b#1\ekvc@stop}% {\ekvc@SetupHashKeys@c{#1}}% @@ -489,7 +502,7 @@ } \protected\def\ekvcSecondaryKeys@a#1% {% - \def\ekvc@long{}% + \let\ekvc@long\ekv@empty \ekvc@ifspace{#1}% {\ekvcSecondaryKeys@b#1\ekvc@stop}% {\ekvc@err@missing@type{#1}\@gobble}% @@ -749,12 +762,7 @@ \errmessage {expkv-cs Error: Unknown key `\unexpanded{#1}' for macro `\ekvc@set'}% } -\def\ekvc@err#1% - {% - \long\def\ekvc@err##1{\expandafter\ekv@err@\@firstofone{#1##1.}\ekv@stop}% - } -\begingroup\expandafter\endgroup -\expandafter\ekvc@err\csname ! expkv-cs Error:\endcsname +\ekv@exparg{\long\def\ekvc@err#1}{\ekverr{expkv-cs}{#1}} \long\def\ekvc@err@unknown@hash#1{\ekvc@err{unknown hash `#1'}} \long\def\ekvc@err@missing@hash#1{\ekvc@err{hash `#1' not found}} \long\def\ekvc@err@empty@hash{\ekvc@err{empty hash}} |