summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx')
-rw-r--r--Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx62
1 files changed, 33 insertions, 29 deletions
diff --git a/Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx b/Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx
index ed264cf0a4a..ee715703549 100644
--- a/Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx
+++ b/Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx
@@ -25,7 +25,7 @@
% pst-xkey.sty
%
%% ---------------------------------------
-%% Copyright (C) 2004-2012 Hendri Adriaens
+%% Copyright (C) 2004-2014 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -97,8 +97,9 @@ The author is grateful to Carsten Heinz, Morten H\o gholm,
Josselin Noirel, Heiko Oberdiek, Will Robertson, Till Tantau,
Herbert Vo\ss and Joseph Wright for help and suggestions.
Thanks go to Donald Arseneau for contributing the robust
-|\@ifnextcharacter| macro and to Morten H\o gholm for
-contributing a fast for-loop macro. Special thanks go to Uwe
+|\@ifnextcharacter| macro, to Morten H\o gholm for
+contributing a fast for-loop macro and to David Carlisle for
+modifications to support |\par|. Special thanks go to Uwe
Kern for his ideas for improving the functionality of this
package, a lot of useful comments on the package and the
documentation and for contributing the |\@selective@sanitize|
@@ -178,10 +179,12 @@ macro. \PrintChangesX\PrintIndexX
% \changes{v2.5g}{2006/12/19}{Altered policy for handling \cs{XKV@rm}
% in nested \cs{setkeys*} commands: all unknown keys will be recorded,
% not only the once from the outermost \cs{setkeys*}}
+% \changes{v2.6c}{2014/04/27}{Added support for \cs{par} to support similar
+% changes in \pf{keyval}}
%
% \GetFileInfo{xkeyval.sty}
%
-% \CheckSum{3001}
+% \CheckSum{3031}
%
%\DoNotIndex{\:,\@,\@@,\@backslashchar,\@ehc,\@empty,\@expandtwoargs,
%\@for,\@forloop,\@fornoop,\@fortmp,\@gobble,\@gobbletwo,\@if,\@ifnch,
@@ -2054,10 +2057,10 @@ macro. \PrintChangesX\PrintIndexX
% Load \LaTeX\ primitives if necessary and provide information.
% \begin{macrocode}
\ifx\ProvidesFile\@undefined
- \message{2012/10/14 v2.6b key=value parser (HA)}
+ \message{2014/04/27 v2.6c key=value parser (HA)}
\input xkvtxhdr
\else
- \ProvidesFile{xkeyval.tex}[2012/10/14 v2.6b key=value parser (HA)]
+ \ProvidesFile{xkeyval.tex}[2014/04/27 v2.6c key=value parser (HA)]
\@addtofilelist{xkeyval.tex}
\fi
% \end{macrocode}
@@ -2293,7 +2296,7 @@ macro. \PrintChangesX\PrintIndexX
% \meta{macro}\marg{content}\\
% Adds \meta{content} to \meta{macro} without expanding it.
% \begin{macrocode}
-\def\XKV@addtomacro@n#1#2{%
+\long\def\XKV@addtomacro@n#1#2{%
\XKV@tempa@toks\expandafter{#1#2}%
\edef#1{\the\XKV@tempa@toks}%
}
@@ -2462,7 +2465,7 @@ macro. \PrintChangesX\PrintIndexX
% contains the characters |=| or |,| with wrong catcodes. If so, it sanitizes
% them before saving \meta{content} to \meta{cmd}.
% \begin{macrocode}
-\def\XKV@checksanitizea#1#2{%
+\long\def\XKV@checksanitizea#1#2{%
\XKV@ch@cksanitize{#1}#2=%
\ifin@\else\XKV@ch@cksanitize{#1}#2,\fi
\ifin@\@selective@sanitize[0]{,=}#2\fi
@@ -2496,7 +2499,7 @@ macro. \PrintChangesX\PrintIndexX
% as a temporary macro and will contain \meta{character string} at the
% end of the macro.
% \begin{macrocode}
-\def\XKV@ch@cksanitize#1#2#3{%
+\long\def\XKV@ch@cksanitize#1#2#3{%
\XKV@tempa@toks{#1}\edef#2{\the\XKV@tempa@toks}%
\@onelevel@sanitize#2%
% \end{macrocode}
@@ -2510,7 +2513,7 @@ macro. \PrintChangesX\PrintIndexX
% actually occurs, because the input was read by \TeX\
% before (and for instance stored in a macro or token register).
% \begin{macrocode}
- \def#2##1#3##2\@nil{%
+ \long\def#2##1#3##2\@nil{%
\XKV@tempa@toks{##2}\edef#2{\the\XKV@tempa@toks}%
\ifx#2\@empty\else\in@false\fi
}%
@@ -2864,7 +2867,7 @@ macro. \PrintChangesX\PrintIndexX
% Use |\XKV@ifcmd| several times to check the syntax of \meta{value}.
% Save \meta{key} to \meta{bin}.
% \begin{macrocode}
-\def\XKV@g@tkeyname#1=#2\@nil#3{%
+\long\def\XKV@g@tkeyname#1=#2\@nil#3{%
\XKV@ifcmd{#1}\savevalue#3{\XKV@rkvtrue\XKV@sgfalse}{%
\XKV@ifcmd{#1}\gsavevalue#3%
{\XKV@rkvtrue\XKV@sgtrue}{\XKV@rkvfalse\XKV@sgfalse}%
@@ -2910,7 +2913,7 @@ macro. \PrintChangesX\PrintIndexX
% \begin{macrocode}
\def\XKV@define@key#1{%
\@ifnextchar[{\XKV@d@fine@k@y{#1}}{%
- \expandafter\def\csname\XKV@header#1\endcsname####1%
+ \long\expandafter\def\csname\XKV@header#1\endcsname####1%
}%
}
% \end{macrocode}
@@ -3615,7 +3618,7 @@ macro. \PrintChangesX\PrintIndexX
% \changes{v2.5g}{2006/12/19}{Avoid reset of \cs{XKV@rm} in nested \cs{setkeys} commands}
% Workhorse for |\setkeys|.
% \begin{macrocode}
-\def\XKV@setkeys[#1]#2{%
+\long\def\XKV@setkeys[#1]#2{%
\XKV@checksanitizea{#2}\XKV@resb
\let\XKV@naa\@empty
% \end{macrocode}
@@ -3666,7 +3669,7 @@ macro. \PrintChangesX\PrintIndexX
% This macro starts the loop over the |key=value| list. Do not set
% keys in the list \meta{na}.
% \begin{macrocode}
-\def\XKV@s@tkeys#1#2{%
+\long\def\XKV@s@tkeys#1#2{%
% \end{macrocode}
% Define the list of key names which should be ignored.
% \begin{macrocode}
@@ -3693,7 +3696,7 @@ macro. \PrintChangesX\PrintIndexX
% Split key name and value (if present). If |#3| non-empty, there was
% no |=|\meta{value}.
% \begin{macrocode}
-\def\XKV@s@tk@ys#1=#2=#3\@nil{%
+\long\def\XKV@s@tk@ys#1=#2=#3\@nil{%
% \end{macrocode}
% Check for |\savevalue| and |\gsavevalue| and remove spaces from around the key name.
% \begin{macrocode}
@@ -3878,18 +3881,18 @@ macro. \PrintChangesX\PrintIndexX
% found anymore. We keep a list of pointers replaced already for this
% key in |\XKV@resa| so we can check whether we are running in circles.
% \begin{macrocode}
-\def\XKV@replacepointers#1{%
+\long\def\XKV@replacepointers#1{%
\let\XKV@tempa\@empty
\let\XKV@resa\@empty
- \XKV@r@placepointers#1\usevalue\@nil
+ \XKV@r@placepointers\@empty#1\usevalue\@nil
}
-\def\XKV@r@placepointers#1\usevalue#2{%
- \XKV@addtomacro@n\XKV@tempa{#1}%
+\long\def\XKV@r@placepointers#1\usevalue#2{%
+ \expandafter\XKV@addtomacro@n\expandafter\XKV@tempa\expandafter{#1}%
\def\XKV@tempb{#2}%
\ifx\XKV@tempb\@nnil\else\XKV@afterfi
\XKV@ifundefined{XKV@\XKV@header#2@value}{%
\XKV@err{no value recorded for key `#2'; ignored}%
- \XKV@r@placepointers
+ \XKV@r@placepointers\@empty
}{%
\@expandtwoargs\in@{,#2,}{,\XKV@resa,}%
\ifin@\XKV@afterelsefi
@@ -3897,6 +3900,7 @@ macro. \PrintChangesX\PrintIndexX
\else\XKV@afterfi
\XKV@addtolist@x\XKV@resa{#2}%
\expandafter\expandafter\expandafter\XKV@r@placepointers
+ \expandafter\expandafter\expandafter\@empty
\csname XKV@\XKV@header#2@value\endcsname
\fi
}%
@@ -4026,7 +4030,7 @@ macro. \PrintChangesX\PrintIndexX
%<*xkvlatex>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{xkeyval}
- [2012/10/14 v2.6b package option processing (HA)]
+ [2014/04/27 v2.6c package option processing (HA)]
% \end{macrocode}
% Initializations. Load |xkeyval.tex|, adjust some catcodes to define
% internal macros and initialize the |\DeclareOptionX*| working macro.
@@ -4315,23 +4319,23 @@ macro. \PrintChangesX\PrintIndexX
%% Based on keyval.sty.
%%
\def\XKV@tempa#1{%
-\def\KV@@sp@def##1##2{%
+\long\def\KV@@sp@def##1##2{%
\futurelet\XKV@resa\KV@@sp@d##2\@nil\@nil#1\@nil\relax##1}%
-\def\KV@@sp@d{%
+\long\def\KV@@sp@d{%
\ifx\XKV@resa\@sptoken
\expandafter\KV@@sp@b
\else
\expandafter\KV@@sp@b\expandafter#1%
\fi}%
-\def\KV@@sp@b#1##1 \@nil{\KV@@sp@c##1}%
+\long\def\KV@@sp@b#1##1 \@nil{\KV@@sp@c\@empty##1}%
}
\XKV@tempa{ }
-\def\KV@@sp@c#1\@nil#2\relax#3{\XKV@toks{#1}\edef#3{\the\XKV@toks}}
-\def\KV@do#1,{%
+\long\def\KV@@sp@c#1\@nil#2\relax#3{\XKV@toks\expandafter{#1}\edef#3{\the\XKV@toks}}
+\long\def\KV@do#1,{%
\ifx\relax#1\@empty\else
\KV@split#1==\relax
\expandafter\KV@do\fi}
-\def\KV@split#1=#2=#3\relax{%
+\long\def\KV@split#1=#2=#3\relax{%
\KV@@sp@def\XKV@tempa{#1}%
\ifx\XKV@tempa\@empty\else
\expandafter\let\expandafter\XKV@tempc
@@ -4356,9 +4360,9 @@ macro. \PrintChangesX\PrintIndexX
\XKV@tempb\relax
\fi}
\def\KV@def#1#2[#3]{%
- \@namedef{KV@#1@#2@default\expandafter}\expandafter
+ \long\@namedef{KV@#1@#2@default\expandafter}\expandafter
{\csname KV@#1@#2\endcsname{#3}}%
- \@namedef{KV@#1@#2}##1}
+ \long\@namedef{KV@#1@#2}##1}
%</xkvkeyval>
% \end{macrocode}
% \subsection{\texttt{xkvtxhdr.tex}}