diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/conv-xkv/README.md | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/conv-xkv/doc/conv-xkv.pdf | bin | 83223 -> 100538 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/conv-xkv/examples/convert2xkeyval.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/conv-xkv/conv-xkv.dtx | 141 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/conv-xkv/conv-xkv.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/conv-xkv/conv-xkv.sty | 90 |
6 files changed, 175 insertions, 71 deletions
diff --git a/Master/texmf-dist/doc/latex/conv-xkv/README.md b/Master/texmf-dist/doc/latex/conv-xkv/README.md index 634bf0bfee8..efca36d48aa 100644 --- a/Master/texmf-dist/doc/latex/conv-xkv/README.md +++ b/Master/texmf-dist/doc/latex/conv-xkv/README.md @@ -1,12 +1,19 @@ 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 <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. diff --git a/Master/texmf-dist/doc/latex/conv-xkv/doc/conv-xkv.pdf b/Master/texmf-dist/doc/latex/conv-xkv/doc/conv-xkv.pdf Binary files differindex 3b7c4722706..ebfb29e660d 100644 --- a/Master/texmf-dist/doc/latex/conv-xkv/doc/conv-xkv.pdf +++ b/Master/texmf-dist/doc/latex/conv-xkv/doc/conv-xkv.pdf diff --git a/Master/texmf-dist/doc/latex/conv-xkv/examples/convert2xkeyval.tex b/Master/texmf-dist/doc/latex/conv-xkv/examples/convert2xkeyval.tex index 04a2cd1d9c5..001e1c03259 100644 --- a/Master/texmf-dist/doc/latex/conv-xkv/examples/convert2xkeyval.tex +++ b/Master/texmf-dist/doc/latex/conv-xkv/examples/convert2xkeyval.tex @@ -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 @@ to a form the \pkg{xkeyval} package expects them to be in. 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., diff --git a/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.dtx b/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.dtx index 478fdad7135..57fc4b6e194 100644 --- a/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.dtx +++ b/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.dtx @@ -1,20 +1,20 @@ % \iffalse %<*copyright> -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% conv-xkv package %% -%% Copyright (C) 2016 D. P. Story %% -%% dpstory@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. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% conv-xkv package %% +%% Copyright (C) 2016--2017 D. P. Story %% +%% dpstory@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. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %</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@SetCatcodes\DeclareDelimiter@i} \def\DeclareDelimiter@i#1#2{\@ifundefined{kvdelim-#1} {\csarg\def{kvdelim-#1}{#2}\ckv@RestoreCatcodes\cxkvSetup{#1}} - {\ckv@RestoreCatcodes}% -} + {\ckv@RestoreCatcodes}} \@onlypreamble\DeclareDelimiter % \end{macrocode} % \end{macro} % \cs{cxkv@tmptoks} is used to hold the converted key-values, the contents of -% this token register is passed to \cs{setkeys} in \cs{cxkv@convertColoniiEquali} +% this token register is passed to \cs{setkeys} in \cs{cxkv@cnvrtDelimniiEquali} % \begin{macrocode} \newtoks\cxkv@tmptoks \cxkv@tmptoks={} \def\cxkv@dummy{dummy} @@ -216,23 +238,53 @@ %\end{verbatim} % \begin{macrocode} \def\cxkv@colon{colon} -\newcommand\cxkvsetkeys[1][colon]{% - \def\@rgi{#1}\ifx\@rgi\cxkv@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@i}{\cxkvsetkeys@i(colon)}} +\def\cxkvsetkeys@i(#1){\cxkvsetkeys@ii{#1}} +\def\cxkvsetkeys@ii#1{\def\cxkv@delimname{#1}\@ifstar + {\def\cxkv@skOpts{*}\cxkvsetkeys@iii} + {\def\cxkv@skOpts{}\cxkvsetkeys@iii}} +\newcommand\cxkvsetkeys@iii[2][]{\def\@rgi{#1}\ifx\@rgi\@empty + \expandafter\def\expandafter\cxkv@skOpts + \expandafter{\cxkv@skOpts{#2}}\else + \expandafter\def\expandafter + \cxkv@skOpts\expandafter{\cxkv@skOpts[#1]{#2}}\fi + \def\thisxkvF@mily{#2}\cxkvsetkeys@iv} +\newcommand\cxkvsetkeys@iv[2][]{\def\@rgi{#1}\ifx\@rgi\@empty\else + \expandafter\def\expandafter\cxkv@skOpts + \expandafter{\cxkv@skOpts[#1]}\fi + \expandafter\cxkvsetkeys@v\expandafter{\thisxkvF@mily}{#2}} +\def\cxkvsetkeys@v#1#2{\cxkv@skipfalse + \ifx\cxkv@delimname\cxkv@colon\else + \InputIfFileExists{xkv-\cxkv@delimname.cut} + {\PackageInfo{conv-xkv}{Inputting xkv-\cxkv@delimname.cut}} + {\PackageInfo{conv-xkv}{Cannot find xkv-\cxkv@delimname.cut}}\fi + \@nameuse{cxkvsetkeys-\cxkv@delimname}{#1}{#2}} +% \end{macrocode} +% \end{macro} % \begin{macrocode} \csarg\def{cxkvsetkeys-colon}#1#2{% - \def\thisxkvF@mily{#1}\def\cxkv@scratch{}\cxkv@tmptoks={}% - \@nameuse{cxkv@convertColoniiEqual-colon}#2,dummy:dummy,\@nil} -\csarg\def{cxkv@convertColoniiEqual-colon}#1:#2,#3\@nil{% - \cxkv@convertColoniiEquali{colon}{#1}{#2}{#3}} + \def\thisxkvF@mily{#1}\def\thisxkvV@lues{#2}\def\cxkv@scratch{}% + \cxkv@tmptoks={}% + \@nameuse{cxkv@cnvrtDelimniiEqual-colon}#2,dummy:dummy,\@nil} +\csarg\def{cxkv@cnvrtDelimniiEqual-colon}#1:#2,#3\@nil{% + \cxkv@cnvrtDelimniiEquali{colon}{#1}{#2}{#3}} % \end{macrocode} % \end{macro} % \begin{macro}{\cxkvSetup} -% Write the definitions of \cs{cxkvsetkeys} and \cs{cxkv@convertColoniiEqual} to +% Write the definitions of \cs{cxkvsetkeys} and \cs{cxkv@cnvrtDelimniiEqual} to % the file \texttt{conv-xkv.cut} then input this file back in. % \begin{macrocode} \def\cxkvSetup#1{\bgroup @@ -243,18 +295,19 @@ \newwrite \cxkv@write \uccode`c=`\% \def\w{#1}\def\x{cxkvsetkeys-#1}% - \def\y{cxkv@convertColoniiEqual-#1}% + \def\y{cxkv@cnvrtDelimniiEqual-#1}% \def\z{kvdelim-#1}% \immediate\openout \cxkv@write xkv-#1.cut \immediate\write\cxkv@write{\string\makeatletter}% \uppercase{\immediate\write\cxkv@write{\string \csarg\string\def{\y}\cxkvarg1\@nameuse{\z}% \cxkvarg2,\cxkvarg3\string\@nil{c^^J\cxkv@TAB - \string\cxkv@convertColoniiEquali{\w}{\cxkvarg1}% + \string\cxkv@cnvrtDelimniiEquali{\w}{\cxkvarg1}% {\cxkvarg2}{\cxkvarg3}}}} \uppercase{\immediate\write\cxkv@write{\string\csarg\string\def {\x}\cxkvarg1\cxkvarg2{c^^J\cxkv@TAB \string\def\string\thisxkvF@mily{\cxkvarg1}\string + \def\string\thisxkvV@lues{\cxkvarg2}\string \let\string\cxkv@scratch\string\@empty\string \cxkv@tmptoks={}c^^J\cxkv@TAB \string\@nameuse{\y}\cxkvarg2,% @@ -265,7 +318,7 @@ \egroup} % \end{macrocode} % \end{macro} -% \cs{cxkv@convertColoniiEquali} continues \cs{cxkv@convertColoniiEqual}. It is +% \cs{cxkv@cnvrtDelimniiEquali} continues \cs{cxkv@cnvrtDelimniiEqual}. It is % the part that does not need to be redefined. % \begin{macrocode} \newif\ifcxkv@keyonly \cxkv@keyonlyfalse @@ -274,7 +327,23 @@ \def\cxkv@parsecomma#1,#2\@nil{\def\@rgi{#1}\def\@rgii{#2}% \ifx\@rgii\@empty\cxkv@keyonlyfalse\else \cxkv@keyonlytrue\cxkv@removecomma#2\@nil\fi} -\def\cxkv@convertColoniiEquali#1#2#3#4{\def\cxkv@rgiii{#3}% +\newif\ifcxkv@skip \cxkv@skipfalse +\def\cxkv@cnvrtDelimniiEquali#1#2#3#4{% + \def\cxkv@rgiii{#3}\def\cxkv@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@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@lues\@empty\else + \ifx\cxkv@rgiv\@empty + \edef\cxkv@next{\noexpand + \setkeys\cxkv@skOpts{\thisxkvV@lues}}% + \cxkv@skiptrue + \fi + \fi + \let\thisxkvV@lues\@empty + \ifcxkv@skip\else \ifx\cxkv@rgiii\cxkv@dummy \cxkv@parsecomma#2,\@nil \ifcxkv@keyonly @@ -282,10 +351,10 @@ \cxkv@tmptoks=\expandafter{\cxkv@tmp}% \edef\cxkv@scratch{\the\cxkv@tmptoks}% \edef\cxkv@next{\noexpand - \setkeys{\thisxkvF@mily}{\the\cxkv@tmptoks}}% + \setkeys\cxkv@skOpts{\the\cxkv@tmptoks}}% \else \edef\cxkv@next{\noexpand - \setkeys{\thisxkvF@mily}{\the\cxkv@tmptoks}}% + \setkeys\cxkv@skOpts{\the\cxkv@tmptoks}}% \fi \else \cxkv@parsecomma#2,\@nil @@ -294,14 +363,14 @@ \cxkv@tmptoks=\expandafter{\cxkv@tmp}% \edef\cxkv@scratch{\the\cxkv@tmptoks}% \edef\cxkv@next{\noexpand - \@nameuse{cxkv@convertColoniiEqual-#1}\cxkv@key + \@nameuse{cxkv@cnvrtDelimniiEqual-#1}\cxkv@key \@nameuse{kvdelim-#1}#3,#4\noexpand\@nil} \else \cxkv@tmptoks=\expandafter{\cxkv@scratch,#2=#3}% \edef\cxkv@scratch{\the\cxkv@tmptoks}% \def\cxkv@next{% - \@nameuse{cxkv@convertColoniiEqual-#1}#4\@nil}\fi - \fi\cxkv@next + \@nameuse{cxkv@cnvrtDelimniiEqual-#1}#4\@nil}\fi + \fi\fi\cxkv@next } \ckv@RestoreCatcodes % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.ins b/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.ins index 8f2eeb7aaec..0267adec6ca 100644 --- a/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.ins +++ b/Master/texmf-dist/source/latex/conv-xkv/conv-xkv.ins @@ -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 diff --git a/Master/texmf-dist/tex/latex/conv-xkv/conv-xkv.sty b/Master/texmf-dist/tex/latex/conv-xkv/conv-xkv.sty index 74f879f0df5..0da4b2b044b 100644 --- a/Master/texmf-dist/tex/latex/conv-xkv/conv-xkv.sty +++ b/Master/texmf-dist/tex/latex/conv-xkv/conv-xkv.sty @@ -6,20 +6,20 @@ %% %% conv-xkv.dtx (with options: `copyright,package') %% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% conv-xkv package %% -%% Copyright (C) 2016 D. P. Story %% -%% dpstory@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. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% conv-xkv package %% +%% Copyright (C) 2016--2017 D. P. Story %% +%% dpstory@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. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \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@SetCatcodes\DeclareDelimiter@i} \def\DeclareDelimiter@i#1#2{\@ifundefined{kvdelim-#1} {\csarg\def{kvdelim-#1}{#2}\ckv@RestoreCatcodes\cxkvSetup{#1}} - {\ckv@RestoreCatcodes}% -} + {\ckv@RestoreCatcodes}} \@onlypreamble\DeclareDelimiter \newtoks\cxkv@tmptoks \cxkv@tmptoks={} \def\cxkv@dummy{dummy} @@ -107,17 +106,34 @@ \obeyspaces\gdef\cxkv@TAB{ } \egroup \def\cxkv@colon{colon} -\newcommand\cxkvsetkeys[1][colon]{% - \def\@rgi{#1}\ifx\@rgi\cxkv@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@i}{\cxkvsetkeys@i(colon)}} +\def\cxkvsetkeys@i(#1){\cxkvsetkeys@ii{#1}} +\def\cxkvsetkeys@ii#1{\def\cxkv@delimname{#1}\@ifstar + {\def\cxkv@skOpts{*}\cxkvsetkeys@iii} + {\def\cxkv@skOpts{}\cxkvsetkeys@iii}} +\newcommand\cxkvsetkeys@iii[2][]{\def\@rgi{#1}\ifx\@rgi\@empty + \expandafter\def\expandafter\cxkv@skOpts + \expandafter{\cxkv@skOpts{#2}}\else + \expandafter\def\expandafter + \cxkv@skOpts\expandafter{\cxkv@skOpts[#1]{#2}}\fi + \def\thisxkvF@mily{#2}\cxkvsetkeys@iv} +\newcommand\cxkvsetkeys@iv[2][]{\def\@rgi{#1}\ifx\@rgi\@empty\else + \expandafter\def\expandafter\cxkv@skOpts + \expandafter{\cxkv@skOpts[#1]}\fi + \expandafter\cxkvsetkeys@v\expandafter{\thisxkvF@mily}{#2}} +\def\cxkvsetkeys@v#1#2{\cxkv@skipfalse + \ifx\cxkv@delimname\cxkv@colon\else + \InputIfFileExists{xkv-\cxkv@delimname.cut} + {\PackageInfo{conv-xkv}{Inputting xkv-\cxkv@delimname.cut}} + {\PackageInfo{conv-xkv}{Cannot find xkv-\cxkv@delimname.cut}}\fi + \@nameuse{cxkvsetkeys-\cxkv@delimname}{#1}{#2}} \csarg\def{cxkvsetkeys-colon}#1#2{% - \def\thisxkvF@mily{#1}\def\cxkv@scratch{}\cxkv@tmptoks={}% - \@nameuse{cxkv@convertColoniiEqual-colon}#2,dummy:dummy,\@nil} -\csarg\def{cxkv@convertColoniiEqual-colon}#1:#2,#3\@nil{% - \cxkv@convertColoniiEquali{colon}{#1}{#2}{#3}} + \def\thisxkvF@mily{#1}\def\thisxkvV@lues{#2}\def\cxkv@scratch{}% + \cxkv@tmptoks={}% + \@nameuse{cxkv@cnvrtDelimniiEqual-colon}#2,dummy:dummy,\@nil} +\csarg\def{cxkv@cnvrtDelimniiEqual-colon}#1:#2,#3\@nil{% + \cxkv@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,18 +142,19 @@ \newwrite \cxkv@write \uccode`c=`\% \def\w{#1}\def\x{cxkvsetkeys-#1}% - \def\y{cxkv@convertColoniiEqual-#1}% + \def\y{cxkv@cnvrtDelimniiEqual-#1}% \def\z{kvdelim-#1}% \immediate\openout \cxkv@write xkv-#1.cut \immediate\write\cxkv@write{\string\makeatletter}% \uppercase{\immediate\write\cxkv@write{\string \csarg\string\def{\y}\cxkvarg1\@nameuse{\z}% \cxkvarg2,\cxkvarg3\string\@nil{c^^J\cxkv@TAB - \string\cxkv@convertColoniiEquali{\w}{\cxkvarg1}% + \string\cxkv@cnvrtDelimniiEquali{\w}{\cxkvarg1}% {\cxkvarg2}{\cxkvarg3}}}} \uppercase{\immediate\write\cxkv@write{\string\csarg\string\def {\x}\cxkvarg1\cxkvarg2{c^^J\cxkv@TAB \string\def\string\thisxkvF@mily{\cxkvarg1}\string + \def\string\thisxkvV@lues{\cxkvarg2}\string \let\string\cxkv@scratch\string\@empty\string \cxkv@tmptoks={}c^^J\cxkv@TAB \string\@nameuse{\y}\cxkvarg2,% @@ -152,7 +169,18 @@ \def\cxkv@parsecomma#1,#2\@nil{\def\@rgi{#1}\def\@rgii{#2}% \ifx\@rgii\@empty\cxkv@keyonlyfalse\else \cxkv@keyonlytrue\cxkv@removecomma#2\@nil\fi} -\def\cxkv@convertColoniiEquali#1#2#3#4{\def\cxkv@rgiii{#3}% +\newif\ifcxkv@skip \cxkv@skipfalse +\def\cxkv@cnvrtDelimniiEquali#1#2#3#4{% + \def\cxkv@rgiii{#3}\def\cxkv@rgiv{#4}% + \ifx\thisxkvV@lues\@empty\else + \ifx\cxkv@rgiv\@empty + \edef\cxkv@next{\noexpand + \setkeys\cxkv@skOpts{\thisxkvV@lues}}% + \cxkv@skiptrue + \fi + \fi + \let\thisxkvV@lues\@empty + \ifcxkv@skip\else \ifx\cxkv@rgiii\cxkv@dummy \cxkv@parsecomma#2,\@nil \ifcxkv@keyonly @@ -160,10 +188,10 @@ \cxkv@tmptoks=\expandafter{\cxkv@tmp}% \edef\cxkv@scratch{\the\cxkv@tmptoks}% \edef\cxkv@next{\noexpand - \setkeys{\thisxkvF@mily}{\the\cxkv@tmptoks}}% + \setkeys\cxkv@skOpts{\the\cxkv@tmptoks}}% \else \edef\cxkv@next{\noexpand - \setkeys{\thisxkvF@mily}{\the\cxkv@tmptoks}}% + \setkeys\cxkv@skOpts{\the\cxkv@tmptoks}}% \fi \else \cxkv@parsecomma#2,\@nil @@ -172,14 +200,14 @@ \cxkv@tmptoks=\expandafter{\cxkv@tmp}% \edef\cxkv@scratch{\the\cxkv@tmptoks}% \edef\cxkv@next{\noexpand - \@nameuse{cxkv@convertColoniiEqual-#1}\cxkv@key + \@nameuse{cxkv@cnvrtDelimniiEqual-#1}\cxkv@key \@nameuse{kvdelim-#1}#3,#4\noexpand\@nil} \else \cxkv@tmptoks=\expandafter{\cxkv@scratch,#2=#3}% \edef\cxkv@scratch{\the\cxkv@tmptoks}% \def\cxkv@next{% - \@nameuse{cxkv@convertColoniiEqual-#1}#4\@nil}\fi - \fi\cxkv@next + \@nameuse{cxkv@cnvrtDelimniiEqual-#1}#4\@nil}\fi + \fi\fi\cxkv@next } \ckv@RestoreCatcodes \endinput |