texlive[42910] Master/texmf-dist: conv-xkv (9jan17)

commits+karl at tug.org commits+karl at tug.org
Mon Jan 9 23:07:42 CET 2017


Revision: 42910
          http://tug.org/svn/texlive?view=revision&revision=42910
Author:   karl
Date:     2017-01-09 23:07:41 +0100 (Mon, 09 Jan 2017)
Log Message:
-----------
conv-xkv (9jan17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/conv-xkv/README.md
    trunk/Master/texmf-dist/doc/latex/conv-xkv/doc/conv-xkv.pdf
    trunk/Master/texmf-dist/doc/latex/conv-xkv/examples/convert2xkeyval.tex
    trunk/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.dtx
    trunk/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.ins
    trunk/Master/texmf-dist/tex/latex/conv-xkv/conv-xkv.sty

Modified: trunk/Master/texmf-dist/doc/latex/conv-xkv/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/conv-xkv/README.md	2017-01-09 22:07:25 UTC (rev 42909)
+++ trunk/Master/texmf-dist/doc/latex/conv-xkv/README.md	2017-01-09 22:07:41 UTC (rev 42910)
@@ -1,6 +1,6 @@
 The conv-xkv Package
 Author: D. P. Story
-Dated: 2016/12/20
+Dated: 2017/01/09
 
 This small package supports key-value syntax other than the standard latex 
 syntax of <key>=<value>. Using this package, create key-values of the form 
@@ -7,6 +7,13 @@
 <key>:<value> or <key>-><value>, for example. The package converts the new 
 notation to xkeyval notation and passes it on to xkeyval. 
 
+What's new: (2017/01/03) The delimiters for the optional first argument
+of \cxkvsetkeys is changed from the standard `[]' to `()'. Also, if no key-value
+of the special type (such as <key>:<value> or <key>-><value>) is detected, the 
+whole argument is passed to \setkeys. This means that either the new key-value
+pairing or the standard pairing may be used; \cxkvsetkeys{lname:Story} or
+\cxkvsetkey{lname=Story} both work.
+
 Please test and give feedback.
 
 Enjoy.

Modified: trunk/Master/texmf-dist/doc/latex/conv-xkv/doc/conv-xkv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/conv-xkv/examples/convert2xkeyval.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/conv-xkv/examples/convert2xkeyval.tex	2017-01-09 22:07:25 UTC (rev 42909)
+++ trunk/Master/texmf-dist/doc/latex/conv-xkv/examples/convert2xkeyval.tex	2017-01-09 22:07:41 UTC (rev 42910)
@@ -20,7 +20,7 @@
 \makeatother
 
 % Process keys using the arrow delimiter
-\def\setName#1{\cxkvsetkeys[arrow]{dps,kaf}{#1}}
+\def\setName#1{\cxkvsetkeys(arrow){dps,kaf}{#1}}
 % we use the default delimiter, colon (:)
 \def\setOtherName#1{\cxkvsetkeys{dps}{#1}}
 % we define the dps family for xkeyval
@@ -48,7 +48,7 @@
     home-> {Niceville, FL}
 }
 \begin{Verbatim}[xleftmargin=\leftmargini,fontsize=\small]
