summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/expkv-cs
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-09-21 19:46:07 +0000
committerKarl Berry <karl@freefriends.org>2021-09-21 19:46:07 +0000
commitee64a20c6539418161b3a70bab10555b70575916 (patch)
treeb11dd8ede8ef2811f4faf9c065df33190051b887 /Master/texmf-dist/tex/generic/expkv-cs
parent3fd04452cf9e67e310bd2dc1b151ff114655c8a0 (diff)
expkv-cs (21sep21)
git-svn-id: svn://tug.org/texlive/trunk@60571 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.tex296
1 files changed, 160 insertions, 136 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 0dfc0198e0a..53b56d997d0 100644
--- a/Master/texmf-dist/tex/generic/expkv-cs/expkv-cs.tex
+++ b/Master/texmf-dist/tex/generic/expkv-cs/expkv-cs.tex
@@ -29,14 +29,15 @@
%% and the derived files expkv-cs.pdf
%% expkv-cs.sty
%% expkv-cs.tex
+%% t-expkv-cs.tex
%%
\input expkv
\expandafter\ifx\csname ekvcVersion\endcsname\relax
\else
\expandafter\endinput
\fi
-\def\ekvcVersion{1.1}
-\def\ekvcDate{2021-07-07}
+\def\ekvcVersion{1.1a}
+\def\ekvcDate{2021-09-20}
\csname ekvc@tmp\endcsname
\expandafter\chardef\csname ekvc@tmp\endcsname=\catcode`\@
\catcode`\@=11
@@ -65,9 +66,9 @@
}
\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}%
+ \ekv@unexpanded\expandafter{\ekv@alignsafe}%
+ \ekv@unexpanded{#1}##1\ekv@unexpanded{#2}%
+ \ekv@unexpanded\expandafter{\ekv@endalignsafe}%
}
\protected\long\def\ekvcSplitAndUse#1#2%
{%
@@ -85,17 +86,17 @@
\ekvc@any@long\edef#1##1%
{%
\expandafter\ekvc@ekvset@pre@expander\expandafter{\ekvc@set}%
- \unexpanded\expandafter
+ \ekv@unexpanded\expandafter
{\csname ekvc@split@\the\ekvc@keycount\endcsname}%
- \unexpanded\expandafter{\ekvc@initials{}#2}%
+ \ekv@unexpanded\expandafter{\ekvc@initials{}#2}%
}%
}%
{%
\ekvc@any@long\edef#1##1%
{%
\expandafter\ekvc@ekvset@pre@expander\expandafter{\ekvc@set}%
- \unexpanded{#2}%
- \unexpanded\expandafter{\ekvc@initials}%
+ \ekv@unexpanded{#2}%
+ \ekv@unexpanded\expandafter{\ekvc@initials}%
}%
}%
}
@@ -132,7 +133,7 @@
{%
\begingroup
\edef\ekvc@tmp
- {\endgroup\def\unexpanded{\ekvc@tmp}{\ekvcSplit@build@argspec@{1}}}%
+ {\endgroup\def\ekv@unexpanded{\ekvc@tmp}{\ekvcSplit@build@argspec@{1}}}%
\ekvc@tmp
}
\def\ekvcSplit@build@argspec@#1%
@@ -142,7 +143,7 @@
\fi
\@firstofone
{%
- \unexpanded\expandafter{\csname ekvc@splitmark@#1\endcsname####}#1%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@#1\endcsname####}#1%
\expandafter\ekvcSplit@build@argspec@\expandafter{\the\numexpr#1+1}%
}%
}
@@ -153,47 +154,50 @@
\let\ekvc@initials\ekv@empty
\ekvparse\ekvc@SetupSplitKeys@check@unknown\ekvc@SetupSplitKeys@a
}
-\protected\def\ekvc@SetupSplitKeys@a#1%
+\protected\long\def\ekvc@SetupSplitKeys@a#1%
+ {\expandafter\ekvc@SetupSplitKeys@b\detokenize{#1}\ekvc@stop}
+\protected\def\ekvc@SetupSplitKeys@b#1\ekvc@stop
{%
\advance\ekvc@keycount1
\let\ekvc@long\ekv@empty
\ekvc@ifspace{#1}%
- {\ekvc@SetupSplitKeys@b#1\ekvc@stop}%
- {\ekvc@SetupSplitKeys@c{#1}}%
+ {\ekvc@SetupSplitKeys@c#1\ekvc@stop}%
+ {\ekvc@SetupSplitKeys@d{#1}}%
}
-\protected\def\ekvc@SetupSplitKeys@b#1 #2\ekvc@stop
+\protected\long\def\ekvc@SetupSplitKeys@c#1 #2\ekvc@stop
{%
\ekv@ifdefined{ekvc@split@p@#1}%
{\csname ekvc@split@p@#1\endcsname{#2}}%
- {\ekvc@SetupSplitKeys@c{#1 #2}}%
+ {\ekvc@SetupSplitKeys@d{#1 #2}}%
}
-\protected\long\def\ekvc@SetupSplitKeys@c#1#2%
+\protected\long\def\ekvc@SetupSplitKeys@d#1#2%
{%
\begingroup
\edef\ekvc@tmp
{%
\endgroup
- \long\def\unexpanded{\ekvc@tmp}####1####2%
- \unexpanded\expandafter
+ \long\def\ekv@unexpanded{\ekvc@tmp}####1####2%
+ \ekv@unexpanded\expandafter
{\csname ekvc@splitmark@\the\ekvc@keycount\endcsname}####3%
{%
####2%
- \unexpanded\expandafter
+ \ekv@unexpanded\expandafter
{\csname ekvc@splitmark@\the\ekvc@keycount\endcsname}{####1}%
}%
\unless\ifx\ekvc@long\long
- \let\unexpanded\expandafter
- {\csname ekvc@\ekvc@set(#1)\endcsname\ekvc@tmp}%
- \def\unexpanded{\ekvc@tmp}####1%
+ \let\ekv@unexpanded\expandafter
+ {\csname ekvc@\ekvc@set(\detokenize{#1})\endcsname\ekvc@tmp}%
+ \def\ekv@unexpanded{\ekvc@tmp}####1%
{%
- \unexpanded\expandafter{\csname ekvc@\ekvc@set(#1)\endcsname}%
+ \ekv@unexpanded\expandafter
+ {\csname ekvc@\ekvc@set(\detokenize{#1})\endcsname}%
{####1}%
}%
\fi
- \def\unexpanded{\ekvc@initials}%
+ \def\ekv@unexpanded{\ekvc@initials}%
{%
- \unexpanded\expandafter{\ekvc@initials}%
- \unexpanded\expandafter
+ \ekv@unexpanded\expandafter{\ekvc@initials}%
+ \ekv@unexpanded\expandafter
{\csname ekvc@splitmark@\the\ekvc@keycount\endcsname{#2}}%
}%
}%
@@ -225,7 +229,7 @@
{##3#1{##4,##2= {##1} }}%
\long\expandafter\def\csname\ekv@name\ekvc@set{}uN\endcsname##1##2#1##3%
{##2#1{##3,##1}}%
- \edef\ekvc@initials{\unexpanded\expandafter{\ekvc@initials#1{}}}%
+ \edef\ekvc@initials{\ekv@unexpanded\expandafter{\ekvc@initials#1{}}}%
\ekvc@helpers@needed
{\expandafter\ekvc@setup@splitmacro\expandafter{\the\ekvc@keycount}}%
{}%
@@ -234,60 +238,60 @@
{%
\let\ekvc@long\long
\let\ekvc@any@long\long
- \ekvc@SetupSplitKeys@c
+ \ekvc@SetupSplitKeys@d
}
-\def\ekvc@split@p@short{\ekvc@SetupSplitKeys@c}
+\def\ekvc@split@p@short{\ekvc@SetupSplitKeys@d}
\protected\def\ekvc@defarggobbler#1{\def\ekvc@tmp##1#1##2##{##1#1}}
\begingroup
\edef\ekvc@tmp
{%
- \long\gdef\unexpanded\expandafter{\csname ekvc@split@1\endcsname}%
- \unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}%
+ \long\gdef\ekv@unexpanded\expandafter{\csname ekvc@split@1\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}%
##1##2##3%
{##3{##1}##2}%
- \long\gdef\unexpanded\expandafter{\csname ekvc@split@2\endcsname}%
- \unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
- \unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
+ \long\gdef\ekv@unexpanded\expandafter{\csname ekvc@split@2\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
##3##4%
{##4{##1}{##2}##3}%
- \long\gdef\unexpanded\expandafter{\csname ekvc@split@3\endcsname}%
- \unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
- \unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
- \unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
+ \long\gdef\ekv@unexpanded\expandafter{\csname ekvc@split@3\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
##4##5%
{##5{##1}{##2}{##3}##4}%
- \long\gdef\unexpanded\expandafter{\csname ekvc@split@4\endcsname}%
- \unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
- \unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
- \unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
- \unexpanded\expandafter{\csname ekvc@splitmark@4\endcsname}##4%
+ \long\gdef\ekv@unexpanded\expandafter{\csname ekvc@split@4\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@4\endcsname}##4%
##5##6%
{##6{##1}{##2}{##3}{##4}##5}%
- \long\gdef\unexpanded\expandafter{\csname ekvc@split@5\endcsname}%
- \unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
- \unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
- \unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
- \unexpanded\expandafter{\csname ekvc@splitmark@4\endcsname}##4%
- \unexpanded\expandafter{\csname ekvc@splitmark@5\endcsname}##5%
+ \long\gdef\ekv@unexpanded\expandafter{\csname ekvc@split@5\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@4\endcsname}##4%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@5\endcsname}##5%
##6##7%
{##7{##1}{##2}{##3}{##4}{##5}##6}%
- \long\gdef\unexpanded\expandafter{\csname ekvc@split@6\endcsname}%
- \unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
- \unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
- \unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
- \unexpanded\expandafter{\csname ekvc@splitmark@4\endcsname}##4%
- \unexpanded\expandafter{\csname ekvc@splitmark@5\endcsname}##5%
- \unexpanded\expandafter{\csname ekvc@splitmark@6\endcsname}##6%
+ \long\gdef\ekv@unexpanded\expandafter{\csname ekvc@split@6\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@4\endcsname}##4%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@5\endcsname}##5%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@6\endcsname}##6%
##7##8%
{##8{##1}{##2}{##3}{##4}{##5}{##6}##7}%
- \long\gdef\unexpanded\expandafter{\csname ekvc@split@7\endcsname}%
- \unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
- \unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
- \unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
- \unexpanded\expandafter{\csname ekvc@splitmark@4\endcsname}##4%
- \unexpanded\expandafter{\csname ekvc@splitmark@5\endcsname}##5%
- \unexpanded\expandafter{\csname ekvc@splitmark@6\endcsname}##6%
- \unexpanded\expandafter{\csname ekvc@splitmark@7\endcsname}##7%
+ \long\gdef\ekv@unexpanded\expandafter{\csname ekvc@split@7\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@1\endcsname}##1%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@2\endcsname}##2%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@3\endcsname}##3%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@4\endcsname}##4%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@5\endcsname}##5%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@6\endcsname}##6%
+ \ekv@unexpanded\expandafter{\csname ekvc@splitmark@7\endcsname}##7%
##8##9%
{##9{##1}{##2}{##3}{##4}{##5}{##6}{##7}##8}%
}
@@ -301,12 +305,13 @@
\edef\ekvc@tmp
{%
\long\gdef
- \unexpanded\expandafter{\csname ekvc@split@#1\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@split@#1\endcsname}%
####1%
- \unexpanded\expandafter{\csname ekvc@splitmark@#1\endcsname}%
+ \ekv@unexpanded\expandafter
+ {\csname ekvc@splitmark@#1\endcsname}%
####2####3%
{%
- \unexpanded\expandafter
+ \ekv@unexpanded\expandafter
{\csname ekvc@split@\the\numexpr#1-1\relax\endcsname}%
####1{{####2}####3}%
}%
@@ -331,16 +336,16 @@
\ekvc@any@long\edef#1##1%
{%
\expandafter\ekvc@ekvset@pre@expander\expandafter{\ekvc@set}%
- \unexpanded{\ekvc@hash@pack@argument}%
- \unexpanded\expandafter{\ekvc@initials\ekvc@stop#2}%
+ \ekv@unexpanded{\ekvc@hash@pack@argument}%
+ \ekv@unexpanded\expandafter{\ekvc@initials\ekvc@stop#2}%
}%
}%
{%
\ekvc@any@long\edef#1##1%
{%
\expandafter\ekvc@ekvset@pre@expander\expandafter{\ekvc@set}%
- \unexpanded{#2}%
- \unexpanded\expandafter{\ekvc@initials\ekvc@stop}%
+ \ekv@unexpanded{#2}%
+ \ekv@unexpanded\expandafter{\ekvc@initials\ekvc@stop}%
}%
}%
}
@@ -371,44 +376,48 @@
\let\ekvc@initials\ekv@empty
\ekvparse\ekvc@SetupHashKeys@check@unknown\ekvc@SetupHashKeys@a{#1}%
}
-\protected\def\ekvc@SetupHashKeys@a#1%
+\protected\long\def\ekvc@SetupHashKeys@a#1%
+ {\expandafter\ekvc@SetupHashKeys@b\detokenize{#1}\ekvc@stop}
+\protected\def\ekvc@SetupHashKeys@b#1\ekvc@stop
{%
\let\ekvc@long\ekv@empty
\ekvc@ifspace{#1}%
- {\ekvc@SetupHashKeys@b#1\ekvc@stop}%
- {\ekvc@SetupHashKeys@c{#1}}%
+ {\ekvc@SetupHashKeys@c#1\ekvc@stop}%
+ {\ekvc@SetupHashKeys@d{#1}}%
}
-\protected\def\ekvc@SetupHashKeys@b#1 #2\ekvc@stop
+\protected\def\ekvc@SetupHashKeys@c#1 #2\ekvc@stop
{%
\ekv@ifdefined{ekvc@hash@p@#1}%
{\csname ekvc@hash@p@#1\endcsname{#2}}%
- {\ekvc@SetupHashKeys@c{#1 #2}}%
+ {\ekvc@SetupHashKeys@d{#1 #2}}%
}
-\protected\long\def\ekvc@SetupHashKeys@c#1#2%
+\protected\long\def\ekvc@SetupHashKeys@d#1#2%
{%
\begingroup
\edef\ekvc@tmp
{%
\endgroup
- \long\def\unexpanded{\ekvc@tmp}####1####2%
- \unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname}####3%
+ \long\def\ekv@unexpanded{\ekvc@tmp}####1####2%
+ \ekv@unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname}%
+ ####3%
{%
####2%
- \unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname}{####1}%
+ \ekv@unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname}%
+ {####1}%
}%
\unless\ifx\ekvc@long\long
- \let\unexpanded\expandafter
+ \let\ekv@unexpanded\expandafter
{\csname ekvc@\ekvc@set(#1)\endcsname\ekvc@tmp}%
- \def\unexpanded{\ekvc@tmp}####1%
+ \def\ekv@unexpanded{\ekvc@tmp}####1%
{%
- \unexpanded\expandafter{\csname ekvc@\ekvc@set(#1)\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@\ekvc@set(#1)\endcsname}%
{####1}%
}%
\fi
- \def\unexpanded{\ekvc@initials}%
+ \def\ekv@unexpanded{\ekvc@initials}%
{%
- \unexpanded\expandafter{\ekvc@initials}%
- \unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname{#2}}%
+ \ekv@unexpanded\expandafter{\ekvc@initials}%
+ \ekv@unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname{#2}}%
}%
}%
\ekvc@tmp
@@ -436,7 +445,7 @@
\let\csname\ekv@name\ekvc@set{}u\endcsname\ekvc@hash@unknown@kv
\expandafter
\let\csname\ekv@name\ekvc@set{}uN\endcsname\ekvc@hash@unknown@k
- \edef\ekvc@initials{\unexpanded\expandafter{\ekvc@initials#1{}}}%
+ \edef\ekvc@initials{\ekv@unexpanded\expandafter{\ekvc@initials#1{}}}%
\ekvc@setup@hashmacro{...}%
}%
\long\def\ekvc@hash@unknown@kv##1##2##3#1##4{##3#1{##4,##2= {##1} }}%
@@ -448,9 +457,9 @@
{%
\let\ekvc@long\long
\let\ekvc@any@long\long
- \ekvc@SetupHashKeys@c
+ \ekvc@SetupHashKeys@d
}
-\def\ekvc@hash@p@short{\ekvc@SetupHashKeys@c}
+\def\ekvc@hash@p@short{\ekvc@SetupHashKeys@d}
\protected\def\ekvc@setup@hashmacro#1%
{%
\ekv@ifdefined{ekvc@fasthash@#1}{}%
@@ -459,47 +468,52 @@
\edef\ekvc@tmp
{%
\long\gdef
- \unexpanded\expandafter{\csname ekvc@fasthash@#1\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@fasthash@#1\endcsname}%
####1%
- \unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname}%
- ####2####3\unexpanded{\ekvc@stop}%
+ \ekv@unexpanded\expandafter
+ {\csname ekvc@hashmark@#1\endcsname}%
+ ####2####3\ekv@unexpanded{\ekvc@stop}%
{####2}%
\long\gdef
- \unexpanded\expandafter{\csname ekvc@safehash@#1\endcsname}%
+ \ekv@unexpanded\expandafter{\csname ekvc@safehash@#1\endcsname}%
####1%
{%
- \unexpanded\expandafter{\csname ekvc@@safehash@#1\endcsname}%
- ####1\unexpanded{\ekvc@mark}{}%
- \unexpanded\expandafter
+ \ekv@unexpanded\expandafter
+ {\csname ekvc@@safehash@#1\endcsname}%
+ ####1\ekv@unexpanded{\ekvc@mark}{}%
+ \ekv@unexpanded\expandafter
{%
\csname ekvc@hashmark@#1\endcsname{}%
\ekvc@mark{\ekvc@err@missing@hash{#1}}\ekvc@stop
}%
}%
\long\gdef
- \unexpanded\expandafter{\csname ekvc@@safehash@#1\endcsname}%
+ \ekv@unexpanded\expandafter
+ {\csname ekvc@@safehash@#1\endcsname}%
####1%
- \unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname}%
- ####2####3\unexpanded{\ekvc@mark}####4####5%
- \unexpanded{\ekvc@stop}%
+ \ekv@unexpanded\expandafter
+ {\csname ekvc@hashmark@#1\endcsname}%
+ ####2####3\ekv@unexpanded{\ekvc@mark}####4####5%
+ \ekv@unexpanded{\ekvc@stop}%
{%
####4{####2}%
}%
- \long\gdef\unexpanded\expandafter
+ \long\gdef\ekv@unexpanded\expandafter
{\csname ekvc@fastsplithash@#1\endcsname}%
####1%
- \unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname}%
- ####2####3\unexpanded{\ekvc@stop}####4%
+ \ekv@unexpanded\expandafter
+ {\csname ekvc@hashmark@#1\endcsname}%
+ ####2####3\ekv@unexpanded{\ekvc@stop}####4%
{%
####4{####2}%
}%
- \long\gdef\unexpanded\expandafter
+ \long\gdef\ekv@unexpanded\expandafter
{\csname ekvc@safesplithash@#1\endcsname}####1%
{%
- \unexpanded\expandafter
+ \ekv@unexpanded\expandafter
{\csname ekvc@@safesplithash@#1\endcsname}%
- ####1\unexpanded{\ekvc@mark\ekvc@safe@after@hash}%
- \unexpanded\expandafter
+ ####1\ekv@unexpanded{\ekvc@mark\ekvc@safe@after@hash}%
+ \ekv@unexpanded\expandafter
{%
\csname ekvc@hashmark@#1\endcsname{}%
\ekvc@mark
@@ -507,12 +521,13 @@
\ekvc@stop
}%
}%
- \long\gdef\unexpanded\expandafter
+ \long\gdef\ekv@unexpanded\expandafter
{\csname ekvc@@safesplithash@#1\endcsname}%
####1%
- \unexpanded\expandafter{\csname ekvc@hashmark@#1\endcsname}%
- ####2####3\unexpanded{\ekvc@mark}####4####5%
- \unexpanded{\ekvc@stop}%
+ \ekv@unexpanded\expandafter
+ {\csname ekvc@hashmark@#1\endcsname}%
+ ####2####3\ekv@unexpanded{\ekvc@mark}####4####5%
+ \ekv@unexpanded{\ekvc@stop}%
{%
####4{####2}%
}%
@@ -523,13 +538,20 @@
}
\long\def\ekvcValue#1%
{%
- \unexpanded
+ \ekv@unexpanded
+ \expandafter\ekvcValue@\detokenize{#1}\ekvc@stop
+ }
+\def\ekvcValue@#1\ekvc@stop
+ {%
\ekv@ifdefined{ekvc@safehash@#1}%
{\csname ekvc@safehash@#1\endcsname}%
{\ekvc@err@unknown@hash{#1}\@firstoftwo{{}}}%
}
-\long\def\ekvcValueFast#1#2{\csname ekvc@fasthash@#1\endcsname#2\ekvc@stop}
+\long\def\ekvcValueFast#1#2%
+ {\csname ekvc@fasthash@\detokenize{#1}\endcsname#2\ekvc@stop}
\long\def\ekvcValueSplit#1%
+ {\expandafter\ekvcValueSplit@\detokenize{#1}\ekvc@stop}
+\def\ekvcValueSplit@#1\ekvc@stop
{%
\ekv@ifdefined{ekvc@safesplithash@#1}%
{\csname ekvc@safesplithash@#1\endcsname}%
@@ -541,7 +563,7 @@
#2{#1}%
}
\long\def\ekvcValueSplitFast#1#2%
- {\csname ekvc@fastsplithash@#1\endcsname#2\ekvc@stop}
+ {\csname ekvc@fastsplithash@\detokenize{#1}\endcsname#2\ekvc@stop}
\long\def\ekvc@safehash@#1{\ekvc@err@empty@hash{}}
\long\def\ekvc@fasthash@#1\ekvc@stop{\ekvc@err@empty@hash}
\long\def\ekvc@safesplithash@#1#2{\ekvc@err@empty@hash#2{}}
@@ -551,14 +573,16 @@
\edef\ekvc@set{\string#1}%
\ekvparse\ekvc@err@value@required\ekvcSecondaryKeys@a{#2}%
}
-\protected\def\ekvcSecondaryKeys@a#1%
+\protected\long\def\ekvcSecondaryKeys@a#1%
+ {\expandafter\ekvcSecondaryKeys@b\detokenize{#1}\ekvc@stop}
+\protected\def\ekvcSecondaryKeys@b#1\ekvc@stop
{%
\let\ekvc@long\ekv@empty
\ekvc@ifspace{#1}%
- {\ekvcSecondaryKeys@b#1\ekvc@stop}%
+ {\ekvcSecondaryKeys@c#1\ekvc@stop}%
{\ekvc@err@missing@type{#1}\@gobble}%
}
-\protected\def\ekvcSecondaryKeys@b#1 #2\ekvc@stop
+\protected\def\ekvcSecondaryKeys@c#1 #2\ekvc@stop
{%
\ekv@ifdefined{ekvc@p@#1}%
{\csname ekvc@p@#1\endcsname}%
@@ -683,7 +707,7 @@
\ekvc@assert@not@long{default #1}%
\edef\ekvc@tmp
{%
- \unexpanded\expandafter
+ \ekv@unexpanded\expandafter
{\csname\ekv@name\ekvc@set{#1}\endcsname{#2}}%
}%
\ekvletNoVal\ekvc@set{#1}\ekvc@tmp
@@ -832,8 +856,8 @@
{%
\edef#1%
{%
- \unexpanded{\ekvc@flag@height}%
- \unexpanded\expandafter{\csname\ekvc@flag@name#1\endcsname}%
+ \ekv@unexpanded{\ekvc@flag@height}%
+ \ekv@unexpanded\expandafter{\csname\ekvc@flag@name#1\endcsname}%
}%
\ekv@expargtwice
{\expandafter\def\csname\ekvc@flag@name#1\endcsname##1}%
@@ -948,7 +972,7 @@
\long\def\ekvc@ifempty@gtwo#1#2{\ekv@ifempty@\ekv@ifempty@A}
\def\ekvc@extract@mark#1{\expandafter\ekvc@extract@mark@\meaning#1\ekv@stop}
\begingroup
-\lccode`;=`\#
+\lccode`;=`#
\lccode`/=`\\
\lowercase{\endgroup
\def\ekvc@extract@mark@#1:#2/#3 ;#4\ekv@stop{#3}%
@@ -960,41 +984,41 @@
{%
\errmessage{expkv-cs Error: Too many keys for macro `\string#1'}%
}
-\protected\def\ekvc@err@value@required#1%
+\protected\long\def\ekvc@err@value@required#1%
{%
- \errmessage{expkv-cs Error: Missing value for key `\unexpanded{#1}'}%
+ \errmessage{expkv-cs Error: Missing value for key `\ekv@unexpanded{#1}'}%
}
-\protected\def\ekvc@err@missing@type#1%
+\protected\long\def\ekvc@err@missing@type#1%
{%
\errmessage
- {expkv-cs Error: Missing type for secondary key `\unexpanded{#1}'}%
+ {expkv-cs Error: Missing type for secondary key `\ekv@unexpanded{#1}'}%
}
-\protected\def\ekvc@err@no@long#1%
+\protected\long\def\ekvc@err@no@long#1%
{%
\errmessage
- {expkv-cs Error: prefix `long' not accepted for `\unexpanded{#1}'}%
+ {expkv-cs Error: prefix `long' not accepted for `\ekv@unexpanded{#1}'}%
}
-\protected\def\ekvc@err@already@defined#1%
+\protected\long\def\ekvc@err@already@defined#1%
{%
\errmessage{expkv-cs Error: Macro `\string#1' already defined}%
}
-\protected\def\ekvc@err@unknown@keytype#1%
+\protected\long\def\ekvc@err@unknown@keytype#1%
{%
- \errmessage{expkv-cs Error: Unknown key type `\unexpanded{#1}'}%
+ \errmessage{expkv-cs Error: Unknown key type `\ekv@unexpanded{#1}'}%
}
-\protected\def\ekvc@err@unknown@key#1%
+\protected\long\def\ekvc@err@unknown@key#1%
{%
\errmessage
- {expkv-cs Error: Unknown key `\unexpanded{#1}' for macro `\ekvc@set'}%
+ {expkv-cs Error: Unknown key `\ekv@unexpanded{#1}' for macro `\ekvc@set'}%
}
-\long\def\ekvc@err@no@key@macro#1%
+\protected\long\def\ekvc@err@no@key@macro#1%
{\errmessage{expkv-cs Error: \string#1 is no key=val macro}}
\protected\long\def\ekvc@err@not@two#1%
{%
\errmessage
{%
- expkv-cs Error: Definition of `\unexpanded{#1}' doesn't contain exactly
- two arguments%
+ expkv-cs Error: Definition of `\ekv@unexpanded{#1}' doesn't contain
+ exactly two arguments%
}%
}
\ekv@exparg{\long\def\ekvc@err#1}{\ekverr{expkv-cs}{#1}}