summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/skeyval/README2
-rw-r--r--Master/texmf-dist/doc/latex/skeyval/skeyval-bugreport.tex41
-rw-r--r--Master/texmf-dist/doc/latex/skeyval/skeyval-guide.pdfbin600300 -> 609972 bytes
-rw-r--r--Master/texmf-dist/doc/latex/skeyval/skeyval-guide.tex244
-rw-r--r--Master/texmf-dist/tex/latex/skeyval/skeyval.sty1099
5 files changed, 805 insertions, 581 deletions
diff --git a/Master/texmf-dist/doc/latex/skeyval/README b/Master/texmf-dist/doc/latex/skeyval/README
index 0b495132f3d..5dc7d3eae36 100644
--- a/Master/texmf-dist/doc/latex/skeyval/README
+++ b/Master/texmf-dist/doc/latex/skeyval/README
@@ -1,6 +1,6 @@
%+++++++++++++++++++++++++++++++++++ INTRODUCTION +++++++++++++++++++++++++++++++++++%
% %
-% This is the Readme file for the skeyval package, version 0.71. %
+% This is the Readme file for the skeyval package, version 0.72. %
% May 2010 %
% %
% Copyright (c) 2010 Ahmed Musa (a.musa@rocketmail.com). %
diff --git a/Master/texmf-dist/doc/latex/skeyval/skeyval-bugreport.tex b/Master/texmf-dist/doc/latex/skeyval/skeyval-bugreport.tex
deleted file mode 100644
index 14256941ea2..00000000000
--- a/Master/texmf-dist/doc/latex/skeyval/skeyval-bugreport.tex
+++ /dev/null
@@ -1,41 +0,0 @@
-%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
-% This is file skeyval-bugreport.tex, the bug report file for the %
-% skeyval package, version 0.7. %
-% %
-% (c) Ahmed Musa 2010 (a.musa@rocketmail.com) %
-%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
-% %
-% IMPORTANT %
-% %
-% Please fill in the details below, compile the file and email %
-% the sample file, the log file, and the auxiliary file to %
-% a.musa@rocketmail.com. %
-% %
-% You can use \traceon ... \traceoff to limit the scope of %
-% error tracing. This will be particularly helpful as TeX normally %
-% generates very large trace files. %
-% %
-% %
-%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
-
-\documentclass{article}
-\listfiles
-
-% Load your select packages here (the ones that you suspect are
-% associated with your errors), but if bugs exist in those packages,
-% I am afraid, I can't do much about them.
-
-\usepackage[logonly]{trace} % Please don't move!
-\traceon
-
-\usepackage[Put your skeyval options here, if any]{skeyval}
-
-% Provide other elements of your preamble here:
-
-\begin{document}
-% Provide sample text and problematic segment of your file here, if any:
-
-
-\end{document}
-
-%\traceoff
diff --git a/Master/texmf-dist/doc/latex/skeyval/skeyval-guide.pdf b/Master/texmf-dist/doc/latex/skeyval/skeyval-guide.pdf
index a82980a58eb..b13fd223a11 100644
--- a/Master/texmf-dist/doc/latex/skeyval/skeyval-guide.pdf
+++ b/Master/texmf-dist/doc/latex/skeyval/skeyval-guide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/skeyval/skeyval-guide.tex b/Master/texmf-dist/doc/latex/skeyval/skeyval-guide.tex
index 17345d18950..075ebfb5766 100644
--- a/Master/texmf-dist/doc/latex/skeyval/skeyval-guide.tex
+++ b/Master/texmf-dist/doc/latex/skeyval/skeyval-guide.tex
@@ -14,7 +14,7 @@ version~0.5. The \asty{keyreader} is now obsolete and no longer supported.}
}{%
\titlenote[t2]{The package is available at \url{\@shorttitleurl}.}%
}
-\subtitle{Version 0.71}
+\subtitle{Version 0.72}
\titleurl{http://www.ctan.org/tex-archive/macros/latex/contrib/skeyval/}
\shorttitleurl{http://www.ctan.org/}
\author{Ahmed Musa\Email{a.musa@rocketmail.com}\\Preston, Lancashire, UK}
@@ -26,7 +26,7 @@ version~0.5. The \asty{keyreader} is now obsolete and no longer supported.}
framecolor=brown]{%
\frameshade[fillcolor=white,width=2.5cm,framecolor=red,framerule=2pt]%
{\centering\abstname}\small
- This package supplements the \pkgm{xkeyval}. It introduces toggle keys and complementary (bipolar and unipolar) native-boolean and toggle-boolean keys. It also provides mechanisms for reserving, unreserving, suspending, restoring, and removing keys. Furthermore, it introduces a set of commands for key definition which bar the developer or user from inadvertently redefining existing keys of the same family and prefix. Commands are provided for checking the statuses of keys across multiple key prefixes and families. Also, the package provides a scheme for defining multiple keys of different genres using only one command, thereby making it possible to considerably economize on tokens when defining keys. The package introduces the notion of ``user-value keys'' and provides facilities for managing those keys. The pointer mechanisms of the \asty{xkeyval}, which were only available at key setting time, are now invocable at key definition. Some other general-purpose developer macros and hooks are provided by the package.
+ This package provides several extensions to the \pkgm{xkeyval}. It introduces toggle keys and complementary (bipolar and unipolar) native-boolean and toggle-boolean keys. It also provides mechanisms for reserving, unreserving, suspending, restoring, and removing keys. Furthermore, it introduces a set of commands for key definition which bar the developer or user from inadvertently redefining existing keys of the same family and prefix. Commands are provided for checking the statuses of keys across multiple key prefixes and families. Also, the package provides a scheme for defining multiple keys of different genres using only one command, thereby making it possible to considerably economize on tokens when defining keys. The package introduces the notion of ``user-value keys'' and provides facilities for managing those keys. The pointer mechanisms of the \asty{xkeyval}, which were only available at key setting time, are now invocable at key definition. Some other general-purpose developer macros and hooks are provided by the package.
}
\end{abstract}
@@ -74,7 +74,7 @@ Secondly, the \pkg{xkeyval} can't be used to define and set complementary (bipol
Complementary unipolar keys, on the other hand, are mutually inclusive, \ie, both are always in the same state of a two-valued logic: when one is switched to a particular state, the complement too is automatically toggled to the same state. An example of complementary unipolar keys would be the options \fx{hyperref} and \fx{microtype} in a package or class file. When \pkgm{hyperref} is loaded, we may want \pkgm{microtype} loaded as well, and vice versa. Complementary unipolar keys, like bipolar keys, also carry equal charge, \ie, one can toggle the other with equal propensity, but to the same state for the two keys. For a pair of unipolar keys, the primary key is the one that is associated with the default state.
-The present package introduces these concepts of bipolar and unipolar keys and additionally permits the submission of individual/different custom key macros to complementary (bipolar and unipolar) native boolean and toggle keys. Biunipolar keys, which combines the two concepts of bipolar and unipolar keys, are introduced as well.
+The present package introduces these concepts of bipolar and unipolar keys and additionally permits the submission of individual and different custom key macros to complementary (bipolar and unipolar) native boolean and toggle keys. Biunipolar keys, which combines the two concepts of bipolar and unipolar keys, are introduced as well.
The third motivation for this package relates to economy of tokens in style files. The \pkg{xkeyval} provides \acmd{\define@cmdkeys} and \acmd{\define@boolkeys} for defining and setting multiple command keys and boolean keys, but in each category the keys must have the same default value and no key macro/function. This package seeks to lift these restrictions, so that multiple keys of all categories (ordinary keys, command keys, boolean keys, tog keys, and choice/menu keys) can be defined in one go (using only one command) and those keys can have different default values and functions. This greatly minimizes tokens, as hundreds of keys can, in principle, be issued simultaneously by one command.
@@ -176,16 +176,18 @@ The second statement above reverses the boolean \ang{draft} to \ang{false}, whic
\Note
In the \pkg{skeyval}, the acceptable values for native-boolean and toggle-boolean keys are \fx{true}, \fx{on}, \fx{false}, and \fx{off}. Toggle-booleans (\cref{sec:toggle-booleans}) and switches (\cref{sec:switches}) also accept these values. The value \fx{on} is synonymous with \fx{true}, whilst \fx{off} is an alias for \fx{false}. Being merely aliases, both \fx{on} and \fx{off} don't increase the number of commands per switch: the number remains three.
-The \pkg{skeyval} has the \acmdm{\NewIfs} macro which defines five commands per switch:
+The \pkg{skeyval} has the \acmdm{\NewIfs} and \acmdm{\DefIfs} macros, both of which define five commands per switch:
\begin{macro}
\NewIfs[|vang(optional prefix)]{|vang(boolean list)}[|vang(optional state)]
+\DefIfs[|vang(optional prefix)]{|vang(boolean list)}[|vang(optional state)]
\end{macro}
-\acmdm*{\NewIfs}
-This provides, for each member of the comma-separated list \ang{boolean list}, a new native-boolean register if the register didn't already exist, otherwise an error is flagged. Each member of \ang{boolean list} is prefixed with \ang{prefix} upon definition. The optional \ang{state} can be either \fx{true}, \fx{false}, \fx{on} or \fx{off}; the default is \fx{false}. The state \fx{on} is synonymous with \fx{true}, whilst \fx{off} is equivalent to \fx{false}. After declaring
+The command \fx{\NewIfs} provides, for each member of the comma-separated list \ang{boolean list}, a new native-boolean register if the register didn't already exist. If the boolean register already existed, an error is flagged. Each member of \ang{boolean list} is prefixed with \ang{prefix} upon definition. The command \fx{\DefIfs}, on the other hand, provides, for each member of the comma-separated list \ang{boolean list}, a new native-boolean register whether or not the register already existed. If the boolean register already existed, and the package option \fx{verbose} is enabled, a message is entered in the transcript log file that the boolean has been redefined.
+
+The optional \ang{state} can be either \fx{true}, \fx{false}, \fx{on} or \fx{off}; the default is \fx{false}. The state \fx{on} is synonymous with \fx{true}, whilst \fx{off} is equivalent to \fx{false}. After declaring
\begin{example}
\NewIfs[bool]{a,b}[true]
\end{example}
-you can say \fx{\ifboola}, \fx{\boolaon} and \fx{\boolaoff}, just like you would normally do \fx{\boolatrue} and \fx{\boolafalse}. The disadvantage of \fx{\NewIfs} is that it defines five commands per switch; it should therefore be employed only in special circumstances.
+you can say \fx{\ifboola}, \fx{\boolaon} and \fx{\boolaoff}, just like you would normally do \fx{\boolatrue} and \fx{\boolafalse}. The disadvantage of \fx{\NewIfs} and \fx{\DefIfs} is that they define five commands per switch; they should therefore be employed only in special circumstances.
\subsection{Unipolar native-boolean keys}
@@ -299,11 +301,12 @@ This defines a new \ang{toggle}, prefixed with \ang{prefix} upon definition, whe
\acmdm*{\newtog}
This defines a new \ang{toggle}, prefixed with \ang{prefix} upon definition, if \ang{toggle} (with its prefix) is not already defined; otherwise the package issues a fatal error. The optional \ang{state} can be either \fx{true}, \fx{false}, \fx{on} or \fx{off}.
-You can define a set of toggles by the following command:
+You can define a set of toggles by the following commands:
\begin{macro}
-\NewTogs[|vang(optional prefix)]{|vang(toggles)}[|vang(optional state)],
+\NewTogs[|vang(optional prefix)]{|vang(toggles)}[|vang(optional state)]
+\DefTogs[|vang(optional prefix)]{|vang(toggles)}[|vang(optional state)]
\end{macro}
-\acmdm*{\NewTogs}
+\acmdm*{\NewTogs,\DefTogs}
where \ang{toggles} is a comma-separated list. Each member of \ang{toggles} is prefixed with \ang{prefix} upon definition. The optional \ang{state} can be either \fx{true}, \fx{false}, \fx{on} or \fx{off}. For example, we may define new toggles \fx{togx}, \fx{togy}, \fx{togz} by the following:
\begin{example}
\NewTogs[tog]{x,y,z}[true]
@@ -722,7 +725,7 @@ The macro \fx{\mp@align} holds the value \fx{\flushright}, while \fx{\KV@fam@tes
\def\mp@testdim{#1}
\long\def\funcfortestdim##1{A test dimension ##1},
\end{example}
-where \angledhash{1} is the value (3cm) submitted for the key \fx{testdim}. The number of parameter characters normally increases in the macro \fx{\define@keylist} (see \cref{sec:macros-in-keymacros}). After setting the keys, you can do \fx{\show\mp@align} and \fx{\show\KV@fam@testdim} to confirm the above assertions.
+where \fx{#1} is the value (3cm) submitted for the key \fx{testdim}. The number of parameter characters normally increases in the macro \fx{\define@keylist} (see \cref{sec:macros-in-keymacros}). After setting the keys, you can do \fx{\show\mp@align} and \fx{\show\KV@fam@testdim} to confirm the above assertions.
The rest of the defined keys can now be set as follows:
\begin{example}
@@ -749,6 +752,10 @@ Instead of using macros to pass key macros and functions, it is also possible to
4,toga,true,\the\temptoksb}
\setkeys[KV]{fam}{boola=true,toga=true}
+
+|comm(You can now test your new function \do:)
+\def\y{x} \def\z{xxx}
+\do\x\x\y\z
\end{example}
\acmd*{\define@keylist}
The advantage of using token list registers is that the parameter characters need not be doubled in the token list registers, unlike when using macros. The token list register \fx{\temptoksa} can be reused as soon as the key \fx{boola} has been set. See \cref{sec:condit-in-macros} for more information on using macros and token list registers to parse key functions.
@@ -758,11 +765,14 @@ The advantage of using token list registers is that the parameter characters nee
The examples in \cref{sec:multkeys-examples} would have provided some glimpse of the rules guiding the use of parameter characters in key macros. The general rules are as follows:
\begin{enum}
-\item When key macros are parsed through token list registers, the parameter characters shouldn't be doubled.
-\item When key macros are parsed via intermediate macros, the parameter characters should be doubled but only once.
-\item In all other cases (\ie, when using \fx{\define@keylist} and its starred variant) the parameter characters should be doubled twice.
+\item When key macros are parsed through token list registers, the parameter characters shouldn't be doubled (\ie, use \cmdtext{\#1} for outermost parameters).
+\item When key macros are parsed via intermediate macros, the parameter characters should be doubled but only once (\ie, use \cmdtext{\#\#1} for outermost parameters).
+\item In all other cases (\ie, when using \fx{\define@keylist} or \acmd{\newkeylist} and their starred variants) the parameter characters should be doubled twice (\ie, use \cmdtext{\#\#\#\#1} for outermost parameters).
+\item Within \fx{\define@keylist} and \fx{\newkeylist}, you can refer to the user-submitted key value by \cmdtext{\#\#1}.
\end{enum}
-\tex will flag a fatal error when any of these rules is breached. The following examples illustrate the use of these rules. The commands \fx{\skif}, \fx{\skifx}, \fx{\skelse} and \fx{\skfi} are described in \cref{sec:pseudo-primitives}.
+\tex will flag a fatal error when any of these rules is breached. The need to double the parameter character arises from setting keys, not when defining keys. When absorbing their arguments, both \fx{\define@keylist} and \fx{\newkeylist} actually temporarily sanitize the parameter character.
+
+The following examples illustrate the use of these rules. The commands \fx{\skif}, \fx{\skifx}, \fx{\skelse} and \fx{\skfi} are described in \cref{sec:pseudo-primitives}.
\begin{example}
\define@keylist{%
tog,toga,true,\iftogon{mp@toga}{%
@@ -825,8 +835,10 @@ The examples in \cref{sec:multkeys-examples} would have provided some glimpse of
\setkeys[KV]{fam}{keyda=xxx,keydb=yyy}
|comm(The next one fails. Why?)
-\define@keylist{ord,keye,unknown,\def\hold##1%
- {\def##1####1{####1}}}
+\define@keylist{%
+ ord,keye,unknown,\def\hold##1{\def##1####1{####1}}%
+}
+\setkeys[KV]{fam}{keye=yyy}
\define@keylist{%
ord,keyfa,xxx,
@@ -1017,13 +1029,16 @@ The key \fx{focus} can now be readily set: \fx{\setkeys[KV]{fam}{focus=left}}.
The approaches of \cref{sec:pseudo-primitives} provide a familiar \tex-like syntax for submitting conditionals to \fx{\define@keylist}. There is yet another approach that we developed. It is related to the native \tex boolean conditional. By \emph{switches} we mean the usual \tex's \fx{\iftrue} and \fx{\iffalse} booleans, but expressed in different syntax and semantics.
-A new switch can be introduced by using the following command:
+New switches can be introduced by using the following commands:
\begin{macro}
\newswitch[|vang(optional prefix)]{|vang(boolean)}[|vang(optional state)]
+\defswitch[|vang(optional prefix)]{|vang(boolean)}[|vang(optional state)]
\end{macro}
-\acmdm*{\newswitch}
-This provides a new native-boolean register \fx{\if}\unskip\ang{prefix}\unskip\ang{boolean} if the register didn't already exist; if the register already existed, an error is flagged. The optional \ang{state} can be either \fx{true} (or \fx{on}) or \fx{false} (or \fx{off}); the switch will be initialized to that state. With this definition, you can issue \fx{\if}\unskip\ang{switch}, \bs\ang{switch}\unskip\fx{true}, and \bs\ang{switch}\unskip\fx{false}. One advantage of \fx{\newswitch} is that a switch can start off as either \fx{true} (or \fx{on}) or \fx{false} (or \fx{off}), unlike the classical \tex's case in which all booleans start off as \fx{false}. Also, switches can be used where primitive \tex conditionals may prove impossible. For example, we know that you can't do \fx{\let\ifabc\iftrue} within the body of a conditional text without hiding the assignment from \tex's scanning mechanism.
+\acmdm*{\newswitch,\defswitch}
+The command \fx{\newswitch} provides a new native-boolean register of the form \fx{\if}\unskip\ang{prefix}\unskip\ang{boolean} if the register didn't already exist; if the register already existed, an error is flagged. The command \fx{\defswitch}, on the other hand, doesn't flag any error even if the switch register \ang{boolean} already existed. Instead it makes an entry (warning or information) in the transcript log file if the package option \fx{verbose} is selected.
+
+The optional \ang{state} can be either \fx{true} (or \fx{on}) or \fx{false} (or \fx{off}); the switch will be initialized to that state. With this definition, you can issue \fx{\if}\unskip\ang{switch}, \bs\ang{switch}\unskip\fx{true}, and \bs\ang{switch}\unskip\fx{false}. One advantage of \fx{\newswitch} is that a switch can start off as either \fx{true} (or \fx{on}) or \fx{false} (or \fx{off}), unlike the classical \tex's case in which all booleans start off as \fx{false}. Also, switches can be used where primitive \tex conditionals may prove impossible. For example, we know that you can't do \fx{\let\ifabc\iftrue} within the body of a conditional text without hiding the assignment from \tex's scanning mechanism.
\begin{example}
\newswitch{boola} |tto \newif\ifboola
@@ -1035,22 +1050,24 @@ This provides a new native-boolean register \fx{\if}\unskip\ang{prefix}\unskip\a
\newswitch[bool]{d}[off] |tto \newif\ifboold \booldfalse
\end{example}
-You can define many switches in a row by the following command:
+You can define many switches in a row by the following commands:
\begin{macro}
\NewSwitches[|vang(optional prefix)]{|vang(switches)}[|vang(optional state)]
+\DefSwitches[|vang(optional prefix)]{|vang(switches)}[|vang(optional state)]
\end{macro}
-\acmdm*{\NewSwitches}
+\acmdm*{\NewSwitches,\DefSwitches}
Each member of \ang{switches} is prefixed with \ang{prefix} upon definition. The optional \ang{state} can be either \fx{true} (or \fx{on}) or \fx{false} (or \fx{off}).
Here are some examples:
\begin{example}
\NewSwitches{x,y,z}[off]
- |tto \newswitch{x}{false} \newswitch{y}{false}
- \newswitch{z}{false}
+ |tto \newswitch{x}[false] \newswitch{y}[false]
+ \newswitch{z}[false]
-\NewSwitches[skv@]{u,w}[true]
- |tto \newswitch{skv@u}{true} \newswitch{skv@w}{true}
+\DefSwitches[skv@]{u,w}[true]
+ |tto \defswitch[skv@]{u}[true] \defswitch[skv@]{w}[true]
+ |tto \defswitch{skv@u}[true] \defswitch{skv@w}[true]
\end{example}
Switches may be set and tested using the following commands:
@@ -1090,12 +1107,6 @@ Switches may be set and tested using the following commands:
\ifswitchoff{y}{\def\yy{Off}}{\def\yy{On}}
\end{example}
-\begin{macro}
-\defswitch[|vang(optional prefix)]{|vang(boolean)}[|vang(optional state)]
-\end{macro}
-\acmdm*{\defswitch}
-This is similar to \fx{\newswitch} but raises no errors even if the register \ang{boolean} already exists.
-
Now how do we use switches in \fx{\define@keylist}? Suppose the key prefix is \fx{KV}, the key family is \fx{fam}, and the key macro is \fx{mp@}. Then the following works:
\begin{example}
\define@keylist{3,swa,true,
@@ -1365,34 +1376,29 @@ Localized keys can be redefined with commands in the \textdefinekey category, bu
The \pkg{xkeyval} bars its users from defining new keys with \fx{XKV} as a prefix. The \pkg{skeyval} generalizes this concept via the following three developer macros:
\begin{macro}
\ReserveKeyPrefixNames{|vang(list)}
+\ReserveKeyPrefixNames|redstar{|vang(list)}
\end{macro}
-\acmdm*{\ReserveKeyPrefixNames}
-This allows the package developer to bar the future use of names appearing in \ang{list} as key prefixes when defining, disabling, reserving and suspending keys; but not when setting keys. The \ang{list}, whose members are comma-separated, can be populated by the package developer as required.
+\acmdm*{\ReserveKeyPrefixNames,\ReserveKeyPrefixNames*}
+This allows the package developer to bar the future use of names appearing in \ang{list} as key prefixes when defining, disabling, reserving and suspending keys; but not when setting keys. The \ang{list}, whose members are comma-separated, can be populated by the package developer as required. The starred variant takes effect at the end of current package; the unstarred one assumes immediate effect. If the developer wants to use any member of \ang{list} in his own package, it may be necessary for him to use the starred version.
\begin{macro}
\ReserveMacroPrefixNames{|vang(list)}
+\ReserveMacroPrefixNames|redstar{|vang(list)}
\end{macro}
-\acmdm*{\ReserveMacroPrefixNames}
-This has a similar functionality to \fx{\ReserveKeyPrefixNames}, but applies to macro prefixes instead of key prefixes.
+\acmdm*{\ReserveMacroPrefixNames,\ReserveMacroPrefixNames*}
+This has a similar functionality to \fx{\ReserveKeyPrefixNames}, but applies to macro prefixes instead of key prefixes. The starred variant takes effect at the end of current package, while the unstarred one assumes immediate effect.
\begin{macro}
\ReserveFamilyNames{|vang(list)}
+\ReserveFamilyNames|redstar{|vang(list)}
\end{macro}
-\acmdm*{\ReserveFamilyNames}
-This reserves family names \ang{list} and prevents further use of members of \ang{list}.
+\acmdm*{\ReserveFamilyNames,\ReserveFamilyNames*}
+This reserves family names \ang{list} and prevents further use of members of \ang{list}. The starred variant takes effect at the end of current package, while the unstarred one assumes immediate effect.
\textbf{Note:} The lists in these macros are scanned only when defining, disabling, reserving or suspending keys, and not when setting existing keys. If the lists were also to be scanned when keys are being set, then a situation could arise in which existing keys (including those defined by prior packages) couldn't be set.
These macros could be used, for instances, to secure against future use the key prefixes, macro prefixes, and key families that have used in a new style or class file. For example, we have used these facilities to bar users of the \pkg{skeyval} from using the key prefix \fx{SKV}, the family name \fx{skeyval}, and the macro prefix \fx{SKV@} to define new keys in their packages.
-\begin{macro}
-\ReserveKeyPrefixNames|redstar{|vang(list)}
-\ReserveMacroPrefixNames|redstar{|vang(list)}
-\ReserveFamilyNames|redstar{|vang(list)}
-\end{macro}
-%\acmd*{\ReserveKeyPrefixNames}
-\acmdm*{\ReserveFamilyNames*,\ReserveKeyPrefixNames*,\ReserveMacroPrefixNames*}
-These starred variants take effect at end of current package; the unstarred ones above assume immediate effect. If the developer wants to use any member of \ang{list} in his own package, it may be necessary for him to use the starred versions.
In addition to the above reservation commands, the \pkg{skeyval} also introduces the following command:
\begin{macro}
@@ -1671,23 +1677,31 @@ New definable variables can be introduced in sets by the following commands.
\begin{macro}
\NewBooleans[|vang(optional prefix)]{|vang(boolean list)}[|vang(optional state)]
+\DefBooleans[|vang(optional prefix)]{|vang(boolean list)}[|vang(optional state)]
\end{macro}
-\acmdm*{\NewBooleans}
-This provides, for each member of the comma-separated list \ang{boolean list}, a new native-boolean register if the register didn't already exist, otherwise an error is flagged. Each member of \ang{boolean list} is prefixed with \ang{prefix} upon definition. The optional \ang{state} can be either \fx{true}, \fx{false}, \fx{on} or \fx{off}. \fx{on} is synonymous with \fx{true}, whilst \fx{off} is equivalent to \fx{false}.
+\acmdm*{\NewBooleans,\DefBooleans}
+The function \fx{\NewBooleans} provides, for each member of the comma-separated list \ang{boolean list}, a new native-boolean register if the register didn't already exist; if the boolean already existed, an error is flagged. \fx{\DefBooleans}, on the other hand, provides, for each member of the comma-separated list \ang{boolean list}, a new native-boolean register whether or not the register already existed. If the boolean already existed, a warning message is logged in the transcript file if the package option \fx{verbose} is enabled.
+
+Each member of \ang{boolean list} is prefixed with \ang{prefix} upon definition. The optional \ang{state} can be either \fx{true}, \fx{false}, \fx{on} or \fx{off}. The state \fx{on} is synonymous with \fx{true}, whilst \fx{off} is equivalent to \fx{false}.
\begin{example}
\NewBooleans[bool]{a,b,c}[true]
|tto \newif\ifboola \newif\ifboolb \newif\ifboolc
\boolatrue \boolbtrue \boolctrue
\NewBooleans{boold} |tto \newif\ifboold
+
+\DefBooleans[skv@]{e,f,g}[false]
+ |tto \newif\ifskv@e \newif\ifskv@f \newif\ifskv@g
+ \skv@efalse \skv@ffalse \skv@gfalse
\end{example}
Notice that members of the list \ang{boolean list} don't have \fx{\if} in their names.
\begin{macro}
\NewTogs[|vang(optional prefix)]{|vang(tog list)}[|vang(optional state)]
+\DefTogs[|vang(optional prefix)]{|vang(tog list)}[|vang(optional state)]
\end{macro}
-\acmdm*{\NewTogs}
-This provides a new toggle register for each member of the comma-separated list \ang{tog list} if the register didn't already exist, otherwise an error is flagged. Each member of \ang{tog list} is prefixed with \ang{prefix} upon definition. The optional \ang{state} can be either \fx{true}, \fx{false}, \fx{on} or \fx{off}. \fx{on} is synonymous with \fx{true}, whilst \fx{off} is equivalent to \fx{false}.
+\acmdm*{\NewTogs,\DefTogs}
+The command \fx{\NewTogs} provides a new toggle register for each member of the comma-separated list \ang{tog list} if the register didn't already exist, otherwise an error is flagged. The command \fx{\DefTogs}, on the other hand, will not raise any error even if the toggle already existed, but (if the package option \fx{verbose} is selected) will instead make an entry in the transcript log file to the effect that the toggle has been redefined. Each member of \ang{tog list} is prefixed with \ang{prefix} upon definition. The optional \ang{state} can be either \fx{true}, \fx{false}, \fx{on} or \fx{off}. The state \fx{on} is synonymous with \fx{true}, whilst \fx{off} is equivalent to \fx{false}.
\begin{example}
\NewTogs[tog]{a,b,c}[true]
|tto \newtog{toga} \newtog{togb} \newtog{togc}
@@ -1698,9 +1712,11 @@ This provides a new toggle register for each member of the comma-separated list
\begin{macro}
\NewToks[|vang(optional prefix)]{|vang(toks list)}
+\DefToks[|vang(optional prefix)]{|vang(toks list)}
\end{macro}
-\acmdm*{\NewToks}\label{page:newtoks}
-This provides a new token list register for each member of the comma-separated list \ang{toks list} if the register didn't already exist, otherwise an error is flagged. Each member of \ang{toks list} is prefixed with \ang{prefix} upon definition.
+\acmdm*{\NewToks,\DefToks}\label{page:newtoks}
+This provides a new token list register for each member of the comma-separated list \ang{toks list} if the register didn't already exist, otherwise an error is flagged. Each member of \ang{toks list} is prefixed with \ang{prefix} upon definition. The command \fx{\DefToks}, on the other hand, will not raise any error even if the token list register already existed, but (if the package option \fx{verbose} is selected) will instead make an entry in the transcript log file to the effect that the register has been redefined.
+
\begin{example}
\NewToks[toks]{a,b,c}
|tto \newtoks\toksa \newtoks\toksb \newtoks\toksc
@@ -1710,21 +1726,24 @@ This provides a new token list register for each member of the comma-separated l
\begin{macro}
\NewCounts[|vang(optional prefix)]{|vang(counter list)}
+\DefCounts[|vang(optional prefix)]{|vang(counter list)}
\end{macro}
-\acmdm*{\NewCounts}
-This provides a new counter register for each member of the comma-separated list \ang{counter list} if the register didn't already exist, otherwise an error is flagged. Each member of \ang{counter list} is prefixed with \ang{prefix} upon definition.
+\acmdm*{\NewCounts,\DefCounts}
+This provides a new counter register for each member of the comma-separated list \ang{counter list} if the register didn't already exist, otherwise an error is flagged. Each member of \ang{counter list} is prefixed with \ang{prefix} upon definition. The command \fx{\DefCounts}, on the other hand, will not raise any error even if the counter already existed, but (if the package option \fx{verbose} is selected) will instead make an entry in the transcript log file to the effect that the counter has been redefined.
\begin{macro}
\NewDimens[|vang(optional prefix)]{|vang(dimen list)}
+\DefDimens[|vang(optional prefix)]{|vang(dimen list)}
\end{macro}
-\acmdm*{\NewDimens}
-This provides a new dimension register for each member of the comma-separated list \ang{dimen list} if the register didn't already exist, otherwise an error is flagged. Each member of \ang{dimen list} is prefixed with \ang{prefix} upon definition.
+\acmdm*{\NewDimens,\DefDimens}
+This provides a new dimension register for each member of the comma-separated list \ang{dimen list} if the register didn't already exist, otherwise an error is flagged. Each member of \ang{dimen list} is prefixed with \ang{prefix} upon definition. The command \fx{\DefDimens}, on the other hand, will not raise any error even if the dimension register already existed, but (if the package option \fx{verbose} is selected) will instead make an entry in the transcript log file to the effect that the register has been redefined.
\begin{macro}
\NewBoxes[|vang(optional prefix)]{|vang(box list)}
+\DefBoxes[|vang(optional prefix)]{|vang(box list)}
\end{macro}
-\acmdm*{\NewBoxes}
-This allocates a new box register for each member of the comma-separated list \ang{box list} if the box register didn't already exist, otherwise an error is flagged. Each member of \ang{box list} is prefixed with \ang{prefix} upon definition.
+\acmdm*{\NewBoxes,\DefBoxes}
+This allocates a new box register for each member of the comma-separated list \ang{box list} if the box register didn't already exist, otherwise an error is flagged. Each member of \ang{box list} is prefixed with \ang{prefix} upon definition. The command \fx{\DefBoxes}, on the other hand, will not raise any error even if the box register already existed, but (if the package option \fx{verbose} is selected) will instead make an entry in the transcript log file to the effect that the register has been redefined.
\begin{example}
\NewBoxes[box]{a,b,c}
@@ -1735,9 +1754,10 @@ This allocates a new box register for each member of the comma-separated list \a
\begin{macro}
\NewWrites[|vang(optional prefix)]{|vang(stream list)}
+\DefWrites[|vang(optional prefix)]{|vang(stream list)}
\end{macro}
-\acmdm*{\NewWrites}
-This allocates a new output stream for each member of the comma-separated list \ang{stream list} if the stream didn't already exist, otherwise an error is flagged. Each member of \ang{stream list} is prefixed with \ang{prefix} upon definition.
+\acmdm*{\NewWrites,\DefWrites}
+This allocates a new output stream for each member of the comma-separated list \ang{stream list} if the stream didn't already exist, otherwise an error is flagged. Each member of \ang{stream list} is prefixed with \ang{prefix} upon definition. The command \fx{\DefWrites}, on the other hand, will not raise any error even if the write stream already existed, but (if the package option \fx{verbose} is selected) will instead make an entry in the transcript log file to the effect that the stream has been redefined.
\begin{example}
\NewWrites[write]{a,b,c}
|tto \newwrite\writea \newwrite\writeb \newwrite\writec
@@ -1747,12 +1767,13 @@ This allocates a new output stream for each member of the comma-separated list \
\begin{macro}
\NewReads[|vang(optional prefix)]{|vang(stream list)}
+\DefReads[|vang(optional prefix)]{|vang(stream list)}
\end{macro}
-\acmdm*{\NewReads}
+\acmdm*{\NewReads,\DefReads}
-This allocates a new input stream for each member of the comma-separated list \ang{stream list} if the stream didn't already exist, otherwise an error is flagged. Each member of \ang{stream list} is prefixed with \ang{prefix} upon definition.
+This allocates a new input stream for each member of the comma-separated list \ang{stream list} if the stream didn't already exist, otherwise an error is flagged. Each member of \ang{stream list} is prefixed with \ang{prefix} upon definition. The command \fx{\DefReads}, on the other hand, will not raise any error even if the read stream already existed, but (if the package option \fx{verbose} is selected) will instead make an entry in the transcript log file to the effect that the stream has been redefined.
-The macros \fx{\NewBooleans}, \fx{\NewToks}, \fx{\NewCounts}, \fx{\NewDimens}, \fx{\NewBoxes}, \fx{\NewWrites}, and \fx{\NewReads} are non-outer, unlike their primitive counterparts.
+The macros \fx{\NewBooleans}, \fx{\DefBooleans}, \fx{\NewToks}, \fx{\DefToks}, \fx{\NewCounts}, \fx{\DefCounts}, \fx{\NewDimens}, \fx{\DefDimens}, \fx{\NewBoxes}, \fx{\DefBoxes}, \fx{\NewWrites}, \fx{\DefWrites}, \fx{\NewReads}, and \fx{\DefReads} are non-outer, unlike their primitive counterparts.
\macrosection{Defining new names}
@@ -1781,9 +1802,12 @@ This is similar to \LaTeX's legacy \acmdm{\@nameuse} but returns \fx{\@empty} (i
\begin{macro}
\SKV@newlet{|vang(cs1)}{|vang(cs2)}
\NewLet{|vang(cs1)}{|vang(cs2)}
+\SKV@newlet|redstar{|vang(cs1)}{|vang(cs2)}
\end{macro}
-\acmdm*{\SKV@newlet,\NewLet}
-These assign \ang{cs2} to \ang{cs1} if \ang{cs2} exists and if \ang{cs1} isn't already defined, otherwise an error is flagged. The command \fx{\NewLet} is defined in the \pkg{skeyval} only if it hasn't been defined by a previously loaded package; the command \fx{\SKV@newlet}, on the other hand, is always available. You can use \acmd{\TestProvidedCommand} (\macref{mac:testprovide}) to test whether or not you are using the \fx{\NewLet} command of the \pkg{skeyval}.
+\acmdm*{\SKV@newlet,\SKV@newlet*,\NewLet}
+The first two of these assign \ang{cs2} to \ang{cs1} if \ang{cs2} exists and if \ang{cs1} isn't already defined, otherwise an error is flagged. \fx{\SKV@newlet}\unskip\redstar\ will assign \ang{cs2} to \ang{cs1} whether or not \ang{cs1} is already defined.
+
+The command \fx{\NewLet} is defined in the \pkg{skeyval} only if it hasn't been defined by a previously loaded package; the command \fx{\SKV@newlet}, on the other hand, is always available. You can use \acmd{\TestProvidedCommand} (\macref{mac:testprovide}) to test whether or not you are using the \fx{\NewLet} command of the \pkg{skeyval}.
\begin{macro}
\SKV@cslet{|vang(name)}{|vang(cs)}
@@ -1804,18 +1828,18 @@ These perform \fx{\let} assignments whether or not the second argument is define
\macrosection{Number and dimension expressions}
\begin{macro}
-\SKV@numdef|redplus|redask{|vang(num)}{|vang(expression)}
+\SKV@numdef|redplus|redclam{|vang(num)}{|vang(expression)}
\end{macro}
\acmdm{\SKV@numdef} defines \ang{num} from \ang{expression} using \etex's \acmd{\numexpr}. If \ang{num} was previously undefined, it is first initialized with \acmd{\newcount} before the expression is built. If you do \fx{\SKV@numdef\x{1+2+3}}, you would need to prefix \fx{\x} with \fx{\the} or \acmd{\number} in expressions. Expressions defined by \fx{\SKV@numdef} can be used with \tex's operators such as \fx{\advance} or \fx{\multiply} and \etex's \acmd{\numexpr} operator.
-The plus sign (\RedPlus) means that \fx{\SKV@numdef} takes a control sequence name instead of a control sequence, while the question mark (\RedAsk) implies that the macro \fx{\SKV@numdef} effects a global assignment which can thus escape local groups.
+The plus sign (\RedPlus) means that \fx{\SKV@numdef} takes a control sequence name instead of a control sequence, while the exclamation mark (\RedClam) implies that the macro \fx{\SKV@numdef} effects a global assignment which can thus escape local groups.
\begin{macro}
-\SKV@dimdef|redplus|redask{|vang(dim)}{|vang(expression)}
+\SKV@dimdef|redplus|redclam{|vang(dim)}{|vang(expression)}
\end{macro}
\acmdm{\SKV@dimdef} defines \ang{dim} from \ang{expression} using \etex's \acmd{\dimexpr}. If \ang{dim} was previously undefined, it is first initialized with \acmd{\newdimen} before the expression is built. If you do \fx{\SKV@dimdef\x{1pt+2pt+3pt}}, you would need to prefix \fx{\x} with \fx{\the} in expressions. Expressions defined by \fx{\SKV@dimdef} can be used with \etex's \acmd{\dimexpr} operator.
-The plus sign (\RedPlus) means that \fx{\SKV@dimdef} takes a control sequence name instead of a control sequence, while the question mark (\RedAsk) implies that the macro \fx{\SKV@dimdef} effects a global assignment which can thus escape local groups.
+The plus sign (\RedPlus) means that \fx{\SKV@dimdef} takes a control sequence name instead of a control sequence, while the exclamation mark (\RedClam) implies that the macro \fx{\SKV@dimdef} effects a global assignment which can thus escape local groups.
\macrosection{Verifying definability}
@@ -1881,29 +1905,29 @@ These test if \ang{cs} or \ang{name} is defined, relaxed, or undefined. In using
\macrosection{Undefining macros}
\begin{macro}
-\SKV@Undef|redstar|redplus|redask[|vang(optional parser)]{|vang(cs)}
+\SKV@Undef|redstar|redplus|redclam[|vang(optional parser)]{|vang(cs)}
\end{macro}
-\acmdm*{\SKV@Undef,\SKV@Undef*,\SKV@Undef*+,\SKV@Undef*+?}
-This undefines the macros or control sequence names in the list \ang{cs} (of nil, one or more elements) such that \tex will subsequently consider each element undefined. The star sign (\RedStar) indicates that \ang{cs} is given as a macro whose \emph{contents} are to be individually undefined, and the plus sign (\RedPlus) shows that \ang{cs} is made up of \emph{control sequence names} instead of control sequences. The question mark (\RedAsk) directs \fx{\SKV@Undef} to \emph{globally} undefine all the control sequences or names in \ang{cs}. Control sequence names are to be separated by the parser; control sequences shouldn't be separated. The default value of the \ang{parser} is ``,'' (comma). The command \fx{\SKV@Undef} is robust (it will thus not expand in expansion contexts), but fragile arguments would need to be protected in expansion contexts.\footnote{Macros such as \acmdm{\@ifnextchar}, \acmdm{\@ifstar}, and those involving optional arguments normally can't be evaluated in expansion contexts. The same applies to the \pkg{skeyval} macros with optional arguments. The \pkgm{etextools} introduced expandable variants of these commands, but in the contexts these commands are employed in the \pkg{skeyval}, the expandable variants aren't particularly advantageous. The main reason is that some of our internal macros (\eg, looping macros) aren't amenable to full expansion anyway. Actually, the \pkg{skeyval} provides the fully expandable variants (\acmdm{\SKV@TestOpt}, \acmdm{\SKV@IfStar}, \acmdm{\SKV@IfPlus}, and \acmdm{\SKV@IfAsk}) of the non-expandable commands \acmdm{\SKV@testopt}, \acmdm{\SKV@ifstar}, \acmdm{\SKV@ifplus}, and \acmdm{\SKV@ifask}. The commands \fx{\SKV@ifask} and \fx{\SKV@IfAsk} look for an optional question mark (\RedAsk).}
+\acmdm*{\SKV@Undef,\SKV@Undef*,\SKV@Undef*+}
+This undefines the macros or control sequence names in the list \ang{cs} (of nil, one or more elements) such that \tex will subsequently consider each element undefined. The star sign (\RedStar) indicates that \ang{cs} is given as a macro whose \emph{contents} are to be individually undefined, and the plus sign (\RedPlus) shows that \ang{cs} is made up of \emph{control sequence names} instead of control sequences. The exclamation mark (\RedClam) directs \fx{\SKV@Undef} to \emph{globally} undefine all the control sequences or names in \ang{cs}. Control sequence names are to be separated by the parser; control sequences shouldn't be separated. The default value of the \ang{parser} is ``,'' (comma). The command \fx{\SKV@Undef} is robust (it will thus not expand in expansion contexts), but fragile arguments would need to be protected in expansion contexts.\footnote{Macros such as \acmdm{\@ifnextchar}, \acmdm{\@ifstar}, and those involving optional arguments normally can't be evaluated in expansion contexts. The same applies to the \pkg{skeyval} macros with optional arguments. The \pkgm{etextools} introduced expandable variants of these commands, but in the contexts these commands are employed in the \pkg{skeyval}, the expandable variants aren't particularly advantageous. The main reason is that some of our internal macros (\eg, looping macros) aren't amenable to full expansion anyway. Actually, the \pkg{skeyval} provides the fully expandable variants (\acmdm{\SKV@TestOpt}, \acmdm{\SKV@IfStar}, \acmdm{\SKV@IfPlus}, and \acmdm{\SKV@IfAsk}) of the non-expandable commands \acmdm{\SKV@testopt}, \acmdm{\SKV@ifstar}, \acmdm{\SKV@ifplus}, and \acmdm{\SKV@ifask}. The commands \fx{\SKV@ifask} and \fx{\SKV@IfAsk} look for an optional question mark (\RedClam).}
\begin{example}
\def\unwanted{tempa,tempb,tempc,temp1}
-\SKV@Undef|redstar|redplus|redask[,]\unwanted
+\SKV@Undef|redstar|redplus|redclam[,]\unwanted
\def\unwanted{t1emp,te2mp,tem3p}
-\SKV@Undef|redstar|redplus|redask[,]\unwanted
+\SKV@Undef|redstar|redplus|redclam[,]\unwanted
-\SKV@Undef|redplus|redask[;]{tempd;tempe;tempf}
+\SKV@Undef|redplus|redclam[;]{tempd;tempe;tempf}
\SKV@Undef\tempe
-\SKV@Undef|redask{\tempea\tempeb\tempec\temped}
+\SKV@Undef|redclam{\tempea\tempeb\tempec\temped}
\SKV@Undef|redplus{tempf}
-\SKV@Undef|redask\tempg
+\SKV@Undef|redclam\tempg
\def\notwanted{\temph\tempi\tempj}
@@ -1913,9 +1937,9 @@ This undefines the macros or control sequence names in the list \ang{cs} (of nil
The following non-generic variants avoid the above complications of signs, but they don't take lists:
\begin{macro}
\SKV@undef{|vang(cs)} |tto \SKV@Undef{|vang(cs)}
-\SKV@gundef{|vang(cs)} |tto \SKV@Undef|redask{|vang(cs)}
+\SKV@gundef{|vang(cs)} |tto \SKV@Undef|redclam{|vang(cs)}
\SKV@csundef{|vang(cs name)} |tto \SKV@Undef|redplus{|vang(cs)}
-\SKV@csgundef{|vang(cs name)} |tto \SKV@Undef|redplus|redask{|vang(cs)}
+\SKV@csgundef{|vang(cs name)} |tto \SKV@Undef|redplus|redclam{|vang(cs)}
\end{macro}
\acmdm*{\SKV@undef,\SKV@gundef,\SKV@csundef,\SKV@csgundef}
@@ -1928,9 +1952,9 @@ The following non-generic variants avoid the above complications of signs, but t
This expands its argument \ang{cs} once and forbids further expansion.
\begin{macro}
-\SKV@expcsox{|vang(name)}
+\SKV@csexpox{|vang(name)}
\end{macro}
-\acmdm*{\SKV@expcsox}
+\acmdm*{\SKV@csexpox}
This is similar to \fx{\SKV@expox} but accepts control sequence name \ang{name} instead of control sequence.
\begin{macro}
@@ -1940,9 +1964,9 @@ This is similar to \fx{\SKV@expox} but accepts control sequence name \ang{name}
This expands its argument \ang{cs} twice and forbids further expansion.
\begin{macro}
-\SKV@expcstx{|vang(name)}
+\SKV@csexptx{|vang(name)}
\end{macro}
-\acmdm*{\SKV@expcstx}
+\acmdm*{\SKV@csexptx}
This is similar to \fx{\SKV@exptx} but accepts control sequence name \ang{name} instead of control sequence.
\begin{macro}
@@ -2155,13 +2179,14 @@ This will issue an error at start of document if any member of the comma-separat
\macrosection{Commands restricted to package and preamble}
\begin{macro}
-\SKV@onlypreamble{|vang(list)}
+\SKV@onlypreamble|redplus{|vang(list)}
\SKV@onlypackage
\end{macro}
\acmdm*{\SKV@onlypreamble,\SKV@onlypackage}
-The \latex kernel's macro \fx{\@onlypreamble} accepts only one command at a time (\ie, you can't give it a list of preamble commands in one go), and the error message \acmdm{\@notprerr} is not that precise, since it doesn't indicate the command that has been wrongly placed in the document's body. The use of \fx{\@onlypreamble} in a style or class file can be monotonous if the file has many preamble commands. The macro \fx{\SKV@onlypreamble} takes a no-comma \ang{list} of commands at once and gives precise error messages related to the incorrectly located commands. The \ang{list} may be populated with nil, one, or more control sequences, \eg,
+The \latex kernel's macro \fx{\@onlypreamble} accepts only one command at a time (\ie, you can't give it a list of preamble commands in one go), and the error message \acmdm{\@notprerr} is not that precise, since it doesn't indicate the command that has been wrongly placed in the document's body. The use of \fx{\@onlypreamble} in a style or class file can be monotonous if the file has many preamble commands. The macro \fx{\SKV@onlypreamble} takes a comma-separated list \ang{list} of commands at once and gives precise error messages related to the incorrectly located commands. The \ang{list} may be populated with nil, one, or more control sequences. The plus sign~(\RedPlus) means that elements of \ang{list} are control sequence names instead of control sequences.
\begin{example}
-\SKV@onlypreamble{\macroa \macrob \macroc}
+\SKV@onlypreamble{\macroa, \macrob, \macroc}
+\SKV@onlypreamble|redplus{macroa, macrob, macroc}
\end{example}
All preamble commands can be collected together in one \fx{\SKV@onlypreamble}, preferably at the end of the style or class file.
@@ -2290,52 +2315,52 @@ These are equivalent to \fx{\SKV@tfor@a} and \fx{\SKV@tfor@b} respectively.
\macrosubsection{Hooking to user-defined macros}
\begin{macro}
-\SKV@appto|redstar|redplus|redask|vang(cs){|vang(content)}
+\SKV@appto|redstar|redplus|redclam|vang(cs){|vang(content)}
\end{macro}
-\acmdm*{\SKV@appto,\SKV@appto*,\SKV@appto*+,\SKV@appto*+?}
-This appends \ang{content} to \ang{cs}. If \ang{cs} was previously undefined, it is initialized with \ang{content}. The star (\RedStar) sign directs \fx{\SKV@appto} to expand \ang{content} once before appending \ang{content} to \ang{cs}. The plus (\RedPlus) sign means that \ang{cs} is a control sequence name instead of a control sequence, while the question mark (\RedAsk) instructs \fx{\SKV@appto} to append \ang{content} to \ang{cs} globally (to escape local groups). This command is robust, but fragile arguments must be protected in expansion contexts.
+\acmdm*{\SKV@appto,\SKV@appto*,\SKV@appto*+}
+This appends \ang{content} to \ang{cs}. If \ang{cs} was previously undefined, it is initialized with \ang{content}. The star (\RedStar) sign directs \fx{\SKV@appto} to expand \ang{content} once before appending \ang{content} to \ang{cs}. The plus (\RedPlus) sign means that \ang{cs} is a control sequence name instead of a control sequence, while the exclamation mark (\RedClam) instructs \fx{\SKV@appto} to append \ang{content} to \ang{cs} globally (to escape local groups). This command is robust, but fragile arguments must be protected in expansion contexts.
-Except for the initialization of undefined \ang{cs}, \fx{\SKV@appto}\redask\ is equivalent to \latex's \acmdm{\g@addto@macro}.
+Except for the initialization of undefined \ang{cs}, \fx{\SKV@appto}\redclam\ is equivalent to \latex's \acmdm{\g@addto@macro}.
The following non-generic, less powerful, forms of \fx{\SKV@appto} are also available, but they don't have the starred (\RedStar) variants:
\begin{macro}
\apptomac|vang(cs){|vang(content)}
|tto \SKV@appto|vang(cs){|vang(content)}
\gapptomac|vang(cs){|vang(content)}
- |tto \SKV@appto|redask|vang(cs){|vang(content)}
+ |tto \SKV@appto|redclam|vang(cs){|vang(content)}
\csapptomac{|vang(name)}{|vang(content)}
|tto \SKV@appto|redplus{|vang(name)}{|vang(content)}
\csgapptomac{|vang(name)}{|vang(content)}
- |tto \SKV@appto|redplus|redask{|vang(name)}{|vang(content)}
+ |tto \SKV@appto|redplus|redclam{|vang(name)}{|vang(content)}
\end{macro}
\acmdm*{\apptomac,\gapptomac,\csapptomac,\csgapptomac}
\bigskip
\begin{macro}
-\SKV@prepto|redstar|redplus|redask|vang(cs){|vang(content)}
+\SKV@prepto|redstar|redplus|redclam|vang(cs){|vang(content)}
\end{macro}
-\acmdm*{\SKV@prepto,\SKV@prepto*,\SKV@prepto*+,\SKV@prepto*+?}
-This prepends \ang{content} to \ang{cs}. If \ang{cs} was previously undefined, it is initialized with \ang{content}. The star (\RedStar) sign directs \fx{\SKV@prepto} to expand \ang{content} once before prepending it to \ang{cs}. The plus (\RedPlus) sign means that \ang{cs} is a control sequence name instead of a control sequence, while the question mark (\RedAsk) instructs \fx{\SKV@prepto} to prepend \ang{content} to \ang{cs} globally (to escape local groups). This command is robust, but fragile arguments must be protected in expansion contexts.
+\acmdm*{\SKV@prepto,\SKV@prepto*,\SKV@prepto*+}
+This prepends \ang{content} to \ang{cs}. If \ang{cs} was previously undefined, it is initialized with \ang{content}. The star (\RedStar) sign directs \fx{\SKV@prepto} to expand \ang{content} once before prepending it to \ang{cs}. The plus (\RedPlus) sign means that \ang{cs} is a control sequence name instead of a control sequence, while the exclamation mark (\RedClam) instructs \fx{\SKV@prepto} to prepend \ang{content} to \ang{cs} globally (to escape local groups). This command is robust, but fragile arguments must be protected in expansion contexts.
Again, the following non-generic versions of \fx{\SKV@prepto} are available, but they don't have the starred (\RedStar) variants:
\begin{macro}
\preptomac|vang(cs){|vang(content)}
|tto \SKV@prepto|vang(cs){|vang(content)}
\gpreptomac|vang(cs){|vang(content)}
- |tto \SKV@prepto|redask|vang(cs){|vang(content)}
+ |tto \SKV@prepto|redclam|vang(cs){|vang(content)}
\cspreptomac{|vang(name)}{|vang(content)}
|tto \SKV@prepto|redplus{|vang(name)}{|vang(content)}
\csgpreptomac{|vang(name)}{|vang(content)}
- |tto \SKV@prepto|redplus|redask{|vang(name)}{|vang(content)}
+ |tto \SKV@prepto|redplus|redclam{|vang(name)}{|vang(content)}
\end{macro}
\acmdm*{\preptomac,\gpreptomac,\cspreptomac,\csgpreptomac}
\bigskip
\begin{macro}
-\SKV@addtolist|redplus|redask|redleft[|vang(parser)]|vang(csa)|vang(csb)
+\SKV@addtolist|redplus|redclam|redleft[|vang(parser)]|vang(csa)|vang(csb)
\end{macro}
-\acmdm*{\SKV@addtolist,\SKV@addtolist+,\SKV@addtolist+?,\SKV@addtolist+?<}
-This adds the contents of the macro \ang{csb} to the list in the container \ang{csa}. The plus sign~(\RedPlus) means that \ang{csa} is a control sequence name (instead of a control sequence); the question mark~(\RedAsk) directs \fx{\SKV@addtolist} to add the contents of \ang{csb} to \ang{csa} globally (to escape local groups); and the left angle (\RedLeft), if present, instructs \fx{\SKV@addtolist} to prepend the contents of \ang{csb} to the left of the contents of \ang{csa}, instead of appending to the right by default. The optional argument \ang{parser} is the list parser, ie, the separator of the instances in \ang{csa}. Its default value is ``,'' (comma).
+\acmdm*{\SKV@addtolist,\SKV@addtolist+,\SKV@addtolist+<}
+This adds the contents of the macro \ang{csb} to the list in the container \ang{csa}. The plus sign~(\RedPlus) means that \ang{csa} is a control sequence name (instead of a control sequence); the exclamation mark~(\RedClam) directs \fx{\SKV@addtolist} to add the contents of \ang{csb} to \ang{csa} globally (to escape local groups); and the left angle (\RedLeft), if present, instructs \fx{\SKV@addtolist} to prepend the contents of \ang{csb} to the left of the contents of \ang{csa}, instead of appending to the right by default. The optional argument \ang{parser} is the list parser, ie, the separator of the instances in \ang{csa}. Its default value is ``,'' (comma).
\macrosubsection{Package and document hooks}
@@ -2450,11 +2475,8 @@ The following change history highlights significant changes that affect user uti
\define@biuniboolkeys,\newbiuniboolkeys,\define@biunitogkeys,\newbiunitogkeys}
\item Provided mechanisms for disabling, localizing, reserving, unreserving, suspending, restoring, and removing keys \secref{sec:disable-reserv-keys}
-
\item Redefined a few of \pkg{xkeyval}'s internal macros \xsecref
-
\item Normalization of key-value lists before parsing \secref{sec:list-normal}
-
\item Included some developer macros \secref{sec:misce-commands}
\end{version}
@@ -2487,32 +2509,36 @@ The following change history highlights significant changes that affect user uti
\@ensurepackageloaded}
\item Alert the user if \pkg{skeyval} is loaded before \acmd{\documentclass} \secref{sec:loading-package}
-
\item Introduced ``user-value'' keys \secref{sec:uservaluekeys}
-
\item Extended the pointer system of the \pkg{xkeyval} \secref{sec:pointer-mech}
\item Corrected a bug in the \pkg{xkeyval} which, if \acmd{\setkeys} is nested in a class file, gives non-empty \acmdm{\@unusedoptionlist} even if all the options of \acmd{\documentclass} have been used \xsecref
\end{version}
\begin{version}{0.7}{2010/05/05}
\item Native-boolean and toggle-boolean keys now accept \fx{on} and \fx{off} as values,
- in addition to \fx{true} and \fx{false} \secref*{sec:toggle-booleans}{sec:switches}
-
+ in addition to \fx{true} and \fx{false} \secref*{sec:toggle-booleans}{sec:switches}
\item Replaced the former \acmd{\NewIfs} with \acmd{\NewBooleans} and redefined \fx{\NewIfs} \secref{sec:biboolkeys}
-
\item Introduced \acmd{\DeclareKeyCommand} \xsecref
\end{version}
\begin{version}{0.71}{2010/05/06}
\item Corrected a bug in one of the internal conditional tests \xsecref
-
\item Removed \fx{\DeclareKeyCommand} to create a separate \pkg{skeycommand} \xsecref
+ \end{version}
+ \begin{version}{0.72}{2010/05/21}
+ \item The parameter character is made temporarily innocent when the arguments of \fx{\define@keylist} and \fx{\newkeylist} are being absorbed \secref{sec:def-multiple-keys}
+ \item Debugged why, \eg, \fx{#1} in the following definition would refer to the wrong quantity in the \pkg{xkeyval}:
+ \xsecref
+ \begin{veritem}
+ \define@boolkey[KV]{fam}[mp@]{keya}[true]{\def\x{#1}}
+ \end{veritem}
\end{version}
\end{versionhist}
+\newpage
\IndexPreamble{Index numbers refer to page numbers.}
\IndexPreambleFormat{\centering}
\IndexColumns\tw@
diff --git a/Master/texmf-dist/tex/latex/skeyval/skeyval.sty b/Master/texmf-dist/tex/latex/skeyval/skeyval.sty
index 78727c65eb1..e82d269e76f 100644
--- a/Master/texmf-dist/tex/latex/skeyval/skeyval.sty
+++ b/Master/texmf-dist/tex/latex/skeyval/skeyval.sty
@@ -1,6 +1,6 @@
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%
% %
-% This is file 'skeyval.sty', version 0.71. %
+% This is file 'skeyval.sty', version 0.72. %
% %
% This package and accompanying files may be distributed and/or %
% modified under the conditions of the LaTeX Project Public License, %
@@ -49,10 +49,12 @@
\AtEndOfPackage{%
\SKV@AfterPackageEnd{%
\SKV@restorecodes
- \SKV@Undef?{\SKV@setcode\SKV@restorecodes}%
+ \SKV@Undef!{\SKV@setcode\SKV@restorecodes}%
}%
}
\SKV@setcode{010}{12}% ^^J
+\SKV@setcode{032}{10}% SP
+\SKV@setcode{033}{12}% !
\SKV@setcode{036}{03}% $
\SKV@setcode{038}{03}% &
\SKV@setcode{040}{12}% (
@@ -64,6 +66,8 @@
\SKV@setcode{047}{12}% /
\SKV@setcode{058}{12}% :
\SKV@setcode{059}{12}% ;
+\SKV@setcode{060}{12}% >
+\SKV@setcode{062}{12}% <
\SKV@setcode{063}{12}% ?
\SKV@setcode{091}{12}% [
\SKV@setcode{093}{12}% ]
@@ -71,7 +75,7 @@
\SKV@setcode{126}{13}% ~
\def\SKV@rcsid$#1: #2 #3 #4 #5${#4 v#3}
\ProvidesPackage{skeyval}[%
- \SKV@rcsid $Id: skeyval.sty,v 0.71 2010/05/05 09:00:00 Ahmed Musa $
+ \SKV@rcsid $Id: skeyval.sty,v 0.72 2010/05/21 09:00:00 Ahmed Musa $
Extensions to the xkeyval parser (AM)
]
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
@@ -86,6 +90,7 @@
\newcount\SKV@depth
\protected\def\@nil{\@nil}
\def\@nnil{\@nil}
+\def\@space{ }
\long\def\@firstofthree#1#2#3{#1}
\long\def\@secondofthree#1#2#3{#2}
\long\def\@thirdofthree#1#2#3{#3}
@@ -117,9 +122,7 @@
\def\SKV@unifdefined#1{\@nameuse{SKV@\SKV@ifdefined{#1}{2}{1}of2}}
\def\SKV@ifcsname#1{\@nameuse{SKV@\ifcsname#1\endcsname1\else2\fi of2}}
\def\SKV@unifcsname#1{\@nameuse{SKV@\SKV@ifcsname{#1}{2}{1}of2}}
-\def\SKV@iftest#1#2{\@nameuse{if#1}#2\relax\expandafter\@firstoftwo
- \else\expandafter\@secondoftwo\fi}
-\def\SKV@uniftest#1#2{\SKV@iftest{#1}{#2}\@secondoftwo\@firstoftwo}
+\def\SKV@ifnum#1#2#3{\@nameuse{SKV@\ifnum#1#2#3 1\else2\fi of2}}
\protected\def\SKV@AtEndAfterPackageEnd#1{\AtEndOfPackage
{\SKV@AfterPackageEnd{#1}}}
\begingroup
@@ -176,29 +179,35 @@
\SKV@ifx{#1}\relax{\aftergroup\@firstofone}%
{\aftergroup\SKV@notdefinable}%
}{%
- \edef\resvd@b{\expandafter\SKV@carcube\resvd@a xxx\@nil}%
- \SKV@ifx\resvd@b\@qend{\aftergroup\SKV@notdefinable}%
- {\SKV@ifx\resvd@a\@qrelax{\aftergroup\SKV@notdefinable}%
- {\aftergroup\@firstofone}}%
+ \edef\resvd@b{\unexpanded\expandafter{\csname end\resvd@a\endcsname}}%
+ \expandafter\SKV@ifx\resvd@b\relax{%
+ \SKV@ifx\resvd@a\@qrelax{\aftergroup\SKV@notdefinable}%
+ {\aftergroup\@firstofone}
+ }{\aftergroup\SKV@notdefinable}%
}%
\endgroup
}
\def\SKV@csifdefinable#1{\begingroup\expandafter\endgroup
\expandafter\SKV@ifdefinable\csname#1\endcsname}
\newcommand*\@ifpackagecurrent[2]{%
- \@nameuse{SKV@\SKV@iftest{num}{\SKV@threexp\@parse@version
+ \@nameuse{SKV@\ifnum\SKV@threexp\@parse@version
\csname ver@#1.\@pkgextension\endcsname//00\@nil
- <\expandafter\@parse@version#2//00\@nil}{2}{1}of2}}
+ <\expandafter\@parse@version#2//00\@nil2\else1\fi of2}%
+}
\newcommand*\@ifpackagenotcurrent[2]{%
\@nameuse{SKV@\@ifpackagecurrent{#1}{#2}{2}{1}of2}}
-\@ifpackageloaded{xkeyval}{%
- \@ifpackagecurrent{xkeyval}{2008/08/13}{}{%
- \PackageError{skeyval}{Your loaded version of xkeyval
- package is not current}{You need version 2.6a
- (or higher) of xkeyval package.
- }%
- \endinput
- }%
+\newcommand*\@ifloadedandcurrent[2]{%
+ \begingroup
+ \@ifpackageloaded{#1}{%
+ \@ifpackagecurrent{#1}{#2}{\aftergroup\@firstofthree}{%
+ \aftergroup\@secondofthree}}{\aftergroup\@thirdofthree}%
+ \endgroup
+}
+\@ifloadedandcurrent{xkeyval}{2008/08/13}{}{%
+ \PackageError{skeyval}%
+ {Your loaded version of xkeyval package is not current}%
+ {You need version 2.6a (or higher) of xkeyval package.}%
+ \endinput
}{\RequirePackage{xkeyval}[2008/08/13]}
\newcommand*\SKV@ifdefinable@n[1]{%
\XKV@sp@deflist\SKV@tempa{#1}%
@@ -212,62 +221,56 @@
\SKV@csifdefinable\SKV@tempa\relax
}%
}
-\SKV@ifdefinable@n{SKV@def,SKV@@def,SKV@pdef,SKV@@pdef,
- SKV@gdef,SKV@@gdef,SKV@pgdef,SKV@@pgdef,SKV@edef,
- SKV@@edef,SKV@pedef,SKV@@pedef,SKV@redef,SKV@@redef,
- SKV@csredef,SKV@predef,SKV@@predef,SKV@cspredef,
- SKV@providedef,SKV@@providedef,SKV@providerobustdef,
- SKV@@providerobustdef
-}
-\protected\def\SKV@def{\@star@or@long\SKV@@def}
-\def\SKV@@def#1{\SKV@ifdefinable#1{\l@ngrel@x\def#1}}
-\protected\def\SKV@gdef{\@star@or@long\SKV@@gdef}
-\def\SKV@@gdef#1{\SKV@ifdefinable#1{\l@ngrel@x\gdef#1}}
-\protected\def\SKV@edef{\@star@or@long\SKV@@edef}
-\def\SKV@@edef#1{\SKV@ifdefinable#1{\l@ngrel@x\edef#1}}
-\protected\def\SKV@pdef{\@star@or@long\SKV@@pdef}
-\def\SKV@@pdef#1{\SKV@ifdefinable#1{\l@ngrel@x\protected\def#1}}
-\protected\def\SKV@pgdef{\@star@or@long\SKV@@pgdef}
-\def\SKV@@pgdef#1{\SKV@ifdefinable#1{\l@ngrel@x\protected\gdef#1}}
-\protected\def\SKV@pedef{\@star@or@long\SKV@@pedef}
-\def\SKV@@pedef#1{\SKV@ifdefinable#1{\l@ngrel@x\protected\edef#1}}
-\protected\def\SKV@pxdef{\@star@or@long\SKV@@pxdef}
-\def\SKV@@pxdef#1{\SKV@ifdefinable#1{\l@ngrel@x\protected\xdef#1}}
-\protected\def\SKV@redef{\@star@or@long\SKV@@redef}
-\def\SKV@@redef#1{%
+\SKV@ifdefinable@n{SKV@def,SKV@d@f,SKV@pdef,SKV@pd@f}
+\protected\def\SKV@def{\@star@or@long\SKV@d@f}
+\def\SKV@d@f#1{\SKV@ifdefinable#1{\l@ngrel@x\def#1}}
+\protected\def\SKV@pdef{\@star@or@long\SKV@pd@f}
+\def\SKV@pd@f#1{\SKV@ifdefinable#1{\l@ngrel@x\protected\def#1}}
+\SKV@pdef*\SKV@gdef{\@star@or@long\SKV@gd@f}
+\SKV@def*\SKV@gd@f#1{\SKV@ifdefinable#1{\l@ngrel@x\gdef#1}}
+\SKV@pdef*\SKV@edef{\@star@or@long\SKV@ed@f}
+\SKV@def*\SKV@ed@f#1{\SKV@ifdefinable#1{\l@ngrel@x\edef#1}}
+\SKV@pdef*\SKV@pgdef{\@star@or@long\SKV@pgd@f}
+\SKV@def*\SKV@pgd@f#1{\SKV@ifdefinable#1{\l@ngrel@x\protected\gdef#1}}
+\SKV@pdef*\SKV@pedef{\@star@or@long\SKV@ped@f}
+\SKV@def*\SKV@ped@f#1{\SKV@ifdefinable#1{\l@ngrel@x\protected\edef#1}}
+\SKV@pdef*\SKV@pxdef{\@star@or@long\SKV@pxd@f}
+\SKV@def*\SKV@pxd@f#1{\SKV@ifdefinable#1{\l@ngrel@x\protected\xdef#1}}
+\SKV@pdef*\SKV@redef{\@star@or@long\SKV@red@f}
+\SKV@def*\SKV@red@f#1{%
\SKV@ensurescape{#1}%
\SKV@unifdefined{#1}{}{%
\SKV@ifx{#1}\relax{}{%
- \SKV@vbsmsg{info}{Command '\string#1' redefined\on@line}%
+ \SKV@vbmsg{info}{Command '\string#1' redefined\on@line}%
}%
}%
\l@ngrel@x\def#1%
}
-\protected\def\SKV@csredef{\SKV@aftercs\SKV@redef}
-\protected\def\SKV@predef{\@star@or@long\SKV@@predef}
-\def\SKV@@predef#1{%
+\SKV@pdef*\SKV@csredef{\SKV@aftercs\SKV@redef}
+\SKV@pdef*\SKV@predef{\@star@or@long\SKV@pred@f}
+\SKV@def*\SKV@pred@f#1{%
\SKV@ensurescape{#1}%
\SKV@unifdefined{#1}{}{%
\SKV@ifx{#1}\relax{}{%
- \SKV@vbsmsg{info}{Command '\string#1' redefined\on@line}%
+ \SKV@vbmsg{info}{Command '\string#1' redefined\on@line}%
}%
}%
\l@ngrel@x\protected\def#1%
}
-\protected\def\SKV@cspredef{\SKV@aftercs\SKV@predef}
-\SKV@def\SKV@vbsmsg#1#2{%
+\SKV@pdef*\SKV@cspredef{\SKV@aftercs\SKV@predef}
+\SKV@def*\SKV@vbmsg#1#2{%
\begingroup
\def\@i{info}\def\@ii{warn}\def\@iii{#1}%
- \csname SKV@\ifSKV@verbose1\else2\fi of2\endcsname
+ \@nameuse{SKV@\ifSKV@verbose1\else2\fi of2}%
{\SKV@ifx\@i\@iii
{\SKV@info{#2}}%
{\SKV@ifx\@ii\@iii{\SKV@warn{#2}}{}}%
}{}%
\endgroup
}
-\define@boolkeys[KV]{skeyval@i}[SKV@]{tempsw,st,pl,ask,rt,
- lt,sk,loc,uv}[true]
-\setkeys[KV]{skeyval@i}{tempsw,st,pl,ask,rt,lt,sk,loc,uv}
+\define@boolkeys[KV]{skeyval@i}[SKV@]{st,pl,cl,rt,
+ lt,sw,sk,loc,uv}[true]
+\setkeys[KV]{skeyval@i}{st,pl,cl,rt,lt,sw,sk,loc,uv}
\define@boolkey+[KV]{skeyval}[SKV@]{verbose}[true]{}{%
\SKV@inputerr{#1}{verbose}%
}
@@ -279,16 +282,22 @@
\SKV@pdef\SKV@afterfi#1\fi{\fi#1}
\SKV@pdef\SKV@afterelsefi#1\else#2\fi{\fi#1}
\SKV@pdef\SKV@afterfifi#1\fi#2\fi{\fi#2\fi#1}
+\SKV@def*\SKV@badargerr#1#2{%
+ \SKV@err{Invalid #2 argument for command '\@backslashchar#1'}%
+ {Bad #2 argument for command '\@backslashchar#1'.\SKV@MB
+ You need to look again at user instruction\SKV@MB
+ for command '\@backslashchar#1'.}%
+}
\SKV@def*\SKV@state#1#2#3{%
\ifcase#1\relax
\def\SKV@ste{XKV@prefix,XKV@fams,XKV@tkey,XKV@na,ifXKV@st,%
ifXKV@pl,ifXKV@knf,CurrentOption,ifSKV@sk}%
\SKV@ifempty{#3}{\advance\XKV@depth\@ne}{}%
\or
- \def\SKV@ste{ifSKV@st,ifSKV@pl,ifSKV@ask,ifSKV@rt,ifSKV@lt}%
+ \def\SKV@ste{ifSKV@st,ifSKV@pl,ifSKV@cl,ifSKV@rt,ifSKV@lt}%
\SKV@ifempty{#3}{\advance\SKV@depth\@ne}{}%
\else
- \SKV@err{Unknown state identifier}%
+ \SKV@err{Unknown state identifier '#1'}%
{I expected '\string#1' to be number 0 or 1.}%
\fi
\XKV@for@o\SKV@ste\SKV@ste{%
@@ -305,24 +314,53 @@
\SKV@def*\SKV@savstate{\SKV@state{1}{@\romannumeral\SKV@depth}{}}
\SKV@def*\SKV@resstate{\SKV@state{1}{}{@\romannumeral\SKV@depth}}
\def\XKV@srstate#1#2{\SKV@state{0}{#1}{#2}}
-\SKV@def*\SKV@scantoksa{\SKV@testopt\SKV@sc@ntoksa{,}}
+\SKV@def*\SKV@scantoksa{\SKV@savstate\SKV@testoptf\SKV@sc@ntoksa}
\SKV@def\SKV@sc@ntoksa[#1]#2{%
+ \ifSKV@cl\let\gl@l@x\global\else\let\gl@l@x\relax\fi
\SKV@for[#1]{#2}\SKV@resvda{%
- \SKV@expnext\SKV@ensurescape\SKV@resvda
+ \ifSKV@pl
+ \SKV@ifcsdef\SKV@resvda{}{%
+ \SKV@err{Command '\SKV@csexpox\SKV@resvda' undefined}%
+ {I can't scan contents of undefined command
+ '\SKV@csexpox\SKV@resvda'}%
+ }%
+ \SKV@expnext\SKV@ensurenoscape\SKV@resvda
+ \expandafter\let\expandafter\SKV@resvdb%
+ \csname\SKV@resvda\endcsname
+ \else
+ \expandafter\SKV@ifdef\SKV@resvda{}{%
+ \SKV@err{Command '\SKV@expox\SKV@resvda' undefined}%
+ {I can't scan contents of undefined command
+ '\SKV@expox\SKV@resvda'}%
+ }%
+ \SKV@expnext\SKV@ensurescape\SKV@resvda
+ \expandafter\let\expandafter\SKV@resvdb\SKV@resvda
+ \fi
+ \SKV@noexpparse\SKV@resvdb
\begingroup
- \let\@xp\expandafter
- \edef\SKV@resvdb##1##2{##1{##2{\SKV@expox\SKV@resvda}}}%
- \everyeof{\noexpand}\endlinechar\m@ne
- \SKV@resvdb{\@xp\xdef\SKV@resvda}{\scantokens\@xp}%
+ \edef\SKV@resvdb##1##2{##1{##2{\SKV@expox\SKV@resvdb}}}%
+ \everyeof{\noexpand}\endlinechar\m@ne\makeatletter
+ \SKV@resvdb{\xdef\SKV@resvdb}{\scantokens\expandafter}%
\endgroup
+ \ifSKV@pl
+ \gl@l@x\SKV@aftercs\let\SKV@resvda\SKV@resvdb
+ \else
+ \gl@l@x\expandafter\let\SKV@resvda\SKV@resvdb
+ \fi
}%
+ \SKV@resstate
}
-\SKV@def*\SKV@emptycmds{\SKV@savstate\SKV@testoptd\SKV@em@tycmds}
+\SKV@def*\SKV@emptycmds{\SKV@savstate\SKV@testoptf\SKV@em@tycmds}
\SKV@def\SKV@em@tycmds[#1]#2{%
- \ifSKV@st\let\glob@lrel@x\global\else\let\glob@lrel@x\relax\fi
+ \ifSKV@cl\let\gl@l@x\global\else\let\gl@l@x\relax\fi
\SKV@for[#1]{#2}\SKV@resvda{%
- \SKV@expnext\SKV@ensurescape\SKV@resvda
- \glob@lrel@x\expandafter\let\SKV@resvda\@empty
+ \ifSKV@pl
+ \SKV@expnext\SKV@ensurenoscape\SKV@resvda
+ \gl@l@x\SKV@aftercs\let\SKV@resvda\@empty
+ \else
+ \SKV@expnext\SKV@ensurescape\SKV@resvda
+ \gl@l@x\expandafter\let\SKV@resvda\@empty
+ \fi
}%
\SKV@resstate
}
@@ -348,10 +386,14 @@
\SKV@pdef\SKV@expargs#1#2#3#4\@nil{%
\begingroup
\protected@edef\SKV@tempa{\endgroup
- \ifcase#1\relax\unexpanded{#2}{#3}%
- \or\unexpanded{#2#3}{#4}%
- \or\unexpanded{#2}{#3}{#4}%
- \or\unexpanded{#2}#3\unexpanded{#4}%
+ \ifcase#1\relax
+ \unexpanded{#2}{#3}%
+ \or
+ \unexpanded{#2#3}{#4}%
+ \or
+ \unexpanded{#2}{#3}{#4}%
+ \or
+ \unexpanded{#2}#3\unexpanded{#4}%
\else
\SKV@err{Unknown expansion type '\string#1' for
\string\SKV@expargs}{I expected your first
@@ -393,6 +435,7 @@
\SKV@pdef*\SKV@ifstar{\SKV@ifchar{*}}
\SKV@pdef*\SKV@ifplus{\SKV@ifchar{+}}
\SKV@pdef*\SKV@ifask{\SKV@ifchar{?}}
+\SKV@pdef*\SKV@ifclam{\SKV@ifchar{!}}
\SKV@pdef*\SKV@ifright{\SKV@ifchar{>}}
\SKV@pdef*\SKV@ifleft{\SKV@ifchar{<}}
\SKV@pdef*\SKV@if@brack#1#2{\SKV@ifnextchar[{#1}{#2}}
@@ -402,7 +445,7 @@
\SKV@pdef*\SKV@testopta#1{\SKV@t@stopta{\SKV@t@st@pta{#1}}}
\SKV@pdef*\SKV@t@stopta#1{\SKV@ifstar{\SKV@sttrue#1}{\SKV@stfalse#1}}
\SKV@pdef*\SKV@t@st@pta#1{\SKV@ifplus{\SKV@pltrue#1}{\SKV@plfalse#1}}
-\SKV@pdef*\SKV@t@st@p@a#1{\SKV@ifask{\SKV@asktrue#1}{\SKV@askfalse#1}}
+\SKV@pdef*\SKV@t@st@p@a#1{\SKV@ifclam{\SKV@cltrue#1}{\SKV@clfalse#1}}
\SKV@pdef*\SKV@testoptb#1{\SKV@t@stopta{\SKV@t@st@pta{\SKV@t@st@p@a{#1}}}}
\SKV@pdef*\SKV@t@stoptb#1{\SKV@t@stopta{\SKV@t@st@pta{#1}}}
\SKV@pdef*\SKV@testoptc#1{\SKV@t@st@pta{\SKV@t@st@p@a{#1}}}
@@ -432,27 +475,47 @@
\SKV@pdef*\csnewbox{\SKV@csalloc{box}}
\SKV@pdef*\csnewwrite{\SKV@csalloc{write}}
\SKV@pdef*\csnewread{\SKV@csalloc{read}}
-\SKV@pdef*\NewWrites{\SKV@testopt\SKV@NewWrites{}}
+\SKV@pdef*\NewWrites{\SKV@swtrue\SKV@testopt\SKV@NewWrites{}}
+\SKV@pdef*\DefWrites{\SKV@swfalse\SKV@testopt\SKV@NewWrites{}}
\SKV@def*\SKV@NewWrites[#1]#2{%
\SKV@for[,]{#2}\SKV@tempa{%
\SKV@expnext\SKV@ensurenoscape\SKV@tempa
- \SKV@csifdefinable{#1\SKV@tempa}{%
- \csnewwrite{#1\SKV@tempa}%
- }%
+ \ifSKV@sw
+ \SKV@csifdefinable{#1\SKV@tempa}\relax
+ \else
+ \SKV@ifcsundef{#1\SKV@tempa}{}{%
+ \SKV@vbmsg{warn}{Write stream '\@backslashchar
+ #1\SKV@tempa' redefined\on@line}%
+ }%
+ \fi
+ \csnewwrite{#1\SKV@tempa}%
}%
}
-\SKV@pdef*\NewReads{\SKV@testopt\SKV@NewReads{}}
+\SKV@pdef*\NewReads{\SKV@swtrue\SKV@testopt\SKV@NewReads{}}
+\SKV@pdef*\DefReads{\SKV@swfalse\SKV@testopt\SKV@NewReads{}}
\SKV@def*\SKV@NewReads[#1]#2{%
\SKV@for[,]{#2}\SKV@tempa{%
\SKV@expnext\SKV@ensurenoscape\SKV@tempa
- \SKV@csifdefinable{#1\SKV@tempa}{%
- \csnewread{#1\SKV@tempa}%
- }%
+ \ifSKV@sw
+ \SKV@csifdefinable{#1\SKV@tempa}\relax
+ \else
+ \SKV@ifcsundef{#1\SKV@tempa}{}{%
+ \SKV@vbmsg{warn}{Read stream '\@backslashchar
+ #1\SKV@tempa' redefined\on@line}%
+ }%
+ \fi
+ \csnewread{#1\SKV@tempa}%
}%
}
-\SKV@pdef*\NewIfs{\SKV@testopt\SKV@NewIfs{}}
+\SKV@pdef*\NewIfs{\SKV@swtrue\SKV@testopt\SKV@NewIfs{}}
+\SKV@pdef*\DefIfs{\SKV@swfalse\SKV@testopt\SKV@NewIfs{}}
\SKV@def*\SKV@NewIfs[#1]#2{\SKV@testopt{\SKV@N@wIfs[#1]{#2}}{false}}
\SKV@def*\SKV@N@wIfs[#1]#2[#3]{%
+ \ifSKV@sw
+ \SKV@getswstate\NewIfs{#3}%
+ \else
+ \SKV@getswstate\DefIfs{#3}%
+ \fi
\SKV@for[,]{#2}\SKV@tempa{%
\SKV@expnext\SKV@ensurenoscape\SKV@tempa
\begingroup
@@ -462,10 +525,16 @@
{\SKV@oifstrequal{\SKV@tempa}{tog}{\SKV@swnameerr{tog}}%
{\SKV@oifstrequal{\SKV@tempa}{switch}{\SKV@swnameerr{switch}}%
{}}}}}\endgroup
- \SKV@csifdefinable{if#1\SKV@tempa}{%
- \SKV@aftercs\SKV@N@wIf@{if#1\SKV@tempa}%
- \@nameuse{#1\SKV@tempa#3}%
- }%
+ \ifSKV@sw
+ \SKV@csifdefinable{if#1\SKV@tempa}\relax
+ \else
+ \SKV@ifcsundef{if#1\SKV@tempa}{}{%
+ \SKV@vbmsg{warn}{Boolean '\@backslashchar
+ if#1\SKV@tempa' redefined\on@line}%
+ }%
+ \fi
+ \SKV@aftercs\SKV@N@wIf@{if#1\SKV@tempa}%
+ \@nameuse{#1\SKV@tempa\SKV@swval}%
}%
}
\SKV@def*\SKV@N@wIf@#1{%
@@ -483,11 +552,16 @@
\SKV@aftercs\def{\expandafter\@gobbletwo\string#1%
\expandafter\@gobbletwo\string#2}{\let#1#2}%
}
-\SKV@pdef*\NewBooleans{\SKV@testopt\SKV@NewBooleans{}}
+\SKV@pdef*\NewBooleans{\SKV@swtrue\SKV@testopt\SKV@NewBooleans{}}
+\SKV@pdef*\DefBooleans{\SKV@swfalse\SKV@testopt\SKV@NewBooleans{}}
\SKV@def*\SKV@NewBooleans[#1]#2{%
- \SKV@testopt{\SKV@N@wBooleans[#1]{#2}}{false}}
-\SKV@def*\SKV@N@wBooleans[#1]#2[#3]{%
- \SKV@getswstate\NewBooleans{#3}%
+ \SKV@testopt{\SKV@B@oleans[#1]{#2}}{false}}
+\SKV@def*\SKV@B@oleans[#1]#2[#3]{%
+ \ifSKV@sw
+ \SKV@getswstate\NewBooleans{#3}%
+ \else
+ \SKV@getswstate\DefBooleans{#3}%
+ \fi
\SKV@for[,]{#2}\SKV@tempa{%
\SKV@expnext\SKV@ensurenoscape\SKV@tempa
\SKV@oifstrequal{\SKV@tempa}{tog}{%
@@ -497,72 +571,120 @@
\SKV@err{'switch' not allowed as a boolean name}\@ehc
}{}%
}%
- \SKV@csifdefinable{if#1\SKV@tempa}{%
- \csnewif{if#1\SKV@tempa}%
- \@nameuse{#1\SKV@tempa\SKV@resvd}%
+ \SKV@ifstrnotequal{#1\SKV@tempa}{x}{}{%
+ \SKV@err{'\string\ifx' is a TeX primitive}%
+ {Why do you want to redefine '\string\ifx'? This is dangerous.}%
}%
+ \ifSKV@sw
+ \SKV@csifdefinable{if#1\SKV@tempa}\relax
+ \else
+ \SKV@ifcsundef{if#1\SKV@tempa}{}{%
+ \SKV@vbmsg{warn}{Switch '\@backslashchar if#1\SKV@tempa'
+ redefined\on@line}%
+ }%
+ \fi
+ \csnewif{if#1\SKV@tempa}%
+ \@nameuse{#1\SKV@tempa\SKV@swval}%
}%
}
-\SKV@pdef*\NewTogs{\SKV@testopt\SKV@NewTogs{}}
+\SKV@pdef*\NewTogs{\SKV@swtrue\SKV@testopt\SKV@NewTogs{}}
+\SKV@pdef*\DefTogs{\SKV@swfalse\SKV@testopt\SKV@NewTogs{}}
\SKV@def*\SKV@NewTogs[#1]#2{\SKV@testopt{\SKV@NewT@gs[#1]{#2}}{false}}
\SKV@def*\SKV@NewT@gs[#1]#2[#3]{%
- \SKV@getswstate\NewTogs{#3}%
+ \ifSKV@sw
+ \SKV@getswstate\NewTogs{#3}%
+ \else
+ \SKV@getswstate\DefTogs{#3}%
+ \fi
\SKV@for[,]{#2}\SKV@tempa{%
\SKV@expnext\SKV@ensurenoscape\SKV@tempa
\edef\SKV@tempa{#1\SKV@tempa}%
- \SKV@expnext\newtog\SKV@tempa
- \@nameuse{tog\SKV@resvd\SKV@expnext}\SKV@tempa
+ \ifSKV@sw
+ \SKV@expnext\newtog\SKV@tempa
+ \else
+ \SKV@expnext\deftog\SKV@tempa
+ \fi
+ \SKV@expargs{0}{\@nameuse{tog\SKV@swval}}\SKV@tempa\@nil
}%
}
-\SKV@pdef*\NewToks{\SKV@testopt\SKV@NewToks{}}
+\SKV@pdef*\NewToks{\SKV@swtrue\SKV@testopt\SKV@NewToks{}}
+\SKV@pdef*\DefToks{\SKV@swfalse\SKV@testopt\SKV@NewToks{}}
\SKV@def*\SKV@NewToks[#1]#2{%
\SKV@for[,]{#2}\SKV@tempa{%
\SKV@expnext\SKV@ensurenoscape\SKV@tempa
- \SKV@csifdefinable{#1\SKV@tempa}{%
- \csnewtoks{#1\SKV@tempa}%
- }%
+ \ifSKV@sw
+ \SKV@csifdefinable{#1\SKV@tempa}\relax
+ \else
+ \SKV@ifcsundef{#1\SKV@tempa}{}{%
+ \SKV@vbmsg{warn}{Token register '\@backslashchar
+ #1\SKV@tempa' redefined\on@line}%
+ }%
+ \fi
+ \csnewtoks{#1\SKV@tempa}%
}%
}
-\SKV@pdef*\NewCounts{\SKV@testopt\SKV@NewCounts{}}
+\SKV@pdef*\NewCounts{\SKV@swtrue\SKV@testopt\SKV@NewCounts{}}
+\SKV@pdef*\DefCounts{\SKV@swfalse\SKV@testopt\SKV@NewCounts{}}
\SKV@def*\SKV@NewCounts[#1]#2{%
\SKV@for[,]{#2}\SKV@tempa{%
\SKV@expnext\SKV@ensurenoscape\SKV@tempa
- \SKV@csifdefinable{#1\SKV@tempa}{%
- \csnewcount{#1\SKV@tempa}%
- }%
+ \ifSKV@sw
+ \SKV@csifdefinable{#1\SKV@tempa}\relax
+ \else
+ \SKV@ifcsundef{#1\SKV@tempa}{}{%
+ \SKV@vbmsg{warn}{Counter register '\@backslashchar
+ #1\SKV@tempa' redefined\on@line}%
+ }%
+ \fi
+ \csnewcount{#1\SKV@tempa}%
}%
}
-\SKV@pdef*\NewDimens{\SKV@testopt\SKV@NewDimens{}}
+\SKV@pdef*\NewDimens{\SKV@swtrue\SKV@testopt\SKV@NewDimens{}}
+\SKV@pdef*\DefDimens{\SKV@swfalse\SKV@testopt\SKV@NewDimens{}}
\SKV@def*\SKV@NewDimens[#1]#2{%
\SKV@for[,]{#2}\SKV@tempa{%
\SKV@expnext\SKV@ensurenoscape\SKV@tempa
- \SKV@csifdefinable{#1\SKV@tempa}{%
- \csnewdimen{#1\SKV@tempa}%
- }%
+ \ifSKV@sw
+ \SKV@csifdefinable{#1\SKV@tempa}\relax
+ \else
+ \SKV@ifcsundef{#1\SKV@tempa}{}{%
+ \SKV@vbmsg{warn}{Dimension register '\@backslashchar
+ #1\SKV@tempa' redefined\on@line}%
+ }%
+ \fi
+ \csnewdimen{#1\SKV@tempa}%
}%
}
-\SKV@pdef*\NewBoxes{\SKV@testopt\SKV@NewBoxes{}}
+\SKV@pdef*\NewBoxes{\SKV@swtrue\SKV@testopt\SKV@NewBoxes{}}
+\SKV@pdef*\DefBoxes{\SKV@swfalse\SKV@testopt\SKV@NewBoxes{}}
\SKV@def*\SKV@NewBoxes[#1]#2{%
\SKV@for[,]{#2}\SKV@tempa{%
\SKV@expnext\SKV@ensurenoscape\SKV@tempa
- \SKV@csifdefinable{#1\SKV@tempa}{%
- \csnewbox{#1\SKV@tempa}%
- }%
+ \ifSKV@sw
+ \SKV@csifdefinable{#1\SKV@tempa}\relax
+ \else
+ \SKV@ifcsundef{#1\SKV@tempa}{}{%
+ \SKV@vbmsg{warn}{Box register '\@backslashchar
+ #1\SKV@tempa' redefined\on@line}%
+ }%
+ \fi
+ \csnewbox{#1\SKV@tempa}%
}%
}
\SKV@def\SKV@expnext#1#2{%
\SKV@ifblank{#1}{%
- \SKV@err{Arguments of '\string\SKV@expnext' can't be empty}\@ehc
+ \SKV@badargerr{SKV@expnext}{first}%
}{%
\SKV@ifblank{#2}{%
- \SKV@err{Arguments of '\string\SKV@expnext' can't be empty}\@ehc
+ \SKV@badargerr{SKV@expnext}{second}%
}{%
- \SKV@iftest{cat}{$\detokenize\expandafter{\SKV@cdr#1\@nil}$}{%
+ \ifcat$\detokenize\expandafter{\SKV@cdr#1\@nil}$%
+ \SKV@afterelsefi
\expandafter#1\expandafter{#2}%
- }{%
- \SKV@err{Invalid arguments '\string#1' for
- '\string\SKV@expnext'}\@ehc
- }%
+ \else
+ \SKV@afterfi
+ \SKV@badargerr{SKV@expnext}{first}%
+ \fi
}%
}%
}
@@ -621,17 +743,17 @@
\SKV@def*\SKV@sp@def#1#2{%
\edef\@sp@def{\the\SKV@toks}%
\SKV@toks\expandafter{%
- \romannumeral-`\q\SKV@@sp@def\noexpand\noexpand#1& &}%
+ \romannumeral-`\q\SKV@sp@d@f\noexpand\noexpand#1& &}%
\edef#2{\the\SKV@toks}%
\SKV@toks\expandafter{\@sp@def}%
\SKV@undef\@sp@def
}
-\SKV@def*\SKV@@sp@def#1 &{\SKV@@sp@d@f#1&}
-\SKV@def*\SKV@@sp@d@f#1&#2{\romannumeral-`\q#1}
+\SKV@def*\SKV@sp@d@f#1 &{\SKV@sp@d@f@#1&}
+\SKV@def*\SKV@sp@d@f@#1&#2{\romannumeral-`\q#1}
\SKV@def*\SKV@expox#1{\unexpanded\expandafter{#1}}
-\SKV@def*\SKV@expcsox#1{\SKV@aftercs\SKV@expox{#1}}
+\SKV@def*\SKV@csexpox#1{\SKV@aftercs\SKV@expox{#1}}
\SKV@def*\SKV@exptx#1{\unexpanded\SKV@threexp{#1}}
-\SKV@def*\SKV@expcstx#1{\SKV@aftercs\SKV@exptx{#1}}
+\SKV@def*\SKV@csexptx#1{\SKV@aftercs\SKV@exptx{#1}}
\SKV@def\SKV@noexpcs#1{\unexpanded\expandafter{\csname#1\endcsname}}
\SKV@pdef*\SKV@undef#1{\let#1\SKV@undefined}
\SKV@pdef*\SKV@gundef{\global\SKV@undef}
@@ -639,15 +761,15 @@
\SKV@pdef*\SKV@csgundef{\global\SKV@csundef}
\SKV@def*\SKV@undeflist{\SKV@savstate\SKV@t@st@p@a\SKV@und@flist}
\SKV@def*\SKV@und@flist#1{%
- \ifSKV@ask\let\glob@lrel@x\global\else\let\glob@lrel@x\relax\fi
+ \ifSKV@cl\let\gl@l@x\global\else\let\gl@l@x\relax\fi
\XKV@for@n{#1}\SKV@resvd{%
\SKV@expnext\SKV@ensurescape\SKV@resvd
- \glob@lrel@x\expandafter\SKV@undef\SKV@resvd
+ \gl@l@x\expandafter\SKV@undef\SKV@resvd
}%
\SKV@resstate
}
-\SKV@pdef*\SKV@Undef{\SKV@savstate\SKV@testopte\SKV@@Undef}
-\SKV@def*\SKV@@Undef[#1]#2{%
+\SKV@pdef*\SKV@Undef{\SKV@savstate\SKV@testopte\SKV@Und@f}
+\SKV@def*\SKV@Und@f[#1]#2{%
\ifSKV@st
\ifSKV@pl
\def\SKV@ndl{\SKV@for*[#1]#2}%
@@ -664,11 +786,11 @@
\SKV@ndl\SKV@ndl{%
\ifSKV@pl
\SKV@despacectt\SKV@ndl
- \ifSKV@ask\expandafter\global\fi
+ \ifSKV@cl\expandafter\global\fi
\SKV@threexp\let
\expandafter\csname\SKV@ndl\endcsname\SKV@undefined
\else
- \ifSKV@ask\expandafter\global\fi
+ \ifSKV@cl\expandafter\global\fi
\expandafter\let\SKV@ndl\SKV@undefined
\fi
}%
@@ -686,11 +808,11 @@
}
\SKV@def*\SKV@ifcsundef#1{\@nameuse{SKV@\SKV@ifcsdef{#1}{2}{1}of2}}
\SKV@def*\SKV@ifonedef#1{%
- \def\SKV@resvda{#1}\SKV@tempswtrue
- \XKV@whilist\SKV@resvda\SKV@resvdb\ifSKV@tempsw\fi{%
- \SKV@oifdefined\SKV@resvdb\SKV@tempswfalse\SKV@tempswtrue
+ \def\SKV@resvda{#1}\SKV@swtrue
+ \XKV@whilist\SKV@resvda\SKV@resvdb\ifSKV@sw\fi{%
+ \SKV@oifdefined\SKV@resvdb\SKV@swfalse\SKV@swtrue
}%
- \@nameuse{SKV@\ifSKV@tempsw2\else1\fi of2}%
+ \@nameuse{SKV@\ifSKV@sw2\else1\fi of2}%
}
\SKV@def\DeclarePackageCommand#1#2{%
\SKV@ensurescape{#2}%
@@ -701,54 +823,37 @@
{##1Saved\resvd@a\noexpand\endcsname}}%
\resvd@a{\expandafter\let\expandafter#2\csname}%
\SKV@undef\resvd@a
- }{\SKV@AtEndAfterPackageEnd{\SKV@Undef?#2}}%
+ }{\SKV@AtEndAfterPackageEnd{\SKV@Undef!#2}}%
#1#2%
}
-\SKV@pdef*\SKV@providedef{\@star@or@long\SKV@pr@videdef}
-\SKV@def\SKV@pr@videdef#1{%
- \SKV@ensurescape{#1}%
- \edef\SKV@prov@d{\expandafter\@gobble\string#1}%
- \SKV@aftercs\let{SKV@test@\SKV@prov@d}\SKV@undefined
- \SKV@ifdef#1{%
- \SKV@vbsmsg{info}{Command '\string#1' already defined:\SKV@MB
- Not redefined\on@line}%
- \SKV@afterassignment{\SKV@gundef\SKV@pr@vid}%
- \def\SKV@pr@vid
- }{%
- \SKV@afterassignment{%
- \SKV@aftercs\edef{SKV@test@\SKV@prov@d}%
- {\expandafter\strip@prefix\meaning#1}%
- }%
- \l@ngrel@x\def#1%
- }%
-}
-\SKV@pdef*\SKV@providerobustdef{\@star@or@long\SKV@pr@viderobustdef}
-\SKV@def\SKV@pr@viderobustdef#1{%
- \SKV@ensurescape{#1}%
- \edef\SKV@prov@d{\expandafter\@gobble\string#1}%
+\SKV@pdef*\SKV@providedef{\@star@or@long{\SKV@pr@videdef{}}}
+\SKV@pdef*\SKV@providerobustdef{\@star@or@long{\SKV@pr@videdef\protected}}
+\SKV@def\SKV@pr@videdef#1#2{%
+ \SKV@ensurescape{#2}%
+ \edef\SKV@prov@d{\expandafter\@gobble\string#2}%
\SKV@aftercs\let{SKV@test@\SKV@prov@d}\SKV@undefined
- \SKV@ifdef#1{%
- \SKV@vbsmsg{info}{Command '\string#1' already defined:\SKV@MB
+ \SKV@ifdef#2{%
+ \SKV@vbmsg{info}{Command '\string#2' already defined:\SKV@MB
Not redefined\on@line}%
\SKV@afterassignment{\SKV@gundef\SKV@pr@vid}%
\def\SKV@pr@vid
}{%
\SKV@afterassignment{%
\SKV@aftercs\edef{SKV@test@\SKV@prov@d}%
- {\expandafter\strip@prefix\meaning#1}%
+ {\expandafter\strip@prefix\meaning#2}%
}%
- \l@ngrel@x\protected\def#1%
+ \l@ngrel@x#1\def#2%
}%
}
\SKV@def\TestProvidedCommand#1{%
\SKV@ensurescape{#1}%
\begingroup
\SKV@ifmacro#1{%
- \edef\SKV@resvd@a{\expandafter\@gobble\string#1}%
- \edef\SKV@resvd@b{\expandafter\strip@prefix\meaning#1}%
+ \edef\SKV@resvda{\expandafter\@gobble\string#1}%
+ \edef\SKV@resvdb{\expandafter\strip@prefix\meaning#1}%
\expandafter\aftergroup\csname SKV@\expandafter
- \ifx\expandafter\SKV@resvd@b
- \csname SKV@test@\SKV@resvd@a\endcsname
+ \ifx\expandafter\SKV@resvdb
+ \csname SKV@test@\SKV@resvda\endcsname
1\else2\fi of2\endcsname
}{\aftergroup\@secondoftwo}%
\endgroup
@@ -763,7 +868,7 @@
\SKV@providerobustdef*\providerobustdef{\SKV@providerobustdef}
\SKV@providerobustdef*\aftercommission{\SKV@afterassignment}
\SKV@providerobustdef*\aftercoterie{\SKV@aftergroup}
-\SKV@def\SKV@ifmacro#1{%
+\SKV@def*\SKV@ifmacro#1{%
\begingroup
\edef\SKV@tempa##1{\def##1####1\detokenize{macro}:####2&}%
\SKV@tempa\SKV@tempa{\expandafter\aftergroup
@@ -774,6 +879,23 @@
}
\SKV@def\SKV@csifmacro{\SKV@aftercs\SKV@ifmacro}
\SKV@def\SKV@ifnotmacro#1{\SKV@ifmacro{#1}\@secondoftwo\@firstoftwo}
+\SKV@def*\SKV@simplecmdpatch{\begingroup\@makeother{\#}%
+ \SKV@testopt\SKV@simpl@cmdpatch{########1}}
+\SKV@def*\SKV@simpl@cmdpatch[#1]#2#3#4{%
+ \edef\SKV@resvda##1##2{%
+ \def##1####1\detokenize{macro:}####2->####3&{%
+ #1\def\string#2####2{##2####3&}%
+ }%
+ \def##2####1\detokenize{#3}####2&{####1\detokenize{#4}####2}%
+ \edef##1{##1\meaning#2&}%
+ }%
+ \SKV@resvda\SKV@resvda\SKV@resvdb
+ \everyeof{\noexpand}\endlinechar\m@ne\makeatletter
+ \catcode`\#=6\relax
+ \scantokens\expandafter{\SKV@resvda}%
+ \global\let#2#2%
+ \endgroup
+}
\SKV@def*\SKV@ifrelax#1{%
\SKV@ensurescape{#1}%
\SKV@ifdefined{#1}%
@@ -811,8 +933,9 @@
\SKV@def\SKV@xifblank#1{\SKV@expargs{0}\SKV@ifblank{#1}\@nil}
\SKV@def\SKV@ifstrequal#1#2{%
\begingroup
- \def\resvd@a{#1}\def\resvd@b{#2}%
- \SKV@detokdespace\resvd@a\SKV@detokdespace\resvd@b
+ \edef\resvd@a{\detokenize{#1}}%
+ \edef\resvd@b{\detokenize{#2}}%
+ \SKV@despacectt\resvd@a\SKV@despacectt\resvd@b
\expandafter\aftergroup
\csname SKV@\SKV@ifx\resvd@a\resvd@b{1}{2}of2\endcsname
\endgroup
@@ -846,28 +969,28 @@
\fi
\endgroup
}
-\SKV@pdef*\SKV@appto{\SKV@savstate\SKV@testoptb{\SKV@apprepto{>}}}
-\SKV@pdef*\SKV@prepto{\SKV@savstate\SKV@testoptb{\SKV@apprepto{<}}}
-\SKV@def\SKV@apprepto#1#2#3{%
- \def\SKV@tapa##1{\def\SKV@tapb####1{\SKV@aftercs##1{####1}}}%
- \ifSKV@st\let\SKV@tapc\SKV@expox\else\let\SKV@tapc\unexpanded\fi
+\SKV@pdef*\SKV@appto{\SKV@savstate\SKV@testoptb{\SKV@hooktomac{>}}}
+\SKV@pdef*\SKV@prepto{\SKV@savstate\SKV@testoptb{\SKV@hooktomac{<}}}
+\SKV@def\SKV@hooktomac#1#2#3{%
+ \ifSKV@st\let\SKV@iii\SKV@expox\else\let\SKV@iii\unexpanded\fi
\ifSKV@pl
- \let\@ifundef\SKV@ifcsundef\let\SKV@tapd\SKV@expcsox
- \ifSKV@ask\SKV@tapa\xdef\else\SKV@tapa\edef\fi
+ \let\@ifundef\SKV@ifcsundef\let\SKV@iv\SKV@csexpox
+ \def\SKV@i##1{\def\SKV@ii####1{\SKV@aftercs##1{####1}}}%
+ \ifSKV@cl\SKV@i\xdef\else\SKV@i\edef\fi
\else
- \let\@ifundef\SKV@ifundef\let\SKV@tapd\SKV@expox
- \ifSKV@ask\def\SKV@tapb##1{\xdef##1}\else
- \def\SKV@tapb##1{\edef##1}\fi
+ \let\@ifundef\SKV@ifundef\let\SKV@iv\SKV@expox
+ \ifSKV@cl\def\SKV@ii##1{\xdef##1}\else
+ \def\SKV@ii##1{\edef##1}\fi
\fi
\@ifundef{#2}{%
- \SKV@tapb{#2}{\SKV@tapc{#3}}%
+ \SKV@ii{#2}{\SKV@iii{#3}}%
}{%
\SKV@ifstrequal{#1}{>}%
- {\SKV@tapb{#2}{\SKV@tapd{#2}\SKV@tapc{#3}}}%
- {\SKV@tapb{#2}{\SKV@tapc{#3}\SKV@tapd{#2}}}%
+ {\SKV@ii{#2}{\SKV@iv{#2}\SKV@iii{#3}}}%
+ {\SKV@ii{#2}{\SKV@iii{#3}\SKV@iv{#2}}}%
}%
- \SKV@undeflist?{\SKV@tapa,\SKV@tapb,\SKV@tapc,\SKV@tapd}%
\SKV@resstate
+ \SKV@undeflist!{\SKV@i,\SKV@ii,\SKV@iii,\SKV@iv}%
}
\SKV@pdef\apptomac#1#2{%
\SKV@ifundef{#1}{\edef#1{\unexpanded{#2}}}%
@@ -887,7 +1010,7 @@
\SKV@t@stoptg{\SKV@testopt\SKV@addt@list{,}}}}
\SKV@def*\SKV@addt@list[#1]{%
\def\parser{#1}%
- \ifSKV@ask\let\glob@l@def\xdef\else\let\glob@l@def\edef\fi
+ \ifSKV@cl\let\glob@l@def\xdef\else\let\glob@l@def\edef\fi
\ifSKV@pl
\def\SKV@next##1{\SKV@aftercs\SKV@addt@l@st{##1}}%
\else
@@ -928,7 +1051,7 @@
at the wrong place}{Move command to before \string\enddocument.}%
}
\SKV@pdef*\SKV@AtDocumentStart{\AtBeginDocument}
-\SKV@pdef*\SKV@BeforeDocumentStart{\SKV@appto?\SKV@beforedocstart}
+\SKV@pdef*\SKV@BeforeDocumentStart{\SKV@appto!\SKV@beforedocstart}
\def\SKV@beforedocstart{}
\SKV@prepto\document{%
\endgroup
@@ -938,7 +1061,7 @@
\SKV@gundef\SKV@beforedocstart
\begingroup
}
-\SKV@pdef*\SKV@AfterDocumentStart{\SKV@appto?\SKV@afterdocstart}
+\SKV@pdef*\SKV@AfterDocumentStart{\SKV@appto!\SKV@afterdocstart}
\def\SKV@afterdocstart{}
\SKV@appto\document{%
\let\SKV@AfterDocumentStart\@firstofone
@@ -948,7 +1071,7 @@
}
\SKV@BeforeDocumentStart{\let\SKV@AtDocumentStart\@firstofone}
\SKV@pdef*\SKV@AtDocumentEnd{\AtEndDocument}
-\SKV@pdef*\SKV@BeforeLastPage{\SKV@appto?\SKV@beforelastpage}
+\SKV@pdef*\SKV@BeforeLastPage{\SKV@appto!\SKV@beforelastpage}
\def\SKV@beforelastpage{}
\SKV@AtDocumentEnd{%
\let\SKV@bef@relastpage\AtVeryEnd@BeforeClearDocumentHook
@@ -956,10 +1079,10 @@
\let\SKV@BeforeLastPage\@firstofone
\SKV@beforelastpage\SKV@bef@relastpage
\let\SKV@BeforeLastPage\SKV@notenderr
- \SKV@Undef?{\SKV@beforelastpage\SKV@bef@relastpage}%
+ \SKV@Undef!{\SKV@beforelastpage\SKV@bef@relastpage}%
}%
}
-\SKV@pdef*\SKV@AfterLastPage{\SKV@appto?\SKV@afterlastpage}
+\SKV@pdef*\SKV@AfterLastPage{\SKV@appto!\SKV@afterlastpage}
\def\SKV@afterlastpage{}
\SKV@AtDocumentEnd{%
\let\SKV@afterl@stpage\AtVeryEnd@AfterLastShipoutHook
@@ -967,10 +1090,10 @@
\let\SKV@AfterLastPage\@firstofone
\SKV@afterlastpage\SKV@afterl@stpage
\let\SKV@AfterLastPage\SKV@notenderr
- \SKV@Undef?{\SKV@afterlastpage\SKV@afterl@stpage}%
+ \SKV@Undef!{\SKV@afterlastpage\SKV@afterl@stpage}%
}%
}
-\SKV@pdef*\SKV@AfterDocumentEnd{\SKV@appto?\SKV@afterenddoc}
+\SKV@pdef*\SKV@AfterDocumentEnd{\SKV@appto!\SKV@afterenddoc}
\def\SKV@afterenddoc{}
\SKV@AtDocumentEnd{%
\let\SKV@aft@renddoc\AtVeryEnd@AtVeryEndDocumentHook
@@ -978,7 +1101,7 @@
\let\SKV@AfterDocumentEnd\@firstofone
\SKV@afterenddoc\SKV@aft@renddoc
\let\SKV@AfterDocumentEnd\SKV@notenderr
- \SKV@Undef?{\SKV@afterenddoc\SKV@aft@renddoc}%
+ \SKV@Undef!{\SKV@afterenddoc\SKV@aft@renddoc}%
}%
}
\SKV@pdef\SKV@AtPackageEnd{\AtEndOfPackage}
@@ -1009,8 +1132,8 @@
\SKV@next
}
\let\SKV@steno\z@
-\SKV@pdef*\SKV@for{\SKV@savstate\SKV@testoptd\SKV@@for}
-\SKV@pdef*\SKV@@for[#1]{%
+\SKV@pdef*\SKV@for{\SKV@savstate\SKV@testoptd\SKV@f@r}
+\SKV@pdef*\SKV@f@r[#1]{%
\let\SKV@steno\@ne
\ifSKV@st
\def\SKV@next{\SKV@for@b[#1]}%
@@ -1041,17 +1164,17 @@
}%
\long\def\SKV@fornoop##1\@nil{}%
}
-\SKV@pdef*\SKV@for@b{\SKV@testopt\SKV@@for@b{,}}
-\SKV@def\SKV@@for@b[#1]#2{%
+\SKV@pdef*\SKV@for@b{\SKV@testopt\SKV@f@r@b{,}}
+\SKV@def\SKV@f@r@b[#1]#2{%
\SKV@CommandGenParser{#1}\SKV@expnext\SKV@for@a{#2}%
}
\SKV@pdef*\SKV@tfor{\SKV@ifstar\SKV@tfor@b\SKV@tfor@a}
\SKV@pdef*\SKV@tfor@a#1#2#3{%
\SKV@ifblank{#1}{%
- \SKV@vbsmsg{warn}{Empty list for '\string\SKV@tfor@a'\on@line}%
+ \SKV@vbmsg{warn}{Empty list for '\string\SKV@tfor@a'\on@line}%
}{%
\SKV@ifblank{#3}{%
- \SKV@vbsmsg{warn}%
+ \SKV@vbmsg{warn}%
{Empty function for '\string\SKV@tfor@a'\on@line}%
}{%
\SKV@tforloop#1\@nil\@nil&#2{#3}%
@@ -1077,20 +1200,28 @@
}
\SKV@pdef*\SKV@tfor@b#1#2#3{\SKV@expnext\SKV@tfor@a{#1}#2{#3}}
\SKV@def*\SKV@preamblecmds{}
-\SKV@pdef*\SKV@onlypreamble#1{%
- \SKV@tfor{#1}\SKV@resvd{%
- \SKV@expnext\SKV@ensurescape\SKV@resvd
- \edef\SKV@resvd##1##2{\SKV@appto?##1{##2\SKV@expox{\SKV@resvd}}}%
- \SKV@resvd\SKV@preamblecmds\SKV@do@a
+\SKV@pdef*\SKV@onlypreamble{\SKV@savstate\SKV@t@st@pta\SKV@onlypre@mble}
+\SKV@pdef*\SKV@onlypre@mble#1{%
+ \SKV@for[,]{#1}\SKV@resvd{%
+ \SKV@despacectt\SKV@resvd
+ \ifSKV@pl
+ \SKV@expnext\SKV@ensurenoscape\SKV@resvd
+ \edef\SKV@resvd##1##2{\SKV@appto!##1{##2\SKV@noexpcs{\SKV@resvd}}}%
+ \else
+ \SKV@expnext\SKV@ensurescape\SKV@resvd
+ \edef\SKV@resvd##1##2{\SKV@appto!##1{##2\SKV@expox{\SKV@resvd}}}%
+ \fi
+ \SKV@resvd\SKV@preamblecmds\SKV@dopreamble
}%
+ \SKV@resstate
}
\SKV@AfterDocumentStart{%
- \gdef\SKV@do@a#1{%
+ \gdef\SKV@dopreamble#1{%
\gdef#1{\SKV@err{'\string#1' is a preamble command}%
{Move command '\string#1' to document preamble.}}%
}%
\SKV@preamblecmds
- \global\let\SKV@do@a\@gobble
+ \global\let\SKV@dopreamble\@gobble
}
\SKV@pdef*\SKV@onlypackage{%
\SKV@xifempty{\@currname\@currext}{%
@@ -1099,14 +1230,39 @@
is available only in package environment.}%
}{}%
}
-\SKV@def*\SKV@CommandKeyParser#1{%
- \long\def\SKV@define@keylist##1{%
- \SKV@undeflist?{\skif,\skifx,\skifcase,\skor,\skelse,\skfi}%
- \ifswitchon{SKV@st}{%
- \long\edef\@keylist{\SKV@expox{##1}}%
+\def\SKV@aftergroupdef#1#2{%
+ \expandafter\endgroup\expandafter\def\expandafter#1%
+ \expandafter{#2}%
+}
+\SKV@def*\SKV@noexpparse#1{%
+ \begingroup
+ \def\SKV@resa{}%
+ \edef\SKV@tempa{\detokenize\expandafter{#1}\@backslashchar&}%
+ \edef\SKV@tempb##1{\def##1####1\@backslashchar####2&}%
+ \SKV@tempb\SKV@tempb{%
+ \SKV@ifempty{##2}{%
+ \edef\SKV@resa{\SKV@expox\SKV@resa##1}%
}{%
- \long\def\@keylist{##1}%
+ \edef\SKV@resa{\SKV@expox\SKV@resa##1%
+ \string\noexpand\@backslashchar}%
+ \SKV@tempb##2&%
}%
+ }%
+ \expandafter\SKV@tempb\SKV@tempa
+ \expandafter\endgroup\expandafter\toks@\expandafter{\SKV@resa}%
+ \edef#1{\the\toks@}%
+}
+\SKV@def*\SKV@CommandKeyParser#1{%
+ \long\def\SKV@d@fine@keylist##1{%
+ \global\let\ifSKV@st\ifSKV@st
+ \endgroup
+ \SKV@undeflist!{\skif,\skifx,\skifcase,\skor,\skelse,\skfi}%
+ \ifSKV@st
+ \edef\@keylist{\detokenize\expandafter{##1}}%
+ \else
+ \edef\@keylist{\detokenize{##1}}%
+ \fi
+ \SKV@scantoksa\@keylist
\SKV@resstate
\SKV@expnext\SKV@checksanitizec\@keylist\SKV@tempa
\expandafter\SKV@readkeylist\SKV@tempa#1\@nil
@@ -1123,18 +1279,34 @@
}%
}%
}
-\SKV@def\SKV@checksanitizec#1#2{%
+\SKV@def*\SKV@checksanitizec#1#2{%
\XKV@ch@cksanitize{#1}#2;%
\ifin@\else\XKV@ch@cksanitize{#1}#2,\fi
\ifin@\@selective@sanitize[0]{,;}#2\fi
}
\SKV@pdef\SKV@checkchoice#1#2#3#4{%
- \XKV@sttrue\XKV@pltrue
+ \XKV@savstate\XKV@sttrue\XKV@pltrue
\SKV@expargs{3}{\XKV@checkchoice[\val\nr]}{{#1}{#2}}{{#3}{#4}}\@nil
+ \XKV@resstate
+}
+\SKV@simplecmdpatch\XKV@ch@ckch@ice{%
+ \XKV@err{value `\the\XKV@toks' is not allowed}%
+}{%
+ \SKV@err{Value '\the\XKV@toks' is not allowed}%
+ {You have submitted an invalid value for a key.\SKV@MB
+ You may proceed if you like but expect funny results.}%
+}
+\SKV@simplecmdpatch\XKV@@ch@ckchoice{%
+ \XKV@err{value `\the\XKV@toks' is not allowed}%
+}{%
+ \SKV@err{Value '\the\XKV@toks' is not allowed}%
+ {You have submitted an invalid value for a key.\SKV@MB
+ You may proceed if you like but expect funny results.}%
}
\SKV@pdef*\SKV@inputerr#1#2{%
\SKV@err{Erroneous value '#1' for key '#2'}%
- {Please use the correct value for key '#2'.}%
+ {Please use the correct value for key '#2'\SKV@MB
+ of families '\XKV@fams'.}%
}
\SKV@def*\SKV@despacelist{\SKV@savstate\SKV@testoptd\SKV@desp@celist}
\SKV@def*\SKV@desp@celist[#1]#2{%
@@ -1157,35 +1329,47 @@
\SKV@def*\SKV@tdespacelt#1{%
\SKV@tfor{#1}\SKV@dsl{\expandafter\SKV@despacectt\SKV@dsl}%
}
-\SKV@pdef*\ReserveKeyPrefixNames{\SKV@ifstar\SKV@rkpn@mes\SKV@rkpn@m@s}
-\SKV@def*\SKV@rkpn@mes#1{\SKV@AfterPackageEnd{\gapptomac\SKV@rkpnames{,#1}}}
-\SKV@def*\SKV@rkpn@m@s#1{\gapptomac\SKV@rkpnames{,#1}}
-\SKV@pdef*\ReserveMacroPrefixNames{\SKV@ifstar\SKV@rmpn@mes\SKV@rmpn@m@s}
-\SKV@def*\SKV@rmpn@mes#1{\SKV@AfterPackageEnd{\gapptomac\SKV@rmpnames{,#1}}}
-\SKV@def*\SKV@rmpn@m@s#1{\gapptomac\SKV@rmpnames{,#1}}
-\SKV@pdef*\ReserveFamilyNames{\SKV@ifstar\SKV@rfn@mes\SKV@rfn@m@s}
-\SKV@def*\SKV@rfn@mes#1{\SKV@AfterPackageEnd{\gapptomac\SKV@rfnames{,#1}}}
-\SKV@def*\SKV@rfn@m@s#1{\gapptomac\SKV@rfnames{,#1}}
+\SKV@pdef*\ReserveKeyPrefixNames{\SKV@ifstar\SKV@rkpn@m@s\SKV@rkpn@mes}
+\SKV@def*\SKV@rkpn@mes#1{\SKV@appto!\SKV@rkpnames{,#1}}
+\SKV@def*\SKV@rkpn@m@s#1{\SKV@AfterPackageEnd{\SKV@appto!\SKV@rkpnames{,#1}}}
+\SKV@pdef*\ReserveMacroPrefixNames{\SKV@ifstar\SKV@rmpn@m@s\SKV@rmpn@mes}
+\SKV@def*\SKV@rmpn@mes#1{\SKV@appto!\SKV@rmpnames{,#1}}
+\SKV@def*\SKV@rmpn@m@s#1{\SKV@AfterPackageEnd{\SKV@appto!\SKV@rmpnames{,#1}}}
+\SKV@pdef*\ReserveFamilyNames{\SKV@ifstar\SKV@rfn@m@s\SKV@rfn@mes}
+\SKV@def*\SKV@rfn@mes#1{\SKV@appto!\SKV@rfnames{,#1}}
+\SKV@def*\SKV@rfn@m@s#1{\SKV@AfterPackageEnd{\SKV@appto!\SKV@rfnames{,#1}}}
\SKV@def*\SKV@rkpnames{XKV}
\SKV@def*\SKV@rmpnames{XKV}
\SKV@def*\SKV@rfnames{XKV}
\ReserveKeyPrefixNames*{SKV}
\ReserveMacroPrefixNames*{SKV}
\ReserveFamilyNames*{skeyval}
-\SKV@def*\SKV@newlet#1#2{%
+\SKV@def*\SKV@newlet{\SKV@savstate\SKV@t@stopta\SKV@n@wlet}
+\SKV@def*\SKV@n@wlet#1#2{%
\SKV@ifdef#1{%
- \SKV@err{Command '\string#1' already defined}%
- {I can't let '\string#1' to '\string#2'.}%
+ \ifSKV@st
+ \SKV@ifdef#2{%
+ \let#1#2%
+ \SKV@vbmsg{info}{Command '\string#1' redefined\on@line}%
+ }{%
+ \SKV@err{Command '\string#2' undefined}%
+ {I can't let '\string#1' to '\string#2'.}%
+ }%
+ \else
+ \SKV@err{Command '\string#1' already defined}%
+ {I can't let '\string#1' to '\string#2'.}%
+ \fi
}{%
\SKV@ifdef#2{\let#1#2}{%
\SKV@err{Command '\string#2' undefined}%
{I can't let '\string#1' to '\string#2'.}%
}%
}%
+ \SKV@resstate
}
\AtEndOfPackage{\SKV@providedef*\NewLet{\SKV@newlet}}
-\SKV@pdef*\SKV@cslet{\SKV@savstate\SKV@t@stopta\SKV@@cslet}
-\SKV@def*\SKV@@cslet#1#2{%
+\SKV@pdef*\SKV@cslet{\SKV@savstate\SKV@t@stopta\SKV@csl@t}
+\SKV@def*\SKV@csl@t#1#2{%
\ifSKV@st
\def\SKV@next{\SKV@aftercs\let{#1}#2}%
\else
@@ -1200,8 +1384,8 @@
\fi
\SKV@resstate\SKV@next
}
-\SKV@pdef*\SKV@letcs{\SKV@savstate\SKV@t@stopta\SKV@@letcs}
-\SKV@def*\SKV@@letcs#1#2{%
+\SKV@pdef*\SKV@letcs{\SKV@savstate\SKV@t@stopta\SKV@l@tcs}
+\SKV@def*\SKV@l@tcs#1#2{%
\ifSKV@st
\def\SKV@next{%
\begingroup\expandafter\endgroup
@@ -1219,8 +1403,8 @@
\fi
\SKV@resstate\SKV@next
}
-\SKV@pdef*\SKV@csletcs{\SKV@savstate\SKV@t@stopta\SKV@@csletcs}
-\SKV@def*\SKV@@csletcs#1#2{%
+\SKV@pdef*\SKV@csletcs{\SKV@savstate\SKV@t@stopta\SKV@csl@tcs}
+\SKV@def*\SKV@csl@tcs#1#2{%
\ifSKV@st
\def\SKV@next{%
\begingroup\expandafter\endgroup
@@ -1241,34 +1425,37 @@
\SKV@pdef*\SKV@numdef{\SKV@savstate\SKV@testoptc{\SKV@expr{num}}}
\SKV@pdef*\SKV@dimdef{\SKV@savstate\SKV@testoptc{\SKV@expr{dim}}}
\SKV@def*\SKV@expr#1{%
- \ifSKV@ask\let\glob@lrel@x\global\else\let\glob@lrel@x\relax\fi
+ \ifSKV@cl\let\gl@l@x\global\else\let\gl@l@x\relax\fi
\ifSKV@pl
\def\SKV@next##1{%
- \edef\resvd@a####1{####1{#1}\SKV@expcsox{##1}}%
- \resvd@a\SKV@numdimd@f
+ \edef\resvd@a####1{####1{#1}\SKV@csexpox{##1}}%
+ \resvd@a\SKV@ex@r
}%
\else
- \def\SKV@next{\SKV@numdimd@f{#1}}%
+ \def\SKV@next{\SKV@ex@r{#1}}%
\fi
\SKV@resstate\SKV@next
}
-\SKV@def*\SKV@numdimd@f#1#2#3{%
- \SKV@ensurescape@notempty{#2}{#3}%
+\SKV@def*\SKV@ex@r#1#2#3{%
+ \SKV@ensurescape@ne{#2}{#3}%
\SKV@ifstrequal{#1}{num}%
{\def\resvd@a{count}}{\def\resvd@a{dimen}}%
\SKV@ifundef{#2}{%
\@nameuse{new\resvd@a}#2%
- \glob@lrel@x#2=\@nameuse{#1expr}#3\relax
+ \gl@l@x#2=\@nameuse{#1expr}#3\relax
}{%
- \glob@lrel@x#2=\@nameuse{#1expr}#3\relax
+ \gl@l@x#2=\@nameuse{#1expr}#3\relax
}%
}
-\SKV@def*\SKV@ensurescape@notempty#1#2{%
+\SKV@def*\SKV@ensurescape@ne#1#2{%
\SKV@ensurescape{#1}%
- \SKV@ifempty{#2}%
- {\SKV@err{Argument '\string#1' is empty}\@ehc}{}%
+ \SKV@ifnotempty{#2}{}%
+ {\SKV@err{Argument '\string#2' is empty}%
+ {Empty argument '\string#2' is invalid.\SKV@MB
+ I expected a nonempty argument here.}%
+ }%
}
-\SKV@def*\SKV@keylistparser@err{%
+\SKV@def*\SKV@badkeylistparser{%
\SKV@err{Key list parser '\SKV@keyparser' not allowed}%
{Use semicolon (preferable) or colon as parser.}%
}
@@ -1282,12 +1469,12 @@
}
\define@cmdkey[KV]{skeyval}[SKV@]{keyparser}[;]{%
\@onelevel@sanitize\SKV@keyparser
- \SKV@xifblank\SKV@keyparser\SKV@keylistparser@err\relax
+ \SKV@xifblank\SKV@keyparser\SKV@badkeylistparser\relax
\SKV@despacectt\SKV@keyparser
\begingroup
\def\SKV@tempa{,}\SKV@detokdespace\SKV@tempa
\SKV@ifx\SKV@keyparser\SKV@tempa
- {\aftergroup\SKV@keylistparser@err}{}%
+ {\aftergroup\SKV@badkeylistparser}{}%
\endgroup
\SKV@expargs{0}\SKV@CommandKeyParser\SKV@keyparser\@nil
}
@@ -1391,17 +1578,17 @@
\AtBeginDocument{%
\SKV@ifundef\ifdraft
{\SKV@pdef*\ifdraft{\SKV@ifdraft}}%
- {\SKV@vbsmsg{info}{\SKV@useinfo{ifdraft}}}%
+ {\SKV@vbmsg{info}{\SKV@useinfo{ifdraft}}}%
}
\SKV@ifundef\ifnotdraft
{\SKV@pdef*\ifnotdraft{\SKV@ifnotdraft}}%
- {\SKV@vbsmsg{info}{\SKV@useinfo{ifnotdraft}}}
+ {\SKV@vbmsg{info}{\SKV@useinfo{ifnotdraft}}}
\SKV@ifundef\iffinal
{\SKV@pdef*\iffinal{\SKV@iffinal}}%
- {\SKV@vbsmsg{info}{\SKV@useinfo{iffinal}}}
+ {\SKV@vbmsg{info}{\SKV@useinfo{iffinal}}}
\SKV@ifundef\ifnotfinal
{\SKV@pdef*\ifnotfinal{\SKV@ifnotfinal}}%
- {\SKV@vbsmsg{info}{\SKV@useinfo{ifnotfinal}}}
+ {\SKV@vbmsg{info}{\SKV@useinfo{ifnotfinal}}}
\SKV@def\SKV@star@or@long#1{%
\SKV@ifstar
{\let\l@ngrel@x\relax\def\@star@or@none{*}#1}%
@@ -1415,64 +1602,68 @@
}
\SKV@redef\@check@eq#1#2{%
\SKV@ifx{#1}{#2}{}{%
- \SKV@vbsmsg{warn}{%
+ \SKV@vbmsg{warn}{%
Previous definition of '\string#1'\SKV@MB
doesn't match your new definition.\SKV@MB
* I haven't redefined '\string#1' *}%
}%
}
\SKV@def*\SKV@getswstate#1#2{%
- \SKV@ifstrequal{#2}{true}{\def\SKV@resvd{true}}%
- {\SKV@ifstrequal{#2}{false}{\def\SKV@resvd{false}}%
- {\SKV@ifstrequal{#2}{on}{\def\SKV@resvd{true}}%
- {\SKV@ifstrequal{#2}{off}{\def\SKV@resvd{false}}%
- {\SKV@swvalerr{#1}{#2}}}}}%
+ \SKV@checkchoice{#2}{true,on,false,off}{%
+ \ifcase\nr\relax
+ \def\SKV@swval{true}%
+ \or
+ \def\SKV@swval{true}%
+ \or
+ \def\SKV@swval{false}%
+ \or
+ \def\SKV@swval{false}%
+ \fi
+ }{%
+ \SKV@swvalerr{#1}{#2}%
+ }%
}
-\SKV@pdef*\newswitch{\SKV@testopt\SKV@newswitch{}}
+\SKV@pdef*\newswitch{\SKV@swtrue\SKV@testopt\SKV@newswitch{}}
+\SKV@pdef*\defswitch{\SKV@swfalse\SKV@testopt\SKV@newswitch{}}
\SKV@def*\SKV@newswitch[#1]#2{\SKV@testopt{\SKV@n@wswitch[#1]{#2}}{false}}
\SKV@def*\SKV@n@wswitch[#1]#2[#3]{%
\SKV@in@n{,}{#2}{%
- \SKV@err{Command '\string\newswitch' doesn't accept list}%
- {Please submit only one switch to '\string\newswitch' at a time.}%
+ \SKV@err{%
+ Command \ifSKV@sw'\string\newswitch'\else'\string\defswitch'\fi\space
+ doesn't accept list
+ }{%
+ Please submit only one switch to \ifSKV@sw'\string\newswitch'\else
+ '\string\defswitch'\fi\SKV@MB at a time. You may consider using
+ \ifSKV@sw'\string\NewSwitches'\else'\string\DefSwitches'\fi\SKV@MB
+ if you really want to define a set of switches.
+ }%
}{}%
\SKV@ensurenoscape{#2}%
\SKV@ifstrnotequal{#1#2}{x}{}{%
\SKV@err{'\string\ifx' is a TeX primitive}%
- {You can't redefine '\string\ifx'? This is dangerous.}%
- }%
- \SKV@getswstate\newswitch{#3}%
- \SKV@csifdefinable{if#1#2}{%
- \csnewif{if#1#2}%
- \@nameuse{#1#2\SKV@resvd}%
- }%
-}
-\SKV@pdef*\defswitch{\SKV@testopt\SKV@defswitch{}}
-\SKV@def*\SKV@defswitch[#1]#2{\SKV@testopt{\SKV@d@fswitch[#1]{#2}}{false}}
-\SKV@def*\SKV@d@fswitch[#1]#2[#3]{%
- \SKV@ensurenoscape{#2}%
- \SKV@in@n{,}{#2}{%
- \SKV@err{Command '\string\defswitch' doesn't accept list}%
- {Please submit only one switch to '\string\defswitch' at a time.}%
- }{}%
- \SKV@ifcsundef{if#1#2}{}{%
- \SKV@vbsmsg{warn}{Switch '\@backslashchar if#1#2' redefined\on@line}%
- }%
- \SKV@ifstrnotequal{#1#2}{x}{}{%
- \SKV@err{'\string\ifx' is a TeX primitive}%
- {Why do you want to redefine '\string\ifx'? This is dangerous.}%
+ {You can't redefine '\string\ifx'! This is dangerous.}%
}%
- \SKV@getswstate\defswitch{#3}%
+ \ifSKV@sw
+ \SKV@getswstate\newswitch{#3}%
+ \SKV@csifdefinable{if#1#2}\relax
+ \else
+ \SKV@getswstate\defswitch{#3}%
+ \SKV@ifcsundef{if#1#2}{}{%
+ \SKV@vbmsg{warn}{Switch '\@backslashchar if#1#2' redefined\on@line}%
+ }%
+ \fi
\csnewif{if#1#2}%
- \@nameuse{#1#2\SKV@resvd}%
+ \@nameuse{#1#2\SKV@swval}%
}
\SKV@newlet\NewSwitches\NewBooleans
+\SKV@newlet\DefSwitches\DefBooleans
\SKV@def*\setswitch#1#2{%
\SKV@ensurenoscape{#1}%
\SKV@ifcsundef{if#1}{%
\SKV@noswerr{#1}%
}{%
\SKV@getswstate\setswitch{#2}%
- \csname#1\SKV@resvd\endcsname
+ \csname#1\SKV@swval\endcsname
}%
}
\SKV@def*\switchon#1{%
@@ -1513,35 +1704,39 @@
\SKV@err{Toggle '#1' undefined}%
{You need to first define '#1' before use.}%
}
-\SKV@pdef*\newtog{\SKV@testopt\SKV@newtog{}}
+\SKV@pdef*\newtog{\SKV@swtrue\SKV@testopt\SKV@newtog{}}
+\SKV@pdef*\deftog{\SKV@swfalse\SKV@testopt\SKV@newtog{}}
\SKV@def*\SKV@newtog[#1]#2{\SKV@testopt{\SKV@n@wtog[#1]{#2}}{false}}
\SKV@def*\SKV@n@wtog[#1]#2[#3]{%
\SKV@in@n{,}{#2}{%
- \SKV@err{Command '\string\newtog' doesn't accept list}%
- {Please submit only one tog to '\string\newtog' at a time.}%
- }{}%
- \SKV@ensurenoscape{#2}%
- \SKV@ifcsdef{SKV@toggle@#1#2}{%
- \SKV@err{Toggle '#1#2' already defined}%
- {Please provide a new toggle or redefine '#1#2'.}%
- }{\SKV@csletcs{SKV@toggle@#1#2}{SKV@t@ggle#3}}%
-}
-\SKV@pdef*\deftog{\SKV@testopt\SKV@deftog{}}
-\SKV@def*\SKV@deftog[#1]#2{\SKV@testopt{\SKV@d@ftog[#1]{#2}}{false}}
-\SKV@def*\SKV@d@ftog[#1]#2[#3]{%
- \SKV@in@n{,}{#2}{%
- \SKV@err{Command '\string\deftog' doesn't accept list}%
- {Please submit only one tog to '\string\deftog' at a time.}%
+ \SKV@err{%
+ Command \ifSKV@sw'\string\newtog'\else'\string\deftog'\fi\space
+ doesn't accept list
+ }{%
+ Please submit only one tog to \ifSKV@sw'\string\newtog'\else
+ '\string\deftog'\fi\space at a time.\SKV@MB You can use
+ \ifSKV@sw'\string\NewTogs'\else'\string\DefTogs'\fi\space
+ to define a set of togs.
+ }%
}{}%
\SKV@ensurenoscape{#2}%
- \SKV@ifcsundef{SKV@toggle@#1#2}{}{%
- \SKV@vbsmsg{warn}{Toggle '#1#2' redefined\on@line}%
- }%
- \SKV@csletcs{SKV@toggle@#1#2}{SKV@t@ggle#3}
+ \ifSKV@sw
+ \SKV@getswstate\newtog{#3}%
+ \SKV@ifcsdef{SKV@toggle@#1#2}{%
+ \SKV@err{Toggle '#1#2' already defined}%
+ {Please provide a new toggle or use '\string\deftog'.}%
+ }{}%
+ \else
+ \SKV@getswstate\deftog{#3}%
+ \SKV@ifcsundef{SKV@toggle@#1#2}{}{%
+ \SKV@vbmsg{warn}{Toggle '#1#2' redefined\on@line}%
+ }%
+ \fi
+ \SKV@csletcs{SKV@toggle@#1#2}{SKV@t@ggle\SKV@swval}
}
\SKV@pdef*\providetog#1{%
\SKV@ifcsdef{SKV@toggle@#1}{%
- \SKV@vbsmsg{info}%
+ \SKV@vbmsg{info}%
{Toggle '#1' already defined.\SKV@MB Not redefined\on@line}%
}{\SKV@cslet{SKV@toggle@#1}\@secondoftwo}%
}
@@ -1595,11 +1790,11 @@
}
\SKV@ifundef\ifnotpdf
{\let\ifnotpdf\SKV@ifnotpdf}%
- {\SKV@vbsmsg{info}{\SKV@useinfo{ifnotpdf}}}
+ {\SKV@vbmsg{info}{\SKV@useinfo{ifnotpdf}}}
\SKV@AtDocumentStart{%
\SKV@ifundef\ifpdf
{\SKV@pdef*\ifpdf{\SKV@ifpdf}}%
- {\SKV@vbsmsg{info}{\SKV@useinfo{ifpdf}}}%
+ {\SKV@vbmsg{info}{\SKV@useinfo{ifpdf}}}%
}
\SKV@pdef*\SKV@definedkey@err#1{%
\SKV@ifcsundef{\XKV@header#1}{}{%
@@ -1607,13 +1802,12 @@
with prefix '\SKV@pref'}{Use another key name instead of '#1'.}%
}%
}
-\SKV@pdef*\define@menukey{\define@choicekey}
-\SKV@pdef*\define@togkey{%
+\SKV@pdef*\define@togkey{\SKV@skfalse
\XKV@t@stopta{\XKV@testoptd\SKV@define@togkey{}}}
\SKV@def*\SKV@define@togkey#1#2[#3]{%
\SKV@findkeypointers{#2}%
\SKV@ifcsundef{\XKV@header\SKV@resa}{}{%
- \SKV@vbsmsg{warn}{%
+ \SKV@vbmsg{warn}{%
Key '\SKV@resa' in family '\XKV@tfam' with\SKV@MB
prefix '\SKV@pref' redefined\on@line}
\SKV@Undef+{\XKV@header\SKV@resa,SKV@toggle@#1\SKV@resa}%
@@ -1632,24 +1826,25 @@
}
\SKV@def*\SKV@d@fine@togkey#1#2#3#4#5{%
\SKV@d@f@ne@t@gkey#1{#2}{#3}{#4}%
- {{\SKV@expargs{0}{\SKV@getswstate{}}\XKV@resa\@nil
- \settog{#3}{\SKV@resvd}#5}}%
+ {{\SKV@expargs{0}{\SKV@getswstate\SKV@d@fine@togkey}\XKV@resa\@nil
+ \settog{#3}{\SKV@swval}#5}}%
}
\SKV@def*\SKV@d@f@ne@togkey#1#2#3#4#5#6{%
\SKV@d@f@ne@t@gkey#1{#2}{#3}{#4}%
- {{\SKV@expargs{0}{\SKV@getswstate{}}\XKV@resa\@nil
- \settog{#3}{\SKV@resvd}#5}{#6}}%
+ {{\SKV@expargs{0}{\SKV@getswstate\SKV@d@f@ne@togkey}\XKV@resa\@nil
+ \settog{#3}{\SKV@swval}#5}{#6}}%
}
\SKV@def*\SKV@d@f@ne@t@gkey#1#2#3#4#5{%
\deftog{#3}%
\ifXKV@st\XKV@define@default{#2}{#4}\fi
- \def#1##1{%
- \def#1####1{##1\XKV@sttrue
- \XKV@checkchoice[\XKV@resa]{####1}{true,false,on,off}#5}%
+ \edef#1##1{%
+ \def#1####1{##1\unexpanded{\XKV@sttrue\XKV@checkchoice[\XKV@resa]}%
+ {####1}{true,false,on,off}\unexpanded{#5}%
+ }%
}%
\ifXKV@pl#1\XKV@pltrue\else#1\XKV@plfalse\fi
}
-\SKV@pdef*\define@togkeys{%
+\SKV@pdef*\define@togkeys{\SKV@skfalse
\XKV@plfalse\XKV@testoptd\SKV@define@togkeys{}}
\SKV@def*\SKV@define@togkeys#1#2[#3]{%
\SKV@despacelist{#2}%
@@ -1661,7 +1856,7 @@
\SKV@def*\SKV@d@fine@togkeys#1#2#3{%
\SKV@findkeypointers{#1}%
\SKV@ifcsundef{\XKV@header\SKV@resa}{}{%
- \SKV@vbsmsg{warn}{%
+ \SKV@vbmsg{warn}{%
Key '\SKV@resa' in family '\XKV@tfam' with\SKV@MB
prefix '\SKV@pref' redefined\on@line}
\SKV@Undef+{\XKV@header\SKV@resa,SKV@toggle@#2\SKV@resa}%
@@ -1674,7 +1869,7 @@
}%
\SKV@tempa\SKV@d@f@ne@t@gkey\settog\XKV@resa
}
-\SKV@pdef*\newordkey{\XKV@testoptb\SKV@newordkey}
+\SKV@pdef*\newordkey{\SKV@skfalse\XKV@testoptb\SKV@newordkey}
\SKV@def*\SKV@newordkey#1{%
\SKV@findkeypointers{#1}%
\SKV@expnext\SKV@definedkey@err\SKV@resa
@@ -1685,8 +1880,9 @@
}%
\SKV@tempa
}
-\SKV@pdef*\newcmdkey{\XKV@testoptd\SKV@newcmdkey{cmd}}
+\SKV@pdef*\newcmdkey{\SKV@skfalse\XKV@testoptd\SKV@newcmdkey{cmd}}
\SKV@def*\SKV@newcmdkey#1#2[#3]#4{%
+ \SKV@reservmp{#1}\SKV@rmpnames
\SKV@findkeypointers{#2}%
\SKV@expnext\SKV@definedkey@err\SKV@resa
\ifXKV@st
@@ -1694,13 +1890,12 @@
\SKV@expnext\XKV@define@default\SKV@resa{#3}%
\fi
\begingroup
- \edef\SKV@tempa{\noexpand\def\@nameuse{\XKV@header\SKV@resa}####1}%
- \edef\SKV@tempb{\noexpand\def\@nameuse{#1\SKV@resa}%
- \unexpanded{{##1}#4}}%
+ \edef\SKV@tempa{\def\SKV@noexpcs{\XKV@header\SKV@resa}####1}%
+ \edef\SKV@tempb{\def\SKV@noexpcs{#1\SKV@resa}\unexpanded{{##1}#4}}%
\expandafter\expandafter\expandafter\endgroup
\expandafter\SKV@tempa\expandafter{\SKV@tempb}%
}
-\SKV@pdef*\newcmdkeys{\XKV@testoptd\SKV@newcmdkeys{cmd}}
+\SKV@pdef*\newcmdkeys{\SKV@skfalse\XKV@testoptd\SKV@newcmdkeys{cmd}}
\SKV@def*\SKV@newcmdkeys#1#2[#3]{%
\SKV@despacelist{#2}%
\SKV@for*[,]\SKV@resa\SKV@tempa{%
@@ -1708,7 +1903,8 @@
\SKV@tempa[#3]{}%
}%
}
-\SKV@pdef*\newchoicekey{\XKV@testopta{\XKV@testoptb\SKV@newchoicekey}}
+\SKV@pdef*\newchoicekey{\SKV@skfalse
+ \XKV@testopta{\XKV@testoptb\SKV@newchoicekey}}
\SKV@def*\SKV@newchoicekey#1{%
\SKV@findkeypointers{#1}%
\SKV@expnext\SKV@definedkey@err\SKV@resa
@@ -1717,7 +1913,8 @@
\SKV@tempa\XKV@d@fine@choicekey
}
\let\newmenukey\newchoicekey
-\SKV@pdef*\newboolkey{\XKV@t@stopta{\XKV@testoptd\SKV@newboolkey{}}}
+\SKV@pdef*\newboolkey{\SKV@skfalse
+ \XKV@t@stopta{\XKV@testoptd\SKV@newboolkey{}}}
\SKV@def*\SKV@newboolkey#1#2[#3]{%
\SKV@findkeypointers{#2}%
\SKV@expnext\SKV@definedkey@err\SKV@resa
@@ -1729,7 +1926,8 @@
\edef\SKV@tempa{{\XKV@header\SKV@resa}{\SKV@resa}{#1\SKV@resa}{#3}}%
\expandafter\SKV@next\SKV@tempa
}
-\SKV@pdef*\newboolkeys{\XKV@plfalse\XKV@testoptd\SKV@newboolkeys{}}
+\SKV@pdef*\newboolkeys{\SKV@skfalse
+ \XKV@plfalse\XKV@testoptd\SKV@newboolkeys{}}
\SKV@def*\SKV@newboolkeys#1#2[#3]{%
\SKV@despacelist{#2}%
\SKV@for*[,]\SKV@resa\SKV@tempa{%
@@ -1738,7 +1936,8 @@
\XKV@d@fine@boolkeys{{\SKV@tempa}}{{#1}{#3}}\@nil
}%
}
-\SKV@pdef*\newtogkey{\XKV@t@stopta{\XKV@testoptd\SKV@newtogkey{}}}
+\SKV@pdef*\newtogkey{\SKV@skfalse
+ \XKV@t@stopta{\XKV@testoptd\SKV@newtogkey{}}}
\SKV@def*\SKV@newtogkey#1#2[#3]{%
\SKV@findkeypointers{#2}%
\SKV@expnext\SKV@definedkey@err\SKV@resa
@@ -1752,7 +1951,8 @@
{\XKV@header\SKV@resa}{\SKV@resa}{#1\SKV@resa}{#3}}%
\aftergroup\SKV@next\SKV@tempa
}
-\SKV@pdef*\newtogkeys{\XKV@plfalse\XKV@testoptd\SKV@newtogkeys{}}
+\SKV@pdef*\newtogkeys{\SKV@skfalse
+ \XKV@plfalse\XKV@testoptd\SKV@newtogkeys{}}
\SKV@def*\SKV@newtogkeys#1#2[#3]{%
\SKV@despacelist{#2}%
\SKV@for*[,]\SKV@resa\SKV@tempa{%
@@ -1903,22 +2103,23 @@
}%
}
\SKV@pdef*\define@keylist{%
- \let\SKV@def@ordkey\define@key
- \let\SKV@def@cmdkey\define@cmdkey
- \let\SKV@def@boolkey\define@boolkey
- \let\SKV@def@togkey\define@togkey
- \let\SKV@def@choicekey\define@choicekey
- \SKV@savstate
- \SKV@t@stopta\SKV@define@keylist
+ \SKV@define@keylist\define@key\define@cmdkey
+ \define@boolkey\define@togkey\define@choicekey
}
\SKV@pdef*\newkeylist{%
- \let\SKV@def@ordkey\newordkey
- \let\SKV@def@cmdkey\newcmdkey
- \let\SKV@def@boolkey\newboolkey
- \let\SKV@def@togkey\newtogkey
- \let\SKV@def@choicekey\newchoicekey
+ \SKV@define@keylist\newordkey\newcmdkey
+ \newboolkey\newtogkey\newchoicekey
+}
+\newcommand*\SKV@define@keylist[5]{%
+ \let\SKV@def@ordkey#1%
+ \let\SKV@def@cmdkey#2%
+ \let\SKV@def@boolkey#3%
+ \let\SKV@def@togkey#4%
+ \let\SKV@def@choicekey#5%
\SKV@savstate
- \SKV@t@stopta\SKV@define@keylist
+ \begingroup
+ \@makeother{\#}%
+ \SKV@t@stopta\SKV@d@fine@keylist
}
\SKV@def*\choicekeyvalues{%
\SKV@t@stopta{\SKV@testopt\SKV@choic@keyvalues\SKV@keyprefix}}
@@ -1983,11 +2184,11 @@
\let\SKV@altlisterr\z@
\SKV@sp@def{#1}\SKV@tempa
\SKV@checkchoice{\SKV@tempa}{ord,cmd,bool,tog,choice,menu}{%
- \SKV@iftest{num}{\nr=5}{%
+ \ifnum\nr=5%
\let\SKV@keytype\nr
- }{%
+ \else
\edef\SKV@keytype{\the\numexpr\nr+1}%
- }%
+ \fi
}{%
\SKV@checkchoice{\SKV@tempa}{1,2,3,4,5}{%
\edef\SKV@keytype{\the\numexpr\nr+1}%
@@ -2062,38 +2263,34 @@
}%
\fi
}
-\def\XKV@makepf#1{%
+\SKV@def*\SKV@resvfampf#1#2{%
+ \begingroup
+ \SKV@expnext\XKV@checksanitizeb#2\SKV@tempa
+ \SKV@despacelist*\SKV@tempa
+ \XKV@knftrue
+ \XKV@whilist\SKV@tempa\SKV@tempa\ifXKV@knf\fi{%
+ \SKV@aftercs\ifx{XKV@#1}\SKV@tempa\XKV@knffalse\fi
+ }%
+ \unless\ifXKV@knf
+ \SKV@afterfi
+ \SKV@err{Key #1 '\SKV@tempa' is reserved}%
+ {You have used a reserved key #1: '\SKV@tempa'.\SKV@MB
+ Use another #1 name instead of '\SKV@tempa'.}%
+ \fi
+ \endgroup
+}
+\SKV@redef*\XKV@makepf#1{%
\SKV@sp@def{#1}\XKV@prefix
- \ifSKV@sk\else
- \SKV@expnext\XKV@checksanitizeb\SKV@rkpnames\SKV@tempa
- \SKV@despacelist*\SKV@tempa
- \XKV@knftrue
- \XKV@whilist\SKV@tempa\SKV@tempa\ifXKV@knf\fi{%
- \ifx\XKV@prefix\SKV@tempa\XKV@knffalse\fi
- }%
- \unless\ifXKV@knf
- \SKV@afterfi
- \SKV@err{Prefix '\SKV@tempa' is reserved}%
- {Use another prefix name instead of '\SKV@tempa'.}%
- \fi
+ \unless\ifSKV@sk
+ \SKV@resvfampf{prefix}\SKV@rkpnames
\fi
\edef\SKV@pref{\ifx\XKV@prefix\@empty\else\XKV@prefix\fi}%
\edef\XKV@prefix{\ifx\XKV@prefix\@empty\else\XKV@prefix @\fi}%
}
-\def\XKV@makehd#1{%
+\SKV@redef*\XKV@makehd#1{%
\SKV@expargs{3}\SKV@sp@def{{#1}}\XKV@header\@nil
- \ifSKV@sk\else
- \SKV@expnext\XKV@checksanitizeb\SKV@rfnames\SKV@tempa
- \SKV@despacelist*\SKV@tempa
- \XKV@knftrue
- \XKV@whilist\SKV@tempa\SKV@tempa\ifXKV@knf\fi{%
- \ifx\XKV@header\SKV@tempa\XKV@knffalse\fi
- }%
- \unless\ifXKV@knf
- \SKV@afterfi
- \SKV@err{Family '\SKV@tempa' is reserved}%
- {Use another family name instead of '\SKV@tempa'.}%
- \fi
+ \unless\ifSKV@sk
+ \SKV@resvfampf{family}\SKV@rfnames
\fi
\edef\XKV@header{%
\XKV@prefix\ifx\XKV@header\@empty\else\XKV@header @\fi}%
@@ -2113,11 +2310,11 @@
\SKV@def*\SKV@addtouserval{%
\SKV@addtolist+{SKV@\XKV@header uservalue}\SKV@resa}
\SKV@def*\SKV@gaddtouserval{%
- \SKV@addtolist+?{SKV@\XKV@header uservalue}\SKV@resa}
+ \SKV@addtolist+!{SKV@\XKV@header uservalue}\SKV@resa}
\SKV@def*\SKV@addtosave{\SKV@addtolist+{XKV@\XKV@header save}\SKV@resa}
\SKV@def*\SKV@gaddtosave{\begingroup
\edef\SKV@tempa{\endgroup
- \SKV@addtolist+?{XKV@\XKV@header save}{\global{\SKV@resa}}}%
+ \SKV@addtolist+!{XKV@\XKV@header save}{\global{\SKV@resa}}}%
\SKV@tempa
}
\SKV@def*\SKV@findkeypointers#1{%
@@ -2143,10 +2340,11 @@
{\SKV@gaddtosave}%
{}}}}}}}}}}%
}
+\SKV@predef*\define@key{\SKV@skfalse\XKV@testoptb\XKV@define@key}
\def\XKV@define@key#1{%
\SKV@findkeypointers{#1}%
\SKV@ifcsundef{\XKV@header\SKV@resa}{}{%
- \SKV@vbsmsg{warn}{%
+ \SKV@vbmsg{warn}{%
Key '\SKV@resa' in family '\XKV@tfam' with\SKV@MB
prefix '\SKV@pref' redefined\on@line}
\SKV@csundef{\XKV@header\SKV@resa}%
@@ -2165,10 +2363,32 @@
\@namedef{\XKV@header#1}##1{#3}%
}
\def\SKV@d@fine@key#1#2{\@namedef{\XKV@header#1}##1{#2}}
+\SKV@def*\SKV@reservmp#1#2{%
+ \begingroup
+ \SKV@sp@def{#1}\SKV@tempb
+ \SKV@expnext\XKV@checksanitizeb#2\SKV@tempa
+ \SKV@despacelist*\SKV@tempa
+ \XKV@knftrue
+ \XKV@whilist\SKV@tempa\SKV@tempa\ifXKV@knf\fi{%
+ \ifx\SKV@tempb\SKV@tempa\XKV@knffalse\fi
+ }%
+ \unless\ifXKV@knf
+ \SKV@afterfi
+ \SKV@err{Macro prefix '\SKV@tempa' is reserved}%
+ {You have used a reserved macro prefix: '\SKV@tempa'.\SKV@MB
+ Use another macro prefix name instead of '\SKV@tempa'.}%
+ \fi
+ \endgroup
+}
+\SKV@predef*\define@cmdkey{%
+ \SKV@skfalse\XKV@testoptd\XKV@define@cmdkey{cmd}}
+\SKV@predef*\define@cmdkeys{%
+ \SKV@skfalse\XKV@testoptd\XKV@define@cmdkeys{cmd}}
\def\XKV@define@cmdkey#1#2[#3]#4{%
+ \SKV@reservmp{#1}\SKV@rmpnames
\SKV@findkeypointers{#2}%
\SKV@ifcsundef{\XKV@header\SKV@resa}{}{%
- \SKV@vbsmsg{warn}{%
+ \SKV@vbmsg{warn}{%
Key '\SKV@resa' in family '\XKV@tfam' with\SKV@MB
prefix '\SKV@pref' redefined\on@line}
\SKV@Undef+{\XKV@header\SKV@resa,#1\SKV@resa}%
@@ -2185,10 +2405,13 @@
\SKV@threexp\endgroup\expandafter\SKV@tempa\expandafter%
{\expandafter\def\csname#1\SKV@resa\endcsname{##1}#4}%
}
+\SKV@predef*\define@choicekey{\SKV@skfalse
+ \XKV@testopta{\XKV@testoptb\XKV@define@choicekey}}
+\SKV@newlet\define@menukey\define@choicekey
\def\XKV@define@choicekey#1{%
\SKV@findkeypointers{#1}%
\SKV@ifcsundef{\XKV@header\SKV@resa}{}{%
- \SKV@vbsmsg{warn}{%
+ \SKV@vbmsg{warn}{%
Key '\SKV@resa' in family '\XKV@tfam' with\SKV@MB
prefix '\SKV@pref' redefined\on@line}
\SKV@csundef{\XKV@header\SKV@resa}%
@@ -2201,10 +2424,14 @@
}%
\SKV@tempa
}
+\SKV@predef*\define@boolkey{\SKV@skfalse
+ \XKV@t@stopta{\XKV@testoptd\XKV@define@boolkey{}}}
+\SKV@predef*\define@boolkeys{\SKV@skfalse
+ \XKV@plfalse\XKV@testoptd\XKV@define@boolkeys{}}
\def\XKV@define@boolkey#1#2[#3]{%
\SKV@findkeypointers{#2}%
\SKV@ifcsundef{\XKV@header\SKV@resa}{}{%
- \SKV@vbsmsg{warn}{%
+ \SKV@vbmsg{warn}{%
Key '\SKV@resa' in family '\XKV@tfam' with\SKV@MB
prefix '\SKV@pref' redefined\on@line}%
\SKV@Undef+{\XKV@header\SKV@resa,#1\SKV@resa}%
@@ -2221,27 +2448,28 @@
}
\def\XKV@d@fine@boolkey#1#2#3#4#5{%
\XKV@d@f@ne@b@olkey#1{#2}{#3}{#4}%
- {{\SKV@expargs{0}{\SKV@getswstate{}}\XKV@resa\@nil
- \csname#3\SKV@resvd\endcsname#5}}%
+ {{\SKV@expargs{0}{\SKV@getswstate\XKV@d@fine@boolkey}\XKV@resa\@nil
+ \csname#3\SKV@swval\endcsname#5}}%
}
\def\XKV@d@f@ne@boolkey#1#2#3#4#5#6{%
\XKV@d@f@ne@b@olkey#1{#2}{#3}{#4}%
- {{\SKV@expargs{0}{\SKV@getswstate{}}\XKV@resa\@nil
- \csname#3\SKV@resvd\endcsname#5}{#6}}%
+ {{\SKV@expargs{0}{\SKV@getswstate\XKV@d@f@ne@boolkey}\XKV@resa\@nil
+ \csname#3\SKV@swval\endcsname#5}{#6}}%
}
\def\XKV@d@f@ne@b@olkey#1#2#3#4#5{%
\csnewif{if#3}%
\ifXKV@st\XKV@define@default{#2}{#4}\fi
- \def#1##1{%
- \def#1####1{##1\XKV@sttrue
- \XKV@checkchoice[\XKV@resa]{####1}{true,false,on,off}#5}%
+ \edef#1##1{%
+ \def#1####1{##1\unexpanded{\XKV@sttrue\XKV@checkchoice[\XKV@resa]}%
+ {####1}{true,false,on,off}\unexpanded{#5}%
+ }%
}%
\ifXKV@pl#1\XKV@pltrue\else#1\XKV@plfalse\fi
}
\def\XKV@d@fine@boolkeys#1#2#3{%
\SKV@findkeypointers{#1}%
\SKV@ifcsundef{\XKV@header\SKV@resa}{}{%
- \SKV@vbsmsg{warn}{%
+ \SKV@vbmsg{warn}{%
Key '\SKV@resa' in family '\XKV@tfam' with\SKV@MB
prefix '\SKV@pref' redefined\on@line}
\SKV@Undef+{\XKV@header\SKV@resa,#2\SKV@resa}%
@@ -2306,60 +2534,60 @@
\SKV@def*\SKV@ifkeyreserved[#1]#2#3{%
\XKV@checksanitizeb{#1}\SKV@tempa
\SKV@despacelist*\SKV@tempa
- \XKV@knftrue
+ \SKV@swtrue
\SKV@for*[,]\SKV@tempa\SKV@tempa{%
\SKV@expnext\SKV@ifkey@reserved\SKV@tempa{#2}{#3}%
}%
- \@nameuse{@\ifXKV@knf second\else first\fi oftwo}%
+ \@nameuse{SKV@\ifSKV@sw2\else1\fi of2}%
}
\SKV@def*\SKV@ifkey@reserved#1#2#3{%
\XKV@makepf{#1}%
\XKV@checksanitizeb{#2}\XKV@fams
\SKV@despacelist*\XKV@fams
\SKV@sp@def{#3}\XKV@tkey
- \XKV@whilist\XKV@fams\XKV@tfam\ifXKV@knf\fi{%
+ \XKV@whilist\XKV@fams\XKV@tfam\ifSKV@sw\fi{%
\XKV@makehd\XKV@tfam
- \SKV@ifcsdef{\XKV@header\XKV@tkey @reser}{\XKV@knffalse}{}%
+ \SKV@ifcsdef{\XKV@header\XKV@tkey @reser}\SKV@swfalse\relax
}%
}
\SKV@def*\ifkeysuspended{\@testopt\SKV@ifkeysuspended{KV}}
\SKV@def*\SKV@ifkeysuspended[#1]#2#3{%
\XKV@checksanitizeb{#1}\SKV@tempa
\SKV@despacelist*\SKV@tempa
- \XKV@knftrue
+ \SKV@swtrue
\SKV@for*[,]\SKV@tempa\SKV@tempa{%
\SKV@expnext\SKV@ifkey@suspended\SKV@tempa{#2}{#3}%
}%
- \@nameuse{@\ifXKV@knf second\else first\fi oftwo}%
+ \@nameuse{SKV@\ifSKV@sw2\else1\fi of2}%
}
\SKV@def*\SKV@ifkey@suspended#1#2#3{%
\XKV@makepf{#1}%
\XKV@checksanitizeb{#2}\XKV@fams
\SKV@despacelist*\XKV@fams
\SKV@sp@def{#3}\XKV@tkey
- \XKV@whilist\XKV@fams\XKV@tfam\ifXKV@knf\fi{%
+ \XKV@whilist\XKV@fams\XKV@tfam\ifSKV@sw\fi{%
\XKV@makehd\XKV@tfam
- \SKV@ifcsdef{\XKV@header\XKV@tkey @susp}{\XKV@knffalse}{}%
+ \SKV@ifcsdef{\XKV@header\XKV@tkey @susp}\SKV@swfalse\relax
}%
}
\SKV@def*\ifkeydefined{\@testopt\SKV@ifkeydefined{KV}}
\SKV@def*\SKV@ifkeydefined[#1]#2#3{%
\XKV@checksanitizeb{#1}\SKV@tempa
\SKV@despacelist*\SKV@tempa
- \XKV@knftrue
+ \SKV@swtrue
\SKV@for*[,]\SKV@tempa\SKV@tempa{%
\SKV@expnext\SKV@ifk@ydefined\SKV@tempa{#2}{#3}%
}%
- \@nameuse{@\ifXKV@knf second\else first\fi oftwo}%
+ \@nameuse{SKV@\ifSKV@sw2\else1\fi of2}%
}
\SKV@def*\SKV@ifk@ydefined#1#2#3{%
\XKV@makepf{#1}%
\XKV@checksanitizeb{#2}\XKV@fams
\SKV@despacelist*\XKV@fams
\SKV@sp@def{#3}\XKV@tkey
- \XKV@whilist\XKV@fams\XKV@tfam\ifXKV@knf\fi{%
+ \XKV@whilist\XKV@fams\XKV@tfam\ifSKV@sw\fi{%
\XKV@makehd\XKV@tfam
- \SKV@ifcsdef{\XKV@header\XKV@tkey}{\XKV@knffalse}{}%
+ \SKV@ifcsdef{\XKV@header\XKV@tkey}\SKV@swfalse\relax
}%
}
\SKV@def*\SKV@disabledkey@err{%
@@ -2479,7 +2707,7 @@
\SKV@despacelist*\SKV@tempa
\SKV@for@b\SKV@tempa\SKV@tempa{%
\SKV@ifcsundef{\XKV@header\SKV@tempa}{%
- \SKV@vbsmsg{warn}{%
+ \SKV@vbmsg{warn}{%
Key '\SKV@tempa' with prefix '\SKV@pref'
\SKV@MB is undefined in family '\XKV@tfam':
\SKV@MB can't be suspended\on@line}%
@@ -2500,7 +2728,7 @@
\edef\SKV@suspkey{#1}%
\global\SKV@csletcs{\XKV@header#1@susp}{\XKV@header#1}%
\SKV@csedef*{\XKV@header#1}{\SKV@suspkey@e@r}%
- \SKV@vbsmsg{info}{Key '\SKV@suspkey' with prefix '\SKV@pref' in
+ \SKV@vbmsg{info}{Key '\SKV@suspkey' with prefix '\SKV@pref' in
\SKV@MB family '\XKV@tfam' was suspended\on@line}%
}%
}
@@ -2526,7 +2754,7 @@
\SKV@despacelist*\SKV@tempa
\SKV@for@b\SKV@tempa\SKV@tempa{%
\SKV@ifcsundef{\XKV@header\SKV@tempa}{%
- \SKV@vbsmsg{warn}{Key '\SKV@tempa' with prefix '\SKV@pref'
+ \SKV@vbmsg{warn}{Key '\SKV@tempa' with prefix '\SKV@pref'
\SKV@MB is undefined in family '\XKV@tfam':
\SKV@MB can't be restored\on@line}%
}{%
@@ -2543,7 +2771,7 @@
\edef\SKV@restoredkey{#1}%
\SKV@csletcs{\XKV@header#1}{\XKV@header#1@susp}%
\SKV@csundef{\XKV@header#1@susp}%
- \SKV@vbsmsg{info}{Key '\SKV@restoredkey' with prefix
+ \SKV@vbmsg{info}{Key '\SKV@restoredkey' with prefix
'\SKV@pref' in family \SKV@MB '\XKV@tfam' restored\on@line}%
}%
}
@@ -2577,7 +2805,7 @@
{First restore key '\SKV@tempa' before removing it.}%
}%
\SKV@ifcsundef{\XKV@header\SKV@tempa}{%
- \SKV@vbsmsg{warn}{Key '\SKV@tempa' with prefix '\SKV@pref'
+ \SKV@vbmsg{warn}{Key '\SKV@tempa' with prefix '\SKV@pref'
\SKV@MB is undefined in family '\XKV@tfam':
\SKV@MB I can't remove or unreserve it\on@line}%
}{%
@@ -2596,7 +2824,7 @@
\SKV@csgundef{\SKV@tempa}%
}%
\endgroup
- \SKV@vbsmsg{info}{Key '#1' with prefix '\SKV@pref' in family\SKV@MB
+ \SKV@vbmsg{info}{Key '#1' with prefix '\SKV@pref' in family\SKV@MB
'\XKV@tfam' was removed\on@line}%
}
\SKV@newlet\unreserve@keys\remove@keys
@@ -2610,12 +2838,16 @@
}%
}
\SKV@def*\SKV@undefinedkeys#1#2#3{%
- \edef\SKV@resvd##1{\SKV@addtolist?[;]##1{(#1:#2:#3)}}%
+ \edef\SKV@resvd##1{\SKV@addtolist![;]##1{(#1:#2:#3)}}%
\SKV@resvd\SKV@und@finedkeys
}
\SKV@predef*\ExecuteOptionsX{%
\SKV@sktrue\XKV@stfalse\XKV@plfalse\XKV@t@stopte\XKV@setkeys}
\SKV@predef*\setkeys{\SKV@sktrue\XKV@testopta{\XKV@testoptc\XKV@setkeys}}
+\SKV@newlet\skvsetkeys\setkeys
+\SKV@pdef*\UseSkeyvalSetkeys{%
+ \SKV@ifx\setkeys\skvsetkeys\relax{\let\setkeys\skvsetkeys}%
+}
\SKV@redef*\XKV@setkeys[#1]#2{%
\def\skif##1{%
\SKV@ensurenoscape{##1}%
@@ -2625,8 +2857,11 @@
}%
\csname if##1\endcsname
}%
- \let\skifx\ifx\let\skifcase\ifcase\let\skor\or
- \let\skelse\else\let\skfi\fi
+ \let\skifx\ifx
+ \let\skifcase\ifcase
+ \let\skor\or
+ \let\skelse\else
+ \let\skfi\fi
\let\SKV@und@finedkeys\@empty
\XKV@checksanitizea{#2}\XKV@resb
\SKV@normalizea\XKV@resb
@@ -2642,10 +2877,14 @@
\let\CurrentOption\@empty
\SKV@skfalse
\SKV@ifx\SKV@und@finedkeys\@empty{}{%
- \SKV@warn{*** Unknown keys: \SKV@expox\SKV@und@finedkeys}%
- \typein[\answer]{^^JThere were undefined keys: see list above.
+ \def\SKV@tempa{stop}%
+ \SKV@warn{\string\setkeys\space error: Unknown keys:\SKV@MB
+ \SKV@expox\SKV@und@finedkeys}%
+ \typein[\answer]{%
+ ^^JThe following keys are undefined and couldn't be set:
+ ^^J\SKV@expox\SKV@und@finedkeys
^^JEnter 'stop' or 'go' and <return> to continue.}%
- \SKV@oifstrequal{\answer}{stop}{\stop}{}%
+ \ifx\answer\SKV@tempa\stop\fi
}%
}
\SKV@redef*\XKV@s@tk@ys#1=#2=#3\@nil{%
@@ -2656,7 +2895,8 @@
\SKV@err{No key specified for value '#2'}%
{You have supplied a value '#2' without key name.\SKV@MB
This is certainly an error on your part.\SKV@MB
- Please correct the error and rerun.}
+ I can't process this value without key name.\SKV@MB
+ Please enter 'X' and <return>. Correct the error and rerun.}
}%
}{%
\@expandtwoargs\in@{,\XKV@tkey,}{,\XKV@na,}%
@@ -2689,7 +2929,7 @@
\ifXKV@st
\XKV@addtolist@o\XKV@rm\CurrentOption
\else
- \SKV@undefinedkeys{\SKV@pref}{\XKV@fams}{\XKV@tkey}%
+ \SKV@undefinedkeys\SKV@pref\XKV@fams\XKV@tkey
\fi
\fi
\else
@@ -2702,7 +2942,7 @@
}
\SKV@redef*\XKV@s@tk@ys@#1{%
\SKV@ifcsundef{\XKV@header\XKV@tkey}{%
- \SKV@vbsmsg{warn}{No key macro for key '\XKV@tkey'\SKV@MB
+ \SKV@vbmsg{warn}{No key macro for key '\XKV@tkey'\SKV@MB
in families '\XKV@fams'}%
}{%
\XKV@knffalse
@@ -2746,9 +2986,9 @@
}%
}
\SKV@def*\SKV@testuservaluekey#1#2{%
- \SKV@tempswtrue\SKV@uvfalse
- \XKV@whilist#1\SKV@tempa\ifSKV@tempsw\fi{%
- \ifx#2\SKV@tempa\SKV@uvtrue\SKV@tempswfalse\fi
+ \SKV@swtrue\SKV@uvfalse
+ \XKV@whilist#1\SKV@tempa\ifSKV@sw\fi{%
+ \ifx#2\SKV@tempa\SKV@uvtrue\SKV@swfalse\fi
}%
}
\SKV@def*\SKV@remspaceletter#1#2{%
@@ -2842,7 +3082,7 @@
\SKV@ifcsdef\SKV@tempa{%
\SKV@err{%
\string#1\space already saved. You've to restore\SKV@MB
- it or undefine '\SKV@expcsox{\SKV@tempa}' before\SKV@MB
+ it or undefine '\SKV@csexpox{\SKV@tempa}' before\SKV@MB
you can save \string#1\space again
}\@ehc
}{%
@@ -2892,14 +3132,14 @@
\SKV@t@stopta{\SKV@testopt\SKV@InputFileOnce{.}}%
}
\SKV@def*\SKV@InputFileOnce[#1]#2{%
- \gapptomac\input@path{{#1/}}%
+ \SKV@appto!\input@path{{#1/}}%
\ifSKV@st
\SKV@afterelsefi
\SKV@inputfile{#1}{#2}%
\else
\SKV@afterfi
\SKV@ifcsdef{#2@read}{%
- \SKV@vbsmsg{warn}{File '#2' already read:\SKV@MB
+ \SKV@vbmsg{warn}{File '#2' already read:\SKV@MB
File '#2' can't be read again}%
}{%
\SKV@inputfile{#1}{#2}%
@@ -2912,32 +3152,31 @@
\SKV@pdef*\SKV@notloadederr#1{%
\SKV@ifcsdef{ver@#1.\@pkgextension}{}{%
\SKV@err{Package '#1' wasn't loaded}%
- {Document has begun and package '#1' wasn't loaded.}%
+ {Document has begun and package '#1' wasn't loaded.\SKV@MB
+ You wanted package '#1' loaded.}%
}%
}
\SKV@def*\SKV@notloaded{}
\SKV@pdef*\@ensurepackageloaded#1{%
\SKV@for[,]{#1}\SKV@resvd{%
- \expandafter\gapptomac\expandafter\SKV@notloaded
- \expandafter{\expandafter\SKV@do@b\expandafter{\SKV@resvd}}%
+ \edef\SKV@resvd##1##2{\SKV@appto!##1{##2{\SKV@resvd}}}%
+ \SKV@resvd\SKV@notloaded\SKV@doloaded
}%
}
\SKV@AtDocumentStart{%
- \let\SKV@do@b\SKV@notloadederr
+ \let\SKV@doloaded\SKV@notloadederr
\SKV@notloaded
- \global\let\SKV@do@b\@gobble
+ \global\let\SKV@doloaded\@gobble
}
\SKV@onlypreamble{%
- \SKV@preamblecmds\SKV@onlypreamble
- \@afterpackageloaded\@ifpackagecurrent\@ifpackagenotcurrent
- \SKV@notloaded\@ensurepackageloaded\SKV@AtPackageEnd
- \SKV@AtClassEnd\SKV@BeforePackageEnd\SKV@BeforeClassEnd
- \SKV@AfterPackageEnd\SKV@AfterClassEnd\SKV@BeforeLastPage
- \SKV@AfterLastPage\SKV@AfterDocumentEnd
+ \SKV@preamblecmds,\SKV@onlypreamble,\@afterpackageloaded,
+ \@ifpackagecurrent,\@ifpackagenotcurrent,\@ifloadedandcurrent,
+ \@ensurepackageloaded,\SKV@AtPackageEnd,\SKV@AtClassEnd,
+ \SKV@BeforePackageEnd,\SKV@BeforeClassEnd,\SKV@AfterPackageEnd,
+ \SKV@AfterClassEnd,\SKV@BeforeLastPage,\SKV@AfterLastPage,
+ \SKV@AfterDocumentEnd,\UseSkeyvalSetkeys
}
-%\InputIfFileExists{skeyval-x.sty}{}{}
-
\endinput
%%% End of file skeyval.sty %%%