summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx')
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx357
1 files changed, 251 insertions, 106 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx b/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
index 2db04c9b7b1..29dc5f98fd3 100644
--- a/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
@@ -22,7 +22,8 @@
% kvoptions.sty, kvoptions.pdf, kvoptions.ins, kvoptions.drv,
% kvoptions-patch.sty, example-mycolorsetup.sty,
% kvoptions-test1.tex, kvoptions-test2.tex,
-% kvoptions-test3.tex.
+% kvoptions-test3.tex, kvoptions-test4.tex,
+% kvoptions-test4.sty.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/kvoptions.dtx
@@ -62,6 +63,8 @@
% TDS:doc/latex/oberdiek/test/kvoptions-test1.tex
% TDS:doc/latex/oberdiek/test/kvoptions-test2.tex
% TDS:doc/latex/oberdiek/test/kvoptions-test3.tex
+% TDS:doc/latex/oberdiek/test/kvoptions-test4.tex
+% TDS:doc/latex/oberdiek/test/kvoptions-test4.sty
% TDS:source/latex/oberdiek/kvoptions.dtx
%
%<*ignore>
@@ -79,7 +82,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: kvoptions 2010/02/22 v3.7 Keyval support for LaTeX options (HO)}
+\Msg{* Package: kvoptions 2010/12/23 v3.10 Keyval support for LaTeX options (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -112,7 +115,8 @@ and the derived files
kvoptions.sty, kvoptions.pdf, kvoptions.ins, kvoptions.drv,
kvoptions-patch.sty, example-mycolorsetup.sty,
kvoptions-test1.tex, kvoptions-test2.tex,
- kvoptions-test3.tex.
+ kvoptions-test3.tex, kvoptions-test4.tex,
+ kvoptions-test4.sty.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -129,6 +133,8 @@ and the derived files
\file{kvoptions-test1.tex}{\from{kvoptions.dtx}{test1}}%
\file{kvoptions-test2.tex}{\from{kvoptions.dtx}{test2}}%
\file{kvoptions-test3.tex}{\from{kvoptions.dtx}{test3}}%
+ \file{kvoptions-test4.tex}{\from{kvoptions.dtx}{test4}}%
+ \file{kvoptions-test4.sty}{\from{kvoptions.dtx}{test4pkg}}%
}
\catcode32=13\relax% active space
@@ -159,7 +165,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{kvoptions.drv}%
- [2010/02/22 v3.7 Keyval support for LaTeX options (HO)]%
+ [2010/12/23 v3.10 Keyval support for LaTeX options (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -168,7 +174,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{2208}
+% \CheckSum{2361}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -189,7 +195,7 @@ and the derived files
% \GetFileInfo{kvoptions.drv}
%
% \title{The \xpackage{kvoptions} package}
-% \date{2010/02/22 v3.7}
+% \date{2010/12/23 v3.10}
% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
%
% \maketitle
@@ -330,6 +336,7 @@ and the derived files
% \begin{declcs}{SetupKeyvalOptions}\,\texttt{\{}\\
% \hspace{1.5em}|family|\,|=|\,\meta{family}|,|\\
% \hspace{1.5em}|prefix|\,|=|\,\meta{prefix}\\
+% \hspace{1.5em}|setkeys|\,|=|\,\meta{setkeys command}\\
% \texttt{\}}
% \end{declcs}
% This command allows to configure the default assumptions
@@ -351,9 +358,28 @@ and the derived files
% |prefix| & \meta{\cs{@currname}}|@| & (|foobar@|)
% & \cs{DeclareBoolOption} \\
% &&& \cs{DeclareStringOption} \\
-% &&& \cs{DeclareVoidOption}
+% &&& \cs{DeclareVoidOption} \\
+% \hline
+% \rule{0pt}{1.2\ht\csname @arstrutbox\endcsname}^^A
+% |setkeys| & \cs{setkeys} & (\cs{kvsetkeys})
+% & \cs{ProcessKeyvalOptions} \\
+% &&& \cs{ProcessLocalKeyvalOptions}
% \end{tabular}
% \end{quote}
+% Key |setkeys| was added in version 3.9. The original
+% \cs{setkeys} of package \xpackage{keyval} is not reentrant.
+% If an option is processed by this \cs{setkeys}, then
+% the option should not call \cs{setkeys} again with a
+% different family. Otherwise the next options of the
+% first \cs{setkeys} call are processed with the wrong
+% family. With key |setkeys| the macro \cs{kvsetkeys}
+% can be set that does not have the problem of the
+% original \cs{setkeys} of package {keyval}.
+%
+% Probably \cs{setkeys} of package \xpackage{xkeyval}
+% is safe in this respect. But I haven't made a full
+% analysis. At least it does not have the problem
+% of the original \cs{setkeys}.
%
% \subsection{Option declarations}
%
@@ -735,7 +761,7 @@ and the derived files
% Package identification
% -----------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{example-mycolorsetup}[2010/02/22 Managing my colors]
+\ProvidesPackage{example-mycolorsetup}[2010/12/23 Managing my colors]
\RequirePackage{ifpdf}
\RequirePackage{kvoptions}
@@ -898,19 +924,19 @@ and the derived files
% because of the cedilla |\c c|, it is not robust enough.
% \end{itemize}
% For users that do not want with this limitations the package
-% offers option \xoption{patch}. It patches \LaTeX's option system
+% offers package \xoption{kvoptions-patch}. It patches \LaTeX's option system
% and tries to teach it also to handle options that are given
% as pairs of key and value and to prevent expansion.
% It can already be used at the very beginning, before \cs{documentclass}:
% \begin{quote}
-% |\RequirePackage[patch]{kvoptions}|\\
+% |\RequirePackage{kvoptions-patch}|\\
% |\documentclass[pdfauthor=Fran\c coise M\"uller]{article}|\\
% |\usepackage{hyperref}|
% \end{quote}
% The latest time is before the package where you want to use
% problematic values:
% \begin{quote}
-% |\usepackage[patch]{kvoptions}|\\
+% |\usepackage{kvoptions-patch}|\\
% |\usepackage[Fran\c coise M\"uller]{hyperref}|
% \end{quote}
% Some remarks:
@@ -922,6 +948,10 @@ and the derived files
% works and will work without \eTeX.
% \item The code for the patch is quite long, there are many test
% cases. Thus the probability for bugs is probably not too small.
+% \item Since 2008/10/18 v3.0 package \xpackage{kvoptions-patch} is
+% available. Before option \xoption{patch} of package \xpackage{kvoptions}
+% must be used instead. I think, the solution as standalone package
+% \xpackage{kvoptions-patch} is cleaner and avoids option clashes.
% \end{itemize}
%
% \subsection{Option \xoption{debugshow}}
@@ -1045,14 +1075,18 @@ and the derived files
% \paragraph{Reload check and identification.}
% Reload check, especially if the package is not used with \LaTeX.
% \begin{macrocode}
-\begingroup
- \catcode44 12 % ,
- \catcode45 12 % -
- \catcode46 12 % .
- \catcode58 12 % :
- \catcode64 11 % @
- \catcode123 1 % {
- \catcode125 2 % }
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode35=6 % #
+ \catcode39=12 % '
+ \catcode44=12 % ,
+ \catcode45=12 % -
+ \catcode46=12 % .
+ \catcode58=12 % :
+ \catcode64=11 % @
+ \catcode123=1 % {
+ \catcode125=2 % }
\expandafter\let\expandafter\x\csname ver@kvoptions.sty\endcsname
\ifx\x\relax % plain-TeX, first loading
\else
@@ -1060,7 +1094,6 @@ and the derived files
\ifx\x\empty % LaTeX, first loading,
% variable is initialized, but \ProvidesPackage not yet seen
\else
- \catcode35 6 % #
\expandafter\ifx\csname PackageInfo\endcsname\relax
\def\x#1#2{%
\immediate\write-1{Package #1 Info: #2.}%
@@ -1072,24 +1105,27 @@ and the derived files
\aftergroup\endinput
\fi
\fi
-\endgroup
+\endgroup%
% \end{macrocode}
% Package identification:
% \begin{macrocode}
-\begingroup
- \catcode35 6 % #
- \catcode40 12 % (
- \catcode41 12 % )
- \catcode44 12 % ,
- \catcode45 12 % -
- \catcode46 12 % .
- \catcode47 12 % /
- \catcode58 12 % :
- \catcode64 11 % @
- \catcode91 12 % [
- \catcode93 12 % ]
- \catcode123 1 % {
- \catcode125 2 % }
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode35=6 % #
+ \catcode39=12 % '
+ \catcode40=12 % (
+ \catcode41=12 % )
+ \catcode44=12 % ,
+ \catcode45=12 % -
+ \catcode46=12 % .
+ \catcode47=12 % /
+ \catcode58=12 % :
+ \catcode64=11 % @
+ \catcode91=12 % [
+ \catcode93=12 % ]
+ \catcode123=1 % {
+ \catcode125=2 % }
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1#2#3[#4]{\endgroup
\immediate\write-1{Package: #3 #4}%
@@ -1108,34 +1144,43 @@ and the derived files
\fi
\expandafter\x\csname ver@kvoptions.sty\endcsname
\ProvidesPackage{kvoptions}%
- [2010/02/22 v3.7 Keyval support for LaTeX options (HO)]
+ [2010/12/23 v3.10 Keyval support for LaTeX options (HO)]%
% \end{macrocode}
%
% \paragraph{Catcodes}
%
% \begin{macrocode}
-\begingroup
- \catcode123 1 % {
- \catcode125 2 % }
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
\def\x{\endgroup
\expandafter\edef\csname KVO@AtEnd\endcsname{%
- \catcode35 \the\catcode35\relax
- \catcode64 \the\catcode64\relax
- \catcode123 \the\catcode123\relax
- \catcode125 \the\catcode125\relax
+ \endlinechar=\the\endlinechar\relax
+ \catcode13=\the\catcode13\relax
+ \catcode32=\the\catcode32\relax
+ \catcode35=\the\catcode35\relax
+ \catcode61=\the\catcode61\relax
+ \catcode64=\the\catcode64\relax
+ \catcode123=\the\catcode123\relax
+ \catcode125=\the\catcode125\relax
}%
}%
-\x
-\catcode35 6 % #
-\catcode64 11 % @
-\catcode123 1 % {
-\catcode125 2 % }
+\x\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
\def\TMP@EnsureCode#1#2{%
\edef\KVO@AtEnd{%
\KVO@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{1}{14}% ^^A (comment)
\TMP@EnsureCode{2}{14}% ^^A (comment)
@@ -1149,10 +1194,12 @@ and the derived files
\TMP@EnsureCode{46}{12}% .
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{94}{7}% ^ (superscript)
\TMP@EnsureCode{96}{12}% `
+\edef\KVO@AtEnd{\KVO@AtEnd\noexpand\endinput}
% \end{macrocode}
%
% \paragraph{External resources.}
@@ -1171,19 +1218,12 @@ and the derived files
% and uses \cs{comma@parse} of package \xpackage{kvsetkeys},
% version 1.3.
% \begin{macrocode}
+\RequirePackage{ltxcmds}[2010/12/02]
\RequirePackage{kvsetkeys}[2007/09/29]
% \end{macrocode}
%
% \paragraph{Provide macros for \plainTeX.}
% \begin{macrocode}
-\@ifundefined{@onelevel@sanitize}{%
- \def\@onelevel@sanitize#1{%
- \edef#1{\expandafter\strip@prefix\meaning#1}%
- }%
-}{}
-\@ifundefined{strip@prefix}{%
- \def\strip@prefix#1>{}%
-}{}
\@ifundefined{@x@protect}{%
\def\@x@protect#1\fi#2#3{%
\fi\protect#1%
@@ -1209,7 +1249,7 @@ and the derived files
% \begin{macrocode}
\DeclareOption{patch}{%
\AtEndOfPackage{%
- \RequirePackage{kvoptions-patch}[2010/02/22]%
+ \RequirePackage{kvoptions-patch}[2010/12/23]%
}%
}
% \end{macrocode}
@@ -1263,7 +1303,7 @@ and the derived files
\@currname.\@currext\endcsname{#1}%
}
\def\KVO@prefix{%
- \@ifundefined{KVO@prefix@\@currname.\@currext}{%
+ \ltx@ifundefined{KVO@prefix@\@currname.\@currext}{%
\@currname @%
}{%
\csname KVO@prefix@\@currname.\@currext\endcsname
@@ -1272,12 +1312,30 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macrocode}
+\define@key{KVO}{setkeys}{%
+ \expandafter\def\csname KVO@setkeys@%
+ \@currname.\@currext\endcsname{#1}%
+}
+% \end{macrocode}
+% \begin{macro}{\KVO@setkeys}
+% \begin{macrocode}
+\def\KVO@setkeys{%
+ \ltx@IfUndefined{KVO@setkeys@\@currname.\@currext}{%
+ \setkeys
+ }{%
+ \csname KVO@setkeys@\@currname.\@currext\endcsname
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\SetupKeyvalOptions}
% The argument of \cs{SetupKeyvalOptions} expects a key value
% list, known keys are \xoption{family} and \xoption{prefix}.
% \begin{macrocode}
\newcommand*{\SetupKeyvalOptions}{%
- \setkeys{KVO}%
+ \kvsetkeys{KVO}%
}
% \end{macrocode}
% \end{macro}
@@ -1413,7 +1471,7 @@ and the derived files
% \begin{macrocode}
\def\KVO@boolkey#1#2#3#4#5{%
\edef\KVO@param{#5}%
- \@onelevel@sanitize\KVO@param
+ \ltx@onelevel@sanitize\KVO@param
\ifx\KVO@param\KVO@true
\expandafter\@firstofone
\else
@@ -1447,13 +1505,13 @@ and the derived files
% \begin{macro}{\KVO@true}
% \begin{macro}{\KVO@false}
% The macros \cs{KVO@true} and \cs{KVO@false} are used
-% for string comparisons. After \cs{@onelevel@sanitize}
+% for string comparisons. After \cs{ltx@onelevel@sanitize}
% we have only tokens with catcode 12 (other).
% \begin{macrocode}
\def\KVO@true{true}
\def\KVO@false{false}
-\@onelevel@sanitize\KVO@true
-\@onelevel@sanitize\KVO@false
+\ltx@onelevel@sanitize\KVO@true
+\ltx@onelevel@sanitize\KVO@false
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1509,7 +1567,7 @@ and the derived files
%
% \begin{macro}{\DeclareVoidOption}
% \begin{macrocode}
-\newcommand*{\DeclareVoidOption}[1]{%
+\newcommand*{\DeclareVoidOption}[2]{%
\begingroup
\let\next\@gobbletwo
\KVO@ifdefinable{\KVO@prefix#1}{%
@@ -1532,7 +1590,12 @@ and the derived files
}%
}%
\x
- \@namedef{\KVO@prefix#1}%
+ \begingroup
+ \toks@{#2}%
+ \expandafter\endgroup
+ \expandafter\def
+ \csname\KVO@prefix#1\expandafter\endcsname
+ \expandafter{\the\toks@}%
}%
}
\def\KVO@VOID@{@VOID@}
@@ -1625,7 +1688,7 @@ and the derived files
}
\newcommand*{\DisableKeyvalOption}[3][]{%
\begingroup
- \setkeys{KVOdyn}{#1}%
+ \kvsetkeys{KVOdyn}{#1}%
\def\x{\endgroup}%
\@ifundefined{KVO@action@\KVOdyn@action}{%
\PackageError{kvoptions}{%
@@ -1842,7 +1905,7 @@ and the derived files
}%
,%
}%
- \@onelevel@sanitize\KVO@CurrentOption
+ \ltx@onelevel@sanitize\KVO@CurrentOption
\else
\edef\KVO@temp{%
\KVO@temp
@@ -1885,7 +1948,7 @@ and the derived files
% \begin{macrocode}
\@ifundefined{KVO@default@\@currname.\@currext}{%
\ifx\KVO@Patch Y%
- \@onelevel@sanitize\CurrentOption
+ \ltx@onelevel@sanitize\CurrentOption
\fi
\ifx\@unusedoptionlist\@empty
\global\let\@unusedoptionlist\CurrentOption
@@ -1940,7 +2003,7 @@ and the derived files
}%
\edef\KVO@temp{\endgroup
\noexpand\KVO@calldefault{\the\toks\tw@}%
- \noexpand\setkeys{#1}{\the\toks@}%
+ \noexpand\KVO@setkeys{#1}{\the\toks@}%
}%
\KVO@temp
% \end{macrocode}
@@ -2025,7 +2088,7 @@ and the derived files
}%
\edef\KVO@temp{\endgroup
\noexpand\KVO@calldefault{\the\toks\tw@}%
- \noexpand\setkeys{#1}{\the\toks@}%
+ \noexpand\KVO@setkeys{#1}{\the\toks@}%
}%
\KVO@temp
% \end{macrocode}
@@ -2103,7 +2166,7 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\KVO@AtEnd
+\KVO@AtEnd%
%</package>
% \end{macrocode}
%
@@ -2112,28 +2175,37 @@ and the derived files
% \begin{macrocode}
%<*patch>
\NeedsTeXFormat{LaTeX2e}
-\begingroup
- \catcode123 1 % {
- \catcode125 2 % }
+\begingroup\catcode61\catcode48\catcode32=10\relax%
+ \catcode13=5 % ^^M
+ \endlinechar=13 %
+ \catcode123=1 % {
+ \catcode125=2 % }
+ \catcode64=11 % @
\def\x{\endgroup
\expandafter\edef\csname KVO@AtEnd\endcsname{%
- \catcode35 \the\catcode35\relax
- \catcode64 \the\catcode64\relax
- \catcode123 \the\catcode123\relax
- \catcode125 \the\catcode125\relax
+ \endlinechar=\the\endlinechar\relax
+ \catcode13=\the\catcode13\relax
+ \catcode32=\the\catcode32\relax
+ \catcode35=\the\catcode35\relax
+ \catcode61=\the\catcode61\relax
+ \catcode64=\the\catcode64\relax
+ \catcode123=\the\catcode123\relax
+ \catcode125=\the\catcode125\relax
}%
}%
-\x
-\catcode35 6 % #
-\catcode64 11 % @
-\catcode123 1 % {
-\catcode125 2 % }
+\x\catcode61\catcode48\catcode32=10\relax%
+\catcode13=5 % ^^M
+\endlinechar=13 %
+\catcode35=6 % #
+\catcode64=11 % @
+\catcode123=1 % {
+\catcode125=2 % }
\def\TMP@EnsureCode#1#2{%
\edef\KVO@AtEnd{%
\KVO@AtEnd
- \catcode#1 \the\catcode#1\relax
+ \catcode#1=\the\catcode#1\relax
}%
- \catcode#1 #2\relax
+ \catcode#1=#2\relax
}
\TMP@EnsureCode{39}{12}% '
\TMP@EnsureCode{40}{12}% (
@@ -2145,18 +2217,14 @@ and the derived files
\TMP@EnsureCode{47}{12}% /
\TMP@EnsureCode{58}{12}% :
\TMP@EnsureCode{60}{12}% <
-\TMP@EnsureCode{61}{12}% =
\TMP@EnsureCode{62}{12}% >
\TMP@EnsureCode{91}{12}% [
\TMP@EnsureCode{93}{12}% ]
\TMP@EnsureCode{96}{12}% `
\TMP@EnsureCode{124}{12}% |
-\edef\KVO@AtEnd{%
- \KVO@AtEnd
- \noexpand\endinput
-}
+\edef\KVO@AtEnd{\KVO@AtEnd\noexpand\endinput}
\ProvidesPackage{kvoptions-patch}%
- [2010/02/22 v3.7 LaTeX patch for keyval options (HO)]%
+ [2010/12/23 v3.10 LaTeX patch for keyval options (HO)]%
% \end{macrocode}
%
% Check for \eTeX.
@@ -2167,7 +2235,7 @@ and the derived files
Package loading is aborted, because e-TeX is missing%
}%
\expandafter\KVO@AtEnd
-\fi
+\fi%
% \end{macrocode}
%
% Package \xpackage{etexcmds} for \cs{etex@unexpanded}.
@@ -2181,7 +2249,7 @@ and the derived files
before \string\documentclass%
}\@ehd
\expandafter\KVO@AtEnd
-\fi
+\fi%
% \end{macrocode}
%
% Check for package \xpackage{xkvltxp}.
@@ -2193,7 +2261,7 @@ and the derived files
Therefore package loading is aborted%
}%
\KVO@AtEnd
-}{}
+}{}%
% \end{macrocode}
%
% \begin{macrocode}
@@ -2652,7 +2720,7 @@ and the derived files
% \end{macro}
%
% \begin{macrocode}
-\KVO@AtEnd
+\KVO@AtEnd%
%</patch>
% \end{macrocode}
%
@@ -2724,6 +2792,22 @@ and the derived files
\advance\count@ 1 %
\repeat
}
+\def\RangeCatcodeCheck#1#2#3{%
+ \count@=#1\relax
+ \loop
+ \ifnum#3=\catcode\count@
+ \else
+ \errmessage{%
+ Character \the\count@\space
+ with wrong catcode \the\catcode\count@\space
+ instead of \number#3%
+ }%
+ \fi
+ \ifnum\count@<#2\relax
+ \advance\count@ 1 %
+ \repeat
+}
+\def\space{ }
\expandafter\ifx\csname LoadCommand\endcsname\relax
\def\LoadCommand{\input kvoptions.sty\relax}%
\fi
@@ -2734,15 +2818,20 @@ and the derived files
\RangeCatcodeInvalid{123}{255}%
\catcode`\@=12 %
\catcode`\\=0 %
- \catcode`\{=1 %
- \catcode`\}=2 %
- \catcode`\#=6 %
- \catcode`\[=12 %
- \catcode`\]=12 %
\catcode`\%=14 %
- \catcode`\ =10 %
- \catcode13=5 %
\LoadCommand
+ \RangeCatcodeCheck{0}{36}{15}%
+ \RangeCatcodeCheck{37}{37}{14}%
+ \RangeCatcodeCheck{38}{47}{15}%
+ \RangeCatcodeCheck{48}{57}{12}%
+ \RangeCatcodeCheck{58}{63}{15}%
+ \RangeCatcodeCheck{64}{64}{12}%
+ \RangeCatcodeCheck{65}{90}{11}%
+ \RangeCatcodeCheck{91}{91}{15}%
+ \RangeCatcodeCheck{92}{92}{0}%
+ \RangeCatcodeCheck{93}{96}{15}%
+ \RangeCatcodeCheck{97}{122}{11}%
+ \RangeCatcodeCheck{123}{255}{15}%
\RestoreCatcodes
}
\Test
@@ -2805,7 +2894,7 @@ and the derived files
%<*test3>
\NeedsTeXFormat{LaTeX2e}
\makeatletter
-\RequirePackage{kvoptions}[2010/02/22]
+\RequirePackage{kvoptions}[2010/12/23]
\def\msg#{\immediate\write16}
\define@key{testfamily}{testkey}{%
\msg{[testfamily/testkey/#1]}%
@@ -2842,6 +2931,45 @@ and the derived files
%</test3>
% \end{macrocode}
%
+% \begin{macrocode}
+%<*test4pkg>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{kvoptions-test4}[2010/12/23 package for testing]
+\RequirePackage{kvoptions}[2010/12/23]
+\SetupKeyvalOptions{%
+ family=FOO,%
+ prefix=foo,%
+ setkeys=\kvsetkeys,%
+}
+\DeclareStringOption{str}
+\define@key{FOO}{set}{%
+ \setkeys{BAR}{strbar={#1}}%
+}
+\define@key{BAR}{strbar}{%
+ \def\foostr{[BAR:#1]}%
+}
+\ProcessKeyvalOptions*
+%</test4pkg>
+% \end{macrocode}
+% \begin{macrocode}
+%<*test4>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{kvoptions-test4.tex}[2010/12/23 test file]
+\RequirePackage[%
+ str=A,set=B,str=C,%
+]{kvoptions-test4}[2010/12/23]
+\def\TestExpected{C}
+\ifx\foostr\TestExpected
+ \typeout{* Test ok.}%
+\else
+ \typeout{* Result: [\foostr]}%
+ \typeout{* Expected: [\TestExpected]}%
+ \errmessage{Test failed!}%
+\fi
+\csname @@end\endcsname\end
+%</test4>
+% \end{macrocode}
+%
% \section{Installation}
%
% \subsection{Download}
@@ -2908,6 +3036,8 @@ and the derived files
% test/kvoptions-test1.tex & doc/latex/oberdiek/test/kvoptions-test1.tex\\
% test/kvoptions-test2.tex & doc/latex/oberdiek/test/kvoptions-test2.tex\\
% test/kvoptions-test3.tex & doc/latex/oberdiek/test/kvoptions-test3.tex\\
+% test/kvoptions-test4.tex & doc/latex/oberdiek/test/kvoptions-test4.tex\\
+% test/kvoptions-test4.sty & doc/latex/oberdiek/test/kvoptions-test4.sty\\
% kvoptions.dtx & source/latex/oberdiek/kvoptions.dtx\\
% \end{tabular}^^A
% }^^A
@@ -3177,6 +3307,21 @@ and the derived files
% \item
% Missing space in error message added.
% \end{Version}
+% \begin{Version}{2010/07/23 v3.8}
+% \item
+% Documenation for package \xpackage{kvoptions-patch} improved.
+% No code changes.
+% \end{Version}
+% \begin{Version}{2010/12/02 v3.9}
+% \item
+% Key \texttt{setkeys} added for \cs{SetupKeyvalOptions}.
+% \end{Version}
+% \begin{Version}{2010/12/23 v3.10}
+% \item
+% \cs{DeclareVoidOption} also parses the second parameter as
+% \hologo{TeX} argument to improve compatibility with
+% \cs{DeclareOption}.
+% \end{Version}
% \end{History}
%
% \PrintIndex