-\def\setName#1{\cxkvsetkeys[arrow]{dps,kaf}{#1}}
+\def\setName#1{\cxkvsetkeys(arrow){dps,kaf}{#1}}
 \setName {
     fname-> D.,
     mname-> P.,

Modified: trunk/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.dtx	2017-01-09 22:07:25 UTC (rev 42909)
+++ trunk/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.dtx	2017-01-09 22:07:41 UTC (rev 42910)
@@ -1,20 +1,20 @@
 % \iffalse
 %<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% conv-xkv package                                      %%
+%% Copyright (C) 2016--2017  D. P. Story                 %%
+%%   dpstory at uakron.edu                                  %%
+%%                                                       %%
+%% This program can redistributed and/or modified under  %%
+%% the terms of the LaTeX Project Public License         %%
+%% Distributed from CTAN archives in directory           %%
+%% macros/latex/base/lppl.txt; either version 1.2 of the %%
+%% License, or (at your option) any later version.       %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% conv-xkv package                                     %%
-%% Copyright (C) 2016  D. P. Story                      %%
-%%   dpstory at uakron.edu                                 %%
-%%                                                      %%
-%% This program can redistributed and/or modified under %%
-%% the terms of the LaTeX Project Public License        %%
-%% Distributed from CTAN archives in directory          %%
-%% macros/latex/base/lppl.txt; either version 1 of the  %%
-%% License, or (at your option) any later version.      %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %</copyright>
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{conv-xkv}
-%<package> [2016/12/20 v1.0 convert xkeyval format (dps)]
+%<package> [2017/01/09 v1.1b convert xkeyval format (dps)]
 %<*driver>
 \documentclass{ltxdoc}
 \usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -51,6 +51,7 @@
 % \fi
 %
 % \MakeShortVerb{|}
+% \DoNotIndex{\w,\x,\y,\z}
 % \InputIfFileExists{aebdonotindex.def}{\PackageInfo{web}{Inputting aebdonotindex.def}}
 %    {\PackageInfo{web}{cannot find aebdonotindex.def}}
 %
@@ -75,11 +76,33 @@
 %\end{quote}
 %Use the newly declared delimited as follows:
 %\begin{quote}
-%\cs{cxkvsetkeys[\ameta{name}]}\darg{\ameta{family}}\darg{\ameta{KV-pairs}}
+%\cs{cxkvsetkeys(\ameta{name})}\darg{\ameta{family}}\darg{\ameta{KV-pairs}}
 %\end{quote}
 %The case of using a colon (:) for the delimiter is already defined, its name is `\texttt{colon}' and need not be declared.
 %
-%    The example file is \texttt{convert2xkeyval.tex}, use it to explore the possibilities and is found
+%\paragraph*{Important change in syntax} With version dated 2017/01/03 or later, the optional argument \ameta{name} is now delimited
+%by \textbf{parentheses}, rather than the standard brackets. This is to be able to detect \ameta{name} when the full syntax
+%of \cs{setkeys} is used:
+%\changes{v1.1a}{2017/01/03}{Change in syntax, use parentheses rather than brackets}
+%\begin{quote}
+%   \cs{setkeys*[\ameta{prefix}]\darg{\ameta{families}}[\ameta{na}]\darg{\ameta{keys}}}
+%\end{quote}
+%The syntax for \cs{cxkvsetkeys} shall be
+%\begin{quote}
+%   \cs{cxkvsetkeys(\ameta{name})*[\ameta{prefix}]\darg{\ameta{families}}[\ameta{na}]\darg{\ameta{keys}}}
+%\end{quote}
+% The \pkg{conv-xkv} package does nothing with \pkg{xkeyval} arguments \texttt{*[\ameta{prefix}]} and
+% \texttt{[\ameta{na}]} other than to collect them and pass them on to \cs{setkeys} at the appropriate time.
+% The \pkg{conv-xkv} is concerned only with converting a new notation \texttt{\ameta{key}\ameta{delim}\ameta{value}}
+% to \texttt{\ameta{key}=\ameta{value}}.
+%
+% If the key-values do not contain the designated delimiter, \pkg{conv-xkv} simply passes everything on to \cs{setkeys}.
+% What this means is that, for example, both \cs{cxkvsetkeys\darg{myfam}\darg{fname:Don,lname:Story}} works as does
+% \cs{cxkvsetkeys\darg{myfam}\darg{fname=Don,lname=Story}}. One then has the option of using the standard notation
+% or an alternate notation.
+%
+%
+% \paragraph*{Demo file} The example file is \texttt{convert2xkeyval.tex}, use it to explore the possibilities and is found
 %    in the \texttt{examples} folder of this distribution.
 %
 %    \section{Preliminaries}
@@ -180,13 +203,12 @@
 \def\DeclareDelimiter{\ckv at SetCatcodes\DeclareDelimiter at i}
 \def\DeclareDelimiter at i#1#2{\@ifundefined{kvdelim-#1}
     {\csarg\def{kvdelim-#1}{#2}\ckv at RestoreCatcodes\cxkvSetup{#1}}
-    {\ckv at RestoreCatcodes}%
-}
+    {\ckv at RestoreCatcodes}}
 \@onlypreamble\DeclareDelimiter
 %    \end{macrocode}
 %    \end{macro}
 %    \cs{cxkv at tmptoks} is used to hold the converted key-values, the contents of
-%    this token register is passed to \cs{setkeys} in \cs{cxkv at convertColoniiEquali}
+%    this token register is passed to \cs{setkeys} in \cs{cxkv at cnvrtDelimniiEquali}
 %    \begin{macrocode}
 \newtoks\cxkv at tmptoks \cxkv at tmptoks={}
 \def\cxkv at dummy{dummy}
@@ -216,23 +238,53 @@
 %\end{verbatim}
 %    \begin{macrocode}
 \def\cxkv at colon{colon}
-\newcommand\cxkvsetkeys[1][colon]{%
-    \def\@rgi{#1}\ifx\@rgi\cxkv at colon\else
-        \InputIfFileExists{xkv-#1.cut}
-        {\PackageInfo{conv-xkv}{Inputting xkv-#1.cut}}
-        {\PackageInfo{conv-xkv}{Cannot find xkv-#1.cut}}\fi
-    \@nameuse{cxkvsetkeys-#1}}
 %    \end{macrocode}
+%    The general form for \cs{setkeys} is
+%\begin{quote}
+%   \cs{setkeys*[\ameta{prefix}]\darg{\ameta{families}}[\ameta{na}]\darg{\ameta{keys}}}
+%\end{quote}
+%    \begin{macro}{\cxkvsetkeys}
+%The syntax for \cs{cxkvsetkeys} shall be
+%\begin{quote}
+%   \cs{cxkvsetkeys(\ameta{name})*[\ameta{prefix}]\darg{\ameta{families}}[\ameta{na}]\darg{\ameta{keys}}}
+%\end{quote}
+%The process to pick up the full parameter set of \cs{setkeys} is lengthy.
 %    \begin{macrocode}
+\newcommand\cxkvsetkeys{%
+    \@ifnextchar({\cxkvsetkeys at i}{\cxkvsetkeys at i(colon)}}
+\def\cxkvsetkeys at i(#1){\cxkvsetkeys at ii{#1}}
+\def\cxkvsetkeys at ii#1{\def\cxkv at delimname{#1}\@ifstar
+    {\def\cxkv at skOpts{*}\cxkvsetkeys at iii}
+    {\def\cxkv at skOpts{}\cxkvsetkeys at iii}}
+\newcommand\cxkvsetkeys at iii[2][]{\def\@rgi{#1}\ifx\@rgi\@empty
+    \expandafter\def\expandafter\cxkv at skOpts
+        \expandafter{\cxkv at skOpts{#2}}\else
+    \expandafter\def\expandafter
+        \cxkv at skOpts\expandafter{\cxkv at skOpts[#1]{#2}}\fi
+    \def\thisxkvF at mily{#2}\cxkvsetkeys at iv}
+\newcommand\cxkvsetkeys at iv[2][]{\def\@rgi{#1}\ifx\@rgi\@empty\else
+    \expandafter\def\expandafter\cxkv at skOpts
+        \expandafter{\cxkv at skOpts[#1]}\fi
+    \expandafter\cxkvsetkeys at v\expandafter{\thisxkvF at mily}{#2}}
+\def\cxkvsetkeys at v#1#2{\cxkv at skipfalse
+    \ifx\cxkv at delimname\cxkv at colon\else
+        \InputIfFileExists{xkv-\cxkv at delimname.cut}
+        {\PackageInfo{conv-xkv}{Inputting xkv-\cxkv at delimname.cut}}
+        {\PackageInfo{conv-xkv}{Cannot find xkv-\cxkv at delimname.cut}}\fi
+    \@nameuse{cxkvsetkeys-\cxkv at delimname}{#1}{#2}}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macrocode}
 \csarg\def{cxkvsetkeys-colon}#1#2{%
-    \def\thisxkvF at mily{#1}\def\cxkv at scratch{}\cxkv at tmptoks={}%
-    \@nameuse{cxkv at convertColoniiEqual-colon}#2,dummy:dummy,\@nil}
-\csarg\def{cxkv at convertColoniiEqual-colon}#1:#2,#3\@nil{%
-    \cxkv at convertColoniiEquali{colon}{#1}{#2}{#3}}
+    \def\thisxkvF at mily{#1}\def\thisxkvV at lues{#2}\def\cxkv at scratch{}%
+    \cxkv at tmptoks={}%
+    \@nameuse{cxkv at cnvrtDelimniiEqual-colon}#2,dummy:dummy,\@nil}
+\csarg\def{cxkv at cnvrtDelimniiEqual-colon}#1:#2,#3\@nil{%
+    \cxkv at cnvrtDelimniiEquali{colon}{#1}{#2}{#3}}
 %    \end{macrocode}
 %    \end{macro}
 %    \begin{macro}{\cxkvSetup}
-%    Write the definitions of \cs{cxkvsetkeys} and \cs{cxkv at convertColoniiEqual} to
+%    Write the definitions of \cs{cxkvsetkeys} and \cs{cxkv at cnvrtDelimniiEqual} to
 %    the file \texttt{conv-xkv.cut} then input this file back in.
 %    \begin{macrocode}
 \def\cxkvSetup#1{\bgroup
@@ -243,7 +295,7 @@
     \newwrite \cxkv at write
     \uccode`c=`\%
     \def\w{#1}\def\x{cxkvsetkeys-#1}%
-    \def\y{cxkv at convertColoniiEqual-#1}%
+    \def\y{cxkv at cnvrtDelimniiEqual-#1}%
     \def\z{kvdelim-#1}%
     \immediate\openout \cxkv at write xkv-#1.cut
     \immediate\write\cxkv at write{\string\makeatletter}%
@@ -250,11 +302,12 @@
     \uppercase{\immediate\write\cxkv at write{\string
         \csarg\string\def{\y}\cxkvarg1\@nameuse{\z}%
         \cxkvarg2,\cxkvarg3\string\@nil{c^^J\cxkv at TAB
-        \string\cxkv at convertColoniiEquali{\w}{\cxkvarg1}%
+        \string\cxkv at cnvrtDelimniiEquali{\w}{\cxkvarg1}%
         {\cxkvarg2}{\cxkvarg3}}}}
     \uppercase{\immediate\write\cxkv at write{\string\csarg\string\def
         {\x}\cxkvarg1\cxkvarg2{c^^J\cxkv at TAB
         \string\def\string\thisxkvF at mily{\cxkvarg1}\string
+        \def\string\thisxkvV at lues{\cxkvarg2}\string
         \let\string\cxkv at scratch\string\@empty\string
         \cxkv at tmptoks={}c^^J\cxkv at TAB
         \string\@nameuse{\y}\cxkvarg2,%
@@ -265,7 +318,7 @@
 \egroup}
 %    \end{macrocode}
 %    \end{macro}
-%    \cs{cxkv at convertColoniiEquali} continues \cs{cxkv at convertColoniiEqual}. It is
+%    \cs{cxkv at cnvrtDelimniiEquali} continues \cs{cxkv at cnvrtDelimniiEqual}. It is
 %    the part that does not need to be redefined.
 %    \begin{macrocode}
 \newif\ifcxkv at keyonly \cxkv at keyonlyfalse
@@ -274,7 +327,23 @@
 \def\cxkv at parsecomma#1,#2\@nil{\def\@rgi{#1}\def\@rgii{#2}%
     \ifx\@rgii\@empty\cxkv at keyonlyfalse\else
         \cxkv at keyonlytrue\cxkv at removecomma#2\@nil\fi}
-\def\cxkv at convertColoniiEquali#1#2#3#4{\def\cxkv at rgiii{#3}%
+\newif\ifcxkv at skip \cxkv at skipfalse
+\def\cxkv at cnvrtDelimniiEquali#1#2#3#4{%
+    \def\cxkv at rgiii{#3}\def\cxkv at rgiv{#4}%
+%    \end{macrocode}
+%    If the fourth argument is empty, that means there were no delimiters in the argument,
+%    so we pass the original argument \cs{thisxkvF at mily} to \cs{setkeys}.
+%    \changes{v1.1}{2017/01/03}{Try to detect if the expected delimiter is present at all}
+%    \begin{macrocode}
+    \ifx\thisxkvV at lues\@empty\else
+        \ifx\cxkv at rgiv\@empty
+            \edef\cxkv at next{\noexpand
+                \setkeys\cxkv at skOpts{\thisxkvV at lues}}%
+            \cxkv at skiptrue
+        \fi
+    \fi
+    \let\thisxkvV at lues\@empty
+    \ifcxkv at skip\else
     \ifx\cxkv at rgiii\cxkv at dummy
         \cxkv at parsecomma#2,\@nil
         \ifcxkv at keyonly
@@ -282,10 +351,10 @@
             \cxkv at tmptoks=\expandafter{\cxkv at tmp}%
             \edef\cxkv at scratch{\the\cxkv at tmptoks}%
             \edef\cxkv at next{\noexpand
-                \setkeys{\thisxkvF at mily}{\the\cxkv at tmptoks}}%
+                \setkeys\cxkv at skOpts{\the\cxkv at tmptoks}}%
         \else
             \edef\cxkv at next{\noexpand
-                \setkeys{\thisxkvF at mily}{\the\cxkv at tmptoks}}%
+                \setkeys\cxkv at skOpts{\the\cxkv at tmptoks}}%
         \fi
     \else
         \cxkv at parsecomma#2,\@nil
@@ -294,14 +363,14 @@
             \cxkv at tmptoks=\expandafter{\cxkv at tmp}%
             \edef\cxkv at scratch{\the\cxkv at tmptoks}%
             \edef\cxkv at next{\noexpand
-                \@nameuse{cxkv at convertColoniiEqual-#1}\cxkv at key
+                \@nameuse{cxkv at cnvrtDelimniiEqual-#1}\cxkv at key
                 \@nameuse{kvdelim-#1}#3,#4\noexpand\@nil}
         \else
             \cxkv at tmptoks=\expandafter{\cxkv at scratch,#2=#3}%
             \edef\cxkv at scratch{\the\cxkv at tmptoks}%
             \def\cxkv at next{%
-                \@nameuse{cxkv at convertColoniiEqual-#1}#4\@nil}\fi
-    \fi\cxkv at next
+                \@nameuse{cxkv at cnvrtDelimniiEqual-#1}#4\@nil}\fi
+    \fi\fi\cxkv at next
 }
 \ckv at RestoreCatcodes
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.ins	2017-01-09 22:07:25 UTC (rev 42909)
+++ trunk/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.ins	2017-01-09 22:07:41 UTC (rev 42910)
@@ -17,7 +17,7 @@
 %%
 %% --------------- start of docstrip commands ------------------
 %%
-\def\filedate{2010/08/02}
+\def\filedate{2016/12/21}
 \def\batchfile{conv-xkv.ins}
 %
 % If you can assume that the target audience for the document all have

Modified: trunk/Master/texmf-dist/tex/latex/conv-xkv/conv-xkv.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/conv-xkv/conv-xkv.sty	2017-01-09 22:07:25 UTC (rev 42909)
+++ trunk/Master/texmf-dist/tex/latex/conv-xkv/conv-xkv.sty	2017-01-09 22:07:41 UTC (rev 42910)
@@ -6,20 +6,20 @@
 %%
 %% conv-xkv.dtx  (with options: `copyright,package')
 %% 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% conv-xkv package                                      %%
+%% Copyright (C) 2016--2017  D. P. Story                 %%
+%%   dpstory at uakron.edu                                  %%
+%%                                                       %%
+%% This program can redistributed and/or modified under  %%
+%% the terms of the LaTeX Project Public License         %%
+%% Distributed from CTAN archives in directory           %%
+%% macros/latex/base/lppl.txt; either version 1.2 of the %%
+%% License, or (at your option) any later version.       %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% conv-xkv package                                     %%
-%% Copyright (C) 2016  D. P. Story                      %%
-%%   dpstory at uakron.edu                                 %%
-%%                                                      %%
-%% This program can redistributed and/or modified under %%
-%% the terms of the LaTeX Project Public License        %%
-%% Distributed from CTAN archives in directory          %%
-%% macros/latex/base/lppl.txt; either version 1 of the  %%
-%% License, or (at your option) any later version.      %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{conv-xkv}
- [2016/12/20 v1.0 convert xkeyval format (dps)]
+ [2017/01/09 v1.1b convert xkeyval format (dps)]
 \RequirePackage{xkeyval}
 \begingroup
   \@makeother\`%
@@ -96,8 +96,7 @@
 \def\DeclareDelimiter{\ckv at SetCatcodes\DeclareDelimiter at i}
 \def\DeclareDelimiter at i#1#2{\@ifundefined{kvdelim-#1}
     {\csarg\def{kvdelim-#1}{#2}\ckv at RestoreCatcodes\cxkvSetup{#1}}
-    {\ckv at RestoreCatcodes}%
-}
+    {\ckv at RestoreCatcodes}}
 \@onlypreamble\DeclareDelimiter
 \newtoks\cxkv at tmptoks \cxkv at tmptoks={}
 \def\cxkv at dummy{dummy}
@@ -107,17 +106,34 @@
     \obeyspaces\gdef\cxkv at TAB{    }
 \egroup
 \def\cxkv at colon{colon}
-\newcommand\cxkvsetkeys[1][colon]{%
-    \def\@rgi{#1}\ifx\@rgi\cxkv at colon\else
-        \InputIfFileExists{xkv-#1.cut}
-        {\PackageInfo{conv-xkv}{Inputting xkv-#1.cut}}
-        {\PackageInfo{conv-xkv}{Cannot find xkv-#1.cut}}\fi
-    \@nameuse{cxkvsetkeys-#1}}
+\newcommand\cxkvsetkeys{%
+    \@ifnextchar({\cxkvsetkeys at i}{\cxkvsetkeys at i(colon)}}
+\def\cxkvsetkeys at i(#1){\cxkvsetkeys at ii{#1}}
+\def\cxkvsetkeys at ii#1{\def\cxkv at delimname{#1}\@ifstar
+    {\def\cxkv at skOpts{*}\cxkvsetkeys at iii}
+    {\def\cxkv at skOpts{}\cxkvsetkeys at iii}}
+\newcommand\cxkvsetkeys at iii[2][]{\def\@rgi{#1}\ifx\@rgi\@empty
+    \expandafter\def\expandafter\cxkv at skOpts
+        \expandafter{\cxkv at skOpts{#2}}\else
+    \expandafter\def\expandafter
+        \cxkv at skOpts\expandafter{\cxkv at skOpts[#1]{#2}}\fi
+    \def\thisxkvF at mily{#2}\cxkvsetkeys at iv}
+\newcommand\cxkvsetkeys at iv[2][]{\def\@rgi{#1}\ifx\@rgi\@empty\else
+    \expandafter\def\expandafter\cxkv at skOpts
+        \expandafter{\cxkv at skOpts[#1]}\fi
+    \expandafter\cxkvsetkeys at v\expandafter{\thisxkvF at mily}{#2}}
+\def\cxkvsetkeys at v#1#2{\cxkv at skipfalse
+    \ifx\cxkv at delimname\cxkv at colon\else
+        \InputIfFileExists{xkv-\cxkv at delimname.cut}
+        {\PackageInfo{conv-xkv}{Inputting xkv-\cxkv at delimname.cut}}
+        {\PackageInfo{conv-xkv}{Cannot find xkv-\cxkv at delimname.cut}}\fi
+    \@nameuse{cxkvsetkeys-\cxkv at delimname}{#1}{#2}}
 \csarg\def{cxkvsetkeys-colon}#1#2{%
-    \def\thisxkvF at mily{#1}\def\cxkv at scratch{}\cxkv at tmptoks={}%
-    \@nameuse{cxkv at convertColoniiEqual-colon}#2,dummy:dummy,\@nil}
-\csarg\def{cxkv at convertColoniiEqual-colon}#1:#2,#3\@nil{%
-    \cxkv at convertColoniiEquali{colon}{#1}{#2}{#3}}
+    \def\thisxkvF at mily{#1}\def\thisxkvV at lues{#2}\def\cxkv at scratch{}%
+    \cxkv at tmptoks={}%
+    \@nameuse{cxkv at cnvrtDelimniiEqual-colon}#2,dummy:dummy,\@nil}
+\csarg\def{cxkv at cnvrtDelimniiEqual-colon}#1:#2,#3\@nil{%
+    \cxkv at cnvrtDelimniiEquali{colon}{#1}{#2}{#3}}
 \def\cxkvSetup#1{\bgroup
 \IfFileExists{xkv-#1.cut}{\PackageInfo{conv-xkv}{xkv-#1.cut
     already exists,\MessageBreak will not create another one}}{%
@@ -126,7 +142,7 @@
     \newwrite \cxkv at write
     \uccode`c=`\%
     \def\w{#1}\def\x{cxkvsetkeys-#1}%
-    \def\y{cxkv at convertColoniiEqual-#1}%
+    \def\y{cxkv at cnvrtDelimniiEqual-#1}%
     \def\z{kvdelim-#1}%
     \immediate\openout \cxkv at write xkv-#1.cut
     \immediate\write\cxkv at write{\string\makeatletter}%
@@ -133,11 +149,12 @@
     \uppercase{\immediate\write\cxkv at write{\string
         \csarg\string\def{\y}\cxkvarg1\@nameuse{\z}%
         \cxkvarg2,\cxkvarg3\string\@nil{c^^J\cxkv at TAB
-        \string\cxkv at convertColoniiEquali{\w}{\cxkvarg1}%
+        \string\cxkv at cnvrtDelimniiEquali{\w}{\cxkvarg1}%
         {\cxkvarg2}{\cxkvarg3}}}}
     \uppercase{\immediate\write\cxkv at write{\string\csarg\string\def
         {\x}\cxkvarg1\cxkvarg2{c^^J\cxkv at TAB
         \string\def\string\thisxkvF at mily{\cxkvarg1}\string
+        \def\string\thisxkvV at lues{\cxkvarg2}\string
         \let\string\cxkv at scratch\string\@empty\string
         \cxkv at tmptoks={}c^^J\cxkv at TAB
         \string\@nameuse{\y}\cxkvarg2,%
@@ -152,7 +169,18 @@
 \def\cxkv at parsecomma#1,#2\@nil{\def\@rgi{#1}\def\@rgii{#2}%
     \ifx\@rgii\@empty\cxkv at keyonlyfalse\else
         \cxkv at keyonlytrue\cxkv at removecomma#2\@nil\fi}
-\def\cxkv at convertColoniiEquali#1#2#3#4{\def\cxkv at rgiii{#3}%
+\newif\ifcxkv at skip \cxkv at skipfalse
+\def\cxkv at cnvrtDelimniiEquali#1#2#3#4{%
+    \def\cxkv at rgiii{#3}\def\cxkv at rgiv{#4}%
+    \ifx\thisxkvV at lues\@empty\else
+        \ifx\cxkv at rgiv\@empty
+            \edef\cxkv at next{\noexpand
+                \setkeys\cxkv at skOpts{\thisxkvV at lues}}%
+            \cxkv at skiptrue
+        \fi
+    \fi
+    \let\thisxkvV at lues\@empty
+    \ifcxkv at skip\else
     \ifx\cxkv at rgiii\cxkv at dummy
         \cxkv at parsecomma#2,\@nil
         \ifcxkv at keyonly
@@ -160,10 +188,10 @@
             \cxkv at tmptoks=\expandafter{\cxkv at tmp}%
             \edef\cxkv at scratch{\the\cxkv at tmptoks}%
             \edef\cxkv at next{\noexpand
-                \setkeys{\thisxkvF at mily}{\the\cxkv at tmptoks}}%
+                \setkeys\cxkv at skOpts{\the\cxkv at tmptoks}}%
         \else
             \edef\cxkv at next{\noexpand
-                \setkeys{\thisxkvF at mily}{\the\cxkv at tmptoks}}%
+                \setkeys\cxkv at skOpts{\the\cxkv at tmptoks}}%
         \fi
     \else
         \cxkv at parsecomma#2,\@nil
@@ -172,14 +200,14 @@
             \cxkv at tmptoks=\expandafter{\cxkv at tmp}%
             \edef\cxkv at scratch{\the\cxkv at tmptoks}%
             \edef\cxkv at next{\noexpand
-                \@nameuse{cxkv at convertColoniiEqual-#1}\cxkv at key
+                \@nameuse{cxkv at cnvrtDelimniiEqual-#1}\cxkv at key
                 \@nameuse{kvdelim-#1}#3,#4\noexpand\@nil}
         \else
             \cxkv at tmptoks=\expandafter{\cxkv at scratch,#2=#3}%
             \edef\cxkv at scratch{\the\cxkv at tmptoks}%
             \def\cxkv at next{%
-                \@nameuse{cxkv at convertColoniiEqual-#1}#4\@nil}\fi
-    \fi\cxkv at next
+                \@nameuse{cxkv at cnvrtDelimniiEqual-#1}#4\@nil}\fi
+    \fi\fi\cxkv at next
 }
 \ckv at RestoreCatcodes
 \endinput



More information about the tex-live-commits mailing list