summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-21 15:36:37 +0000
committerKarl Berry <karl@freefriends.org>2010-05-21 15:36:37 +0000
commit71810b2e12c199d5fd05a223269388f5d35cf10a (patch)
tree9366b4c50d0480bb93e0589a299b577d2de1d4da /Master
parenta818412461fe2267a0056ce5ab9a25a0032ea2c4 (diff)
skeycommand 0.2 (20may10)
git-svn-id: svn://tug.org/texlive/trunk@18402 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/README2
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdfbin162439 -> 162771 bytes
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex99
-rw-r--r--Master/texmf-dist/tex/latex/skeycommand/skeycommand.sty63
4 files changed, 107 insertions, 57 deletions
diff --git a/Master/texmf-dist/doc/latex/skeycommand/README b/Master/texmf-dist/doc/latex/skeycommand/README
index 89b8247d749..ff03feac03f 100644
--- a/Master/texmf-dist/doc/latex/skeycommand/README
+++ b/Master/texmf-dist/doc/latex/skeycommand/README
@@ -1,6 +1,6 @@
%+++++++++++++++++++++++++++++++++++ INTRODUCTION +++++++++++++++++++++++++++++++++++%
% %
-% This is the Readme file for the skeycommand package, version 0.1. %
+% This is the Readme file for the skeycommand package, version 0.2. %
% May 2010 %
% %
% Copyright (c) 2010 Ahmed Musa (a.musa@rocketmail.com). %
diff --git a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf
index 4ae71dec09f..694e5c21714 100644
--- a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf
+++ b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex
index 32f3f96cf66..e2fdedd6c11 100644
--- a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex
+++ b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex
@@ -12,7 +12,7 @@
}{%
\titlenote[t1]{The package is available at \url{\@shorttitleurl}.}%
}
-\subtitle{Version 0.1}
+\subtitle{Version 0.2}
\titleurl{http://www.ctan.org/tex-archive/macros/latex/contrib/skeycommand/}
\shorttitleurl{http://www.ctan.org/}
\author{Ahmed Musa\Email{a.musa@rocketmail.com}\\Preston, Lancashire, UK}
@@ -43,8 +43,9 @@
\end{license}
\end{frontmatter}
+\newpage
\frameshade[fillcolor=yellow!20,framecolor=brown,framerule=2pt,framesep=2pt,
- width=1.1\hsize]{\tableofcontents}
+ width=\hsize]{\tableofcontents}
\section{Package options}
\label{sec:pack-options}
@@ -52,9 +53,11 @@
The package has only one option (namely, \acmdm{verbose}) and can be invoked at the time of loading the package or via the \acmd{\skeycommand} macro. The option \fx{verbose} is a boolean, initially set to false (\ie, its complement, \acmdm{silent}, is true by default). Setting \fx{silent} to \fx{false} is tantamount to setting \fx{verbose} to \fx{true}.
\begin{example}
|comm(In style files:)
-\RequirePackage[verbose=true |orr false]{skeycommand}
+\RequirePackage[verbose=true |orr false |orr on |orr off]{skeycommand}
+
|comm(In document files:)
-\usepackage[verbose=true |orr false]{skeycommand}
+\usepackage[verbose=true |orr false |orr on |orr off]{skeycommand}
+
|comm(In all cases:)
\skeycommand{verbose=true |orr false |orr on |orr off}
\end{example}
@@ -67,30 +70,22 @@ If you enter the boolean \fx{verbose} (or \fx{silent}) without value, the value
The user interfaces for defining new key commands and environments are as follows:
\begin{macro}
-\newkeycmd|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)]
- [|vang(default1)]{|vang(defn)}
-\newkeycmd|redstar|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)]
- [|vang(default1)]{|vang(defn)}
-
-\renewkeycmd|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)]
- [|vang(default1)]{|vang(defn)}
-\renewkeycmd|redstar|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)]
- [|vang(default1)]{|vang(defn)}
-
-\newkeyenviron|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)]
- [|vang(default1)]{|vang(defn)}
-\newkeyenviron|redstar|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)]
- [|vang(default1)]{|vang(defn)}
-
-\renewkeyenviron|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)]
- [|vang(default1)]{|vang(defn)}
-\renewkeyenviron|redstar|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)]
- [|vang(default1)]{|vang(defn)}
+\newkeycmd|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
+\newkeycmd|redstar|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
+
+\renewkeycmd|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
+\renewkeycmd|redstar|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
+
+\newkeyenviron|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
+\newkeyenviron|redstar|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
+
+\renewkeyenviron|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
+\renewkeyenviron|redstar|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
\end{macro}
-Here, \ang{narg} is the number of user arguments, as usual in \fx{\newcommand} and \fx{\newenvironment} (excluding the \ang{keyval} list); \ang{cmd} is the new command sequence; \ang{env} is the new environment name; \ang{mprefix} is the prefix for macros deriving from the defined keys whose values will be used in the new command or environment (this is called the \emph{macro prefix} in the parlance of keys); \ang{keyval} is the key-value list [\eg, (\fx{keya=valuea}, \fx{keyb=valueb})]; \ang{narg} is the number of arguments for the new command or environment (excluding the keys), as you would enter it in \fx{\newcommand} and \fx{\newenvironment}; \ang{default1} is the default value for your optional argument (normally the first argument in \fx{\newcommand} and \fx{\newenvironment}); \ang{defn} is the replacement text (as in \fx{\newcommand} and \fx{\newenvironment}). If you don't supply the optional \ang{mprefix}, the package will use the first three letters of the key command or environment name, excluding the escape character but including an added ``at sign'' (\fx{@}). The aim of default ``at sign'' is to aid the visual separation of key names from macro prefixes.
+Here, \ang{cmd} is the new control sequence; \ang{env} is the new environment name; \ang{mprefix} is the prefix for macros deriving from the defined keys whose values will be used in the new command or environment (this is called the \emph{macro prefix} in the parlance of keys); \ang{keyval} is the key-value list [\eg, (\fx{keya=valuea}, \fx{keyb=valueb})]; \ang{narg} is the number of arguments for the new command or environment (excluding the keys), as you would enter it in \fx{\newcommand} and \fx{\newenvironment}; \ang{default1} is the default value for your optional argument (normally the first argument in \fx{\newcommand} and \fx{\newenvironment}); \ang{defn} is the replacement text (as in \fx{\newcommand} and \fx{\newenvironment}). If you don't supply the optional \ang{mprefix}, the package will use the first three letters of the key command or environment name, excluding the escape character but including an added ``at sign'' (\fx{@}). The aim of default ``at sign'' is to aid the visual separation of key names from macro prefixes.
-Please note the angles surrounding \ang{mprefix}, and the parenthesis surrounding \ang{keyval} in the above syntaxes. The \ang{mprefix} can't be empty (\ie, don't enter \texttt{<>}) because it will be used by the package to build unique names for the macros that will hold the key values. You can choose not to enter anything for \ang{mprefix}, and the package will happily use the default prefix \fx{<xxx@>}, where ``\fx{xxx}'' represents the first three letters of the new command or environment name. Also, \ang{keyval} can't be empty: if it was empty, then we should ask: why use key commands instead of \latex's \fx{\newcommand} and \fx{\newenvironment}?
+Please note the angle bracket surrounding \ang{mprefix}, and the parenthesis surrounding \ang{keyval} in the above syntaxes. The \ang{mprefix} can't be empty (\ie, don't enter \texttt{<>}) because it will be used by the package to build unique names for the macros that will hold the key values. You can choose not to enter anything for \ang{mprefix}, and the package will happily use the default prefix \fx{<xxx@>}, where ``\fx{xxx}'' represents the first three letters of the new command or environment name. Also, \ang{keyval} can't be empty: if it was empty, then we should ask: why use key commands instead of \latex's \fx{\newcommand} and \fx{\newenvironment}?
In \ang{defn}, you refer to your arguments in the normal way. You refer to the values of the keys using macros whose first three characters (after the escape character) are the \ang{mprefix} or, if \ang{mprefix} is not supplied, the first three letters of the declared key command (excluding the escape character). The family name of the keys defined via a key command is the key command name itself (without the escape character). The package uses this internally in developing the keys. The key prefix is always ``KV''. If any of your key values contains parenthesis, simply enclose it in braces, to avoid confusing it with \ang{keyval} list.
@@ -111,7 +106,8 @@ The syntaxes for calling new key commands and environments are as follows:
\end{macro}
where \fx{\cmd} and \fx{env} have been previously defined using key command and key environment. You refer to your arguments using parameter number one \hash{1} onwards, up to a maximum of \hash{8} (yes, \hash{8}, not \hash{9}). Here, \ang{keyval} (including the parenthesis) are optional arguments: you can omit them if you want to use the values of the keys set at key command definition time. Using keys is preferable to using parameters: you don't have to match parameters to arguments and, in principle, there is no limit to the number of keys that are permissible.
-\subsection{Commands and environments with two optional arguments}
+\subsection[Commands with two optional arguments]
+{Commands and environments with two optional arguments}
The \pkg{skeycommand} uses the following macros internally. They can be used to define new commands and environments with two optional arguments. Their philosophy, intent, and use syntaxes differ from those of the \pkgm{twoopt}. They may be useful to some users, although I recommend the use of the above key commands.
@@ -132,7 +128,7 @@ The \pkg{skeycommand} uses the following macros internally. They can be used to
\ang{narg} is the total number of arguments, including the first and second optional arguments.
Where are the second optional arguments here, you might be wondering? The second optional argument is usually empty and doesn't appear at command definition time. The second optional argument isn't the second argument of your command (as in \pkg{twoopt}), but the last. At command invocation, if you don't supply a value for the second optional argument, the command will assume it to be empty. But how do you supply a value for the second optional argument? The next section shows how.
-\subsubsection[Calling commands and environments]
+\subsubsection[Invoking commands and environments]
{Invoking commands and environments with two optional arguments}
The syntaxes for calling commands and environments with two optional arguments are as follows:
@@ -155,11 +151,15 @@ If \ang{2nd optarg} is empty at command or environment invocation, the command o
|makered(\newkeycmd*)\demomacro|:name=Steve,height=1.60m,weight=75kg,
tested=true|![3][Registered]{%
\def\x{#1}\def\y{#2}\def\z{#3}%
- \edef\xxx{\dem@name}%
+ \ifdem@tested
+ \edef\cleared{\dem@name}%
+ \else
+ \let\cleared\relax
+ \fi
}
|comm(|makered(\dem@name) will hold the value supplied for |makered(`name'))
|comm(by the user of \demomacro. |makered(`dem') is from |makered(`demomacro').)
-|comm(Observe the LaTeX-like syntax of this command.)
+|comm(Notice the LaTeX-like syntax of this command.)
|comm(The user doesn't have to bother about the nitty-gritty)
|comm(of key infrastructure.)
@@ -173,8 +173,9 @@ Instead of using the macro \acmd{\uservaluekeys}, you can use the full pointer s
\begin{example}
|makered(\newkeycmd)*\demomacro|:|makered(\uservalue\savevalue|mcolor({)name|mcolor(}))=Steve,
height=1.60m,wieght=75kg,tested=true|![3][Registered]{%
- \def\x{#1}\def\y{#2}\def\z{#3}}%
+ \def\x{#1}\def\y{#2}\def\z{#3}%
\edef\xxx{\dem@name}%
+}
|comm(User now calls the \demomacro macro:)
\demomacro[data1]{data2}{data3}|:name,height=1.55m,wieght=55kg,
@@ -182,9 +183,16 @@ Instead of using the macro \acmd{\uservaluekeys}, you can use the full pointer s
|makered(|tto Error: no value supplied for `name')
\end{example}
-Now you can use \fx{\demomacro}. If you don't supply a key-value pair here, the macro will use the above defaults:
+You can use the saved value of key \fx{name} within \fx{\demomacro}. Suppose, oddly, that the key \fx{height} can use the value of the key \fx{name}, then we can do
+
\begin{example}
-\demomacro[data1]{data2}{data3}|:name=John,height=1.55m,
+\demomacro[data1]{data2}{data3}|:name=John,
+ height=|makered(\usevalue){|mcolor(name)},wieght=55kg,tested=true|!
+\end{example}
+
+If in \fx{\demomacro} you don't supply a key-value pair, the macro will use the above defaults:
+\begin{example}
+\demomacro[data1]{data2}{data3}|:name=John,|comm(|makered(height) missing here.)
weight=55kg,tested=true|!
\end{example}
@@ -198,8 +206,8 @@ Now you can use \fx{\demomacro}. If you don't supply a key-value pair here, the
}
\begin{document}
-\firstmacro[1]{-2}{-3}{-4}{-5}{-6}{-7}{-8}
- |:name=John {|:Winne|!}r,height=1.54m|!
+\firstmacro[1]{-2}{-3}{-4}{-5}{-6}{-7}{-8}%
+ |:name=John {|:Winner|!},height=1.54m|!
\end{document}
\end{example}
@@ -234,9 +242,11 @@ Now you can use \fx{\demomacro}. If you don't supply a key-value pair here, the
men, foreigners who, after having committed some grievous
error, can easily disappear and return to their own country.}
\def\hieronymus{HIERONYMUS HORNSCHUCH |:1608|!}
+\def\@elgar{If I write
|comm(The macros \@barbara, \barbara, etc. are just shorthands:)
-|comm(you can enter their contents directly in key commands.)
+|comm(you can enter their contents directly in key commands,)
+|comm(as we shall see later.)
|makered(\newkeyenviron){Quote}<mp@>|:leftmargin=\leftmargin,
rightmargin=\rightmargin,mode=false,whoby=\null,
@@ -264,6 +274,25 @@ Now you can use \fx{\demomacro}. If you don't supply a key-value pair here, the
whoby=\hieronymus,source={The \TeX Book}|!
{\ifmp@mode\color{red}\else\color{blue}\fi\@hieronymus}
\end{Quote}
+
+\lipsum[1]
+\begin{Quote}|:leftmargin=40pt,rightmargin=40pt,mode=false,
+ whoby={Edward Elgar},source={Letter to A.\ J.\ Jaeger |:1898|!}|!
+ {\ifmp@mode\color{red}\else\color{blue}\fi
+ If I write a tune you all say it's commonplace---if I
+ don't, you all say it's rot.%
+ }%
+\end{Quote}
+
+\begin{Quote}|:leftmargin=40pt,rightmargin=40pt,mode=false,
+ whoby={Albert Einstein},source={The World As I See It}|!
+ {\ifmp@mode\color{red}\else\color{blue}\fi
+ If you want to find out anything from the theoretical physicists
+ about the methods they use, I advise you to stick closely to
+ one principle: don't listen to their words, fix your attention
+ on their deeds.%
+ }%
+\end{Quote}
\end{example}
\begin{example}
diff --git a/Master/texmf-dist/tex/latex/skeycommand/skeycommand.sty b/Master/texmf-dist/tex/latex/skeycommand/skeycommand.sty
index e9231f299e9..3123bb0a215 100644
--- a/Master/texmf-dist/tex/latex/skeycommand/skeycommand.sty
+++ b/Master/texmf-dist/tex/latex/skeycommand/skeycommand.sty
@@ -1,6 +1,6 @@
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
% %
-% This is file 'skeycommand.sty', version 0.1. %
+% This is file 'skeycommand.sty', version 0.2. %
% %
% This package and accompanying files may be distributed and/or %
% modified under the conditions of the LaTeX Project Public License, %
@@ -25,7 +25,7 @@
\catcode123 01% {
\catcode125 02% }
\def\SKC@tempa{\endgroup
- \edef\SKC@reincodes{%
+ \edef\SKC@restorecodes{%
\catcode035 \the\catcode035% #
\catcode064 \the\catcode064% @
\catcode123 \the\catcode123% {
@@ -40,16 +40,16 @@
\catcode123 01% {
\catcode125 02% }
\def\SKC@catcode#1#2{%
- \edef\SKC@reincodes{%
- \SKC@reincodes
+ \edef\SKC@restorecodes{%
+ \SKC@restorecodes
\catcode#1 \the\catcode#1\relax
}%
\catcode#1 #2\relax
}
\AtEndOfPackage{%
\SKV@AfterPackageEnd{%
- \SKC@reincodes
- \SKV@Undef?{\SKC@catcode\SKC@reincodes}%
+ \SKC@restorecodes
+ \SKV@Undef?{\SKC@catcode\SKC@restorecodes}%
}%
}
\SKC@catcode{036}{03}% $
@@ -70,7 +70,7 @@
\def\SKC@rcsid$#1: #2 #3 #4 #5${#4 v#3}
\ProvidesPackage{skeycommand}[%
\SKC@rcsid
- $Id: skeycommand.sty,v 0.1 2010/05/05 09:00:00 Ahmed Musa $
+ $Id: skeycommand.sty,v 0.2 2010/05/20 09:00:00 Ahmed Musa $
Defining new commands and environments using keys (AM)
]
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
@@ -96,6 +96,8 @@
\TestProvidedCommand\newdef{}{\let\newdef\SKV@def}
\TestProvidedCommand\robustdef{}{\let\robustdef\SKV@pdef}
\TestProvidedCommand\redef{}{\let\redef\SKV@redef}
+\ReserveMacroPrefixNames*{SKC}
+\ReserveFamilyNames*{skeycmd}
\robustdef\SKC@info#1{\PackageInfo{skeycommand}{#1\@gobble}}
\robustdef\SKC@warn#1{\PackageWarningNoLine{skeycommand}{#1}}
\robustdef\SKC@err#1#2{\PackageError{skeycommand}{#1}{#2}}
@@ -106,7 +108,7 @@
\DeclareOptionX*{\SKC@warn{Unknown option '\CurrentOption' ignored}}
\ExecuteOptionsX[KV]<skeycmd>{verbose=false}
\ProcessOptionsX*[KV]<skeycmd>\relax
-\robustdef*\skeycommand#1{\setkeys[KV]{skeycmd}{#1}}
+\robustdef\skeycommand#1{\setkeys[KV]{skeycmd}{#1}}
\newdef*\SKC@fdigit#1{%
\let\SKC@resvda\@empty
\SKV@tfor{#1}\SKC@resvdb{%
@@ -123,7 +125,7 @@
\SKV@emptycmds{\SKC@keycmdlist,\SKC@k@ycmdlist}
\newdef\SKC@keycmd@i#1{%
\SKV@ensurescape{#1}%
- \gdef\SKC@keycmdname{#1}%
+ \def\SKC@keycmdname{#1}%
\edef\SKC@tfam{\expandafter\@gobble\string#1}%
\edef\SKC@pref{\expandafter\expandafter\expandafter%
\SKV@carcube\expandafter\@gobble\string#1xxx\@nil}%
@@ -151,7 +153,7 @@
\SKV@testopt\SKC@keycmd@v{0}%
}
\newdef\SKC@keycmd@iv#1{%
- \SKV@emptycmds*{\SKC@keycmdlist,\SKC@k@ycmdlist}%
+ \SKV@emptycmds?{\SKC@keycmdlist,\SKC@k@ycmdlist}%
\XKV@checksanitizea{#1}\SKC@tempa
\SKV@normalizea\SKC@tempa
\SKV@for*[,]\SKC@tempa\SKC@tempa{%
@@ -163,7 +165,9 @@
\SKC@paramerr{#1}%
\SKV@testopt{\SKC@keycmd@vi[#1]}{}%
}
+\let\SKC@tag\z@
\newdef\SKC@keycmd@vi[#1][#2]#3{%
+ \let\SKC@tag\@ne
\edef\SKC@resvda##1##2{%
##1[\the\numexpr#1+1]\SKV@ifblank{#2}{}{[\unexpanded{#2}]}%
{\setkeys[KV]{\SKC@tfam}{####\the\numexpr#1+1}##2}%
@@ -172,6 +176,7 @@
{\def\SKC@resvdb{\newtwooptcmd*}}%
{\let\SKC@resvdb\newtwooptcmd}%
\SKC@resvda{\expandafter\SKC@resvdb\SKC@keycmdname}{#3}%
+ \let\SKC@tag\z@
}
\robustdef*\renewkeycmd{\@star@or@long\SKC@renewkeycmd@i}
\robustdef*\csrenewkeycmd{\SKV@aftercs\renewkeycmd}
@@ -195,7 +200,7 @@
}{}%
\edef\SKC@tfam{#1}%
\edef\SKC@pref{\SKV@carcube#1xxx\@nil @}%
- \xdef\SKC@keycmdname{\SKV@noexpcs{#1}}%
+ \edef\SKC@keycmdname{\SKV@noexpcs{#1}}%
\SKV@testopth\SKC@keyenviron@ii\SKC@pref
}
\newdef\SKC@keyenviron@ii<#1>{%
@@ -220,6 +225,7 @@
\SKV@testopt{\SKC@keyenviron@vi[#1]}{}%
}
\newdef\SKC@keyenviron@vi[#1][#2]#3#4{%
+ \let\SKC@tag\@ne
\edef\SKC@resvda##1##2{%
##1[\the\numexpr#1+1]\SKV@ifblank{#2}{}{[\unexpanded{#2}]}%
{\setkeys[KV]{\SKC@tfam}{####\the\numexpr#1+1}##2}%
@@ -233,6 +239,7 @@
}%
\SKC@resvdb{end\SKC@tfam}{#4}%
\SKC@resvda{\expandafter\SKC@resvdc\SKC@keycmdname}{#3}%
+ \let\SKC@tag\z@
}
\robustdef*\renewkeyenviron{\@star@or@long\SKC@renewkeyenviron@i}
\robustdef*\csrenewkeyenviron{\SKV@aftercs\renewkeyenviron}
@@ -297,9 +304,8 @@
}%
}
\newdef\SKC@protected@testopt#1{%
- \SKV@ifx\protect\@typeset@protect\SKV@testopt{\SKC@x@protect#1}%
+ \SKV@ifx\protect\@typeset@protect\SKV@testopt{\protect#1}%
}
-\newdef\SKC@x@protect#1#2#3{\protect#1}
\newdef\SKC@yargdef#1#2#3{%
\SKV@ifx{#2}\tw@
{\edef\SKC@shear##11{[\detokenize{####1}]}}%
@@ -361,20 +367,35 @@
\expandafter\SKC@resvda\SKC@resvdb\@nil
\SKV@scantoksa{\SKC@tempa,\SKC@tempb,\SKC@tempc}%
\edef\SKC@resvda{\expandafter\@gobble\string#2@SKC}%
- \edef\SKC@resvdb{\l@ngrel@x\def\noexpand#2\SKC@tempb
+ \def\SKC@resvdc{%
+ \edef\SKC@resvdb{\l@ngrel@x\def\SKV@noexpcs\SKC@resvda\SKC@tempc}%
+ \SKC@resvdb
+ }%
+ \edef\SKC@resvdb{%
\ifnum#1<\tw@
\ifx\SKC@shear\@gobble
- {\SKV@noexpcs\SKC@resvda{\SKC@tempa}}%
+ \ifx\SKC@tag\@ne
+ \l@ngrel@x\def\noexpand#2%
+ {\noexpand\SKV@testoptp\SKV@noexpcs\SKC@resvda{}}%
+ \unexpanded{\edef\SKC@resvdb{\l@ngrel@x\def\SKV@noexpcs
+ \SKC@resvda(\SKC@tempc)}\SKC@resvdb}%
+ \else
+ \l@ngrel@x\def\noexpand#2\SKC@tempb
+ {\SKV@noexpcs\SKC@resvda{\SKC@tempa}}%
+ \noexpand\SKC@resvdc
+ \fi
\else
- {\SKV@noexpcs\SKC@resvda\SKC@tempa}%
+ \l@ngrel@x\def\noexpand#2\SKC@tempb
+ {\SKV@noexpcs\SKC@resvda\SKC@tempa}%
+ \noexpand\SKC@resvdc
\fi
\else
- {\noexpand\SKV@testoptp{\SKV@noexpcs\SKC@resvda\SKC@tempa}{}}%
+ \l@ngrel@x\def\noexpand#2\SKC@tempb
+ {\noexpand\SKV@testoptp{\SKV@noexpcs\SKC@resvda\SKC@tempa}{}}%
+ \noexpand\SKC@resvdc
\fi
}%
\SKC@resvdb
- \edef\SKC@resvdb{\l@ngrel@x\def\SKV@noexpcs\SKC@resvda\SKC@tempc}%
- \SKC@resvdb
}
\newdef\SKC@reargdef#1[#2]{\SKC@yargdef#1\@ne{#2}}
\robustdef*\renewtwooptcmd{\@star@or@long\SKC@renewcommand@i}
@@ -438,8 +459,8 @@
}
\robustdef*\SKC@nilkeylist{%
\SKC@err{%
- No key list submitted.\SKV@MB
- Why use keycommand without keys?
+ No key list submitted or wrong command syntax.\SKV@MB
+ Please see the user guide.
}{%
Keycommand requires keys.\SKV@MB
Perhaps you submitted an empty key list,\SKV@MB