diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty | 147 |
1 files changed, 97 insertions, 50 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty b/Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty index 029b2121e59..22eeb8d2696 100644 --- a/Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty +++ b/Master/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2006, 2007, 2009, 2010 by +%% Copyright (C) 2006, 2007, 2009-2011 by %% Heiko Oberdiek <heiko.oberdiek at googlemail.com> %% %% This work may be distributed and/or modified under the @@ -34,14 +34,18 @@ %% kvsetkeys-example.tex, kvsetkeys-test1.tex, %% kvsetkeys-test2.tex, kvsetkeys-test3.tex. %% -\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@kvsetkeys.sty\endcsname \ifx\x\relax % plain-TeX, first loading \else @@ -49,7 +53,6 @@ \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.}% @@ -61,21 +64,24 @@ \aftergroup\endinput \fi \fi -\endgroup -\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 % } +\endgroup% +\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}% @@ -94,29 +100,38 @@ \fi \expandafter\x\csname ver@kvsetkeys.sty\endcsname \ProvidesPackage{kvsetkeys}% - [2010/03/01 v1.9 Key value parser (HO)] -\begingroup - \catcode123 1 % { - \catcode125 2 % } + [2011/04/07 v1.13 Key value parser (HO)]% +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode123=1 % { + \catcode125=2 % } + \catcode64=11 % @ \def\x{\endgroup \expandafter\edef\csname KVS@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\KVS@AtEnd{% \KVS@AtEnd - \catcode#1 \the\catcode#1\relax + \catcode#1=\the\catcode#1\relax }% - \catcode#1 #2\relax + \catcode#1=#2\relax } \TMP@EnsureCode{36}{3}% $ \TMP@EnsureCode{38}{4}% & @@ -124,14 +139,22 @@ \TMP@EnsureCode{44}{12}% , \TMP@EnsureCode{46}{12}% . \TMP@EnsureCode{47}{12}% / -\TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{91}{12}% [ +\TMP@EnsureCode{93}{12}% ] \TMP@EnsureCode{94}{7}% ^ (superscript) \TMP@EnsureCode{96}{12}% ` \TMP@EnsureCode{126}{13}% ~ (active) +\edef\KVS@AtEnd{\KVS@AtEnd\noexpand\endinput} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname RequirePackage\endcsname\relax - \input infwarerr.sty\relax - \input etexcmds.sty\relax + \def\TMP@RequirePackage#1[#2]{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname ver@#1.sty\endcsname\relax + \input #1.sty\relax + \fi + }% + \TMP@RequirePackage{infwarerr}[2007/09/09]% + \TMP@RequirePackage{etexcmds}[2010/01/28]% \else \RequirePackage{infwarerr}[2007/09/09]% \RequirePackage{etexcmds}[2010/01/28]% @@ -303,12 +326,14 @@ $ \expandafter\endgroup }{% \KVS@Process#1=\KVS@Nil{#3}% }% + \KVS@MaybeBreak \KVS@IfEmpty{#2}{% }{% \KVS@Parse#2\KVS@Nil{#3}% }% } \long\def\KVS@Process#1=#2\KVS@Nil#3{% + \let\KVS@MaybeBreak\relax \def\kv@key{#1}% \KVS@IfEmpty{#2}{% \let\kv@value\relax @@ -326,6 +351,13 @@ $ \endgroup $ \let\kv@value\KVS@Global #3{#1}{#2}% } +\let\KVS@MaybeBreak\relax +\def\KVS@break#1#2#3#4{% + \let\KVS@MaybeBreak\relax +} +\def\kv@break{% + \let\KVS@MaybeBreak\KVS@break +} \def\comma@parse#1{% \comma@normalize{#1}% \expandafter\comma@parse@normalized\expandafter{\comma@list}% @@ -339,12 +371,25 @@ $ \let\kv@value\KVS@Global \def\comma@entry{#1}% #3{#1}% }% + \KVS@MaybeBreak \KVS@IfEmpty{#2}{% }{% \KVS@CommaParse#2\KVS@Nil{#3}% }% } -\long\def\kv@processor@default#1#2#3{% +\def\comma@break{% + \let\KVS@MaybeBreak\KVS@break +} +\def\kv@processor@default#1#2{% + \begingroup + \csname @safe@activestrue\endcsname + \let\ifincsname\iftrue + \edef\KVS@temp{\endgroup + \noexpand\KVS@ProcessorDefault{#1}{#2}% + }% + \KVS@temp +} +\long\def\KVS@ProcessorDefault#1#2#3{% & \unless\ifcsname KV@#1@#2\endcsname $ \begingroup\expandafter\expandafter\expandafter\endgroup $ \expandafter\ifx\csname KV@#1@#2\endcsname\relax @@ -371,11 +416,12 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax \fi \fi } -\def\kv@set@family@handler#1{% - \KVS@SetFamilyHandler{#1}\@nil -} -\def\KVS@SetFamilyHandler#1\@nil#{% - \expandafter\def\csname KVS@#1@handler\endcsname##1##2% +\long\def\kv@set@family@handler#1#2{% + \begingroup + \csname @safe@activestrue\endcsname + \let\ifincsname\iftrue + \expandafter\endgroup + \expandafter\def\csname KVS@#1@handler\endcsname##1##2{#2}% } \def\kv@error@novalue{% \kv@error@generic{No value specified for}% @@ -388,6 +434,7 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax #1 key `#3'% }{% The keyval family of the key `#3' is `#2'.\MessageBreak + The setting of the key is ignored because of the error.\MessageBreak \MessageBreak \@ehc }% @@ -395,7 +442,7 @@ $ \expandafter\ifx\csname KV@#1@#2@default\endcsname\relax \long\def\kvsetkeys#1#2{% \kv@parse{#2}{\kv@processor@default{#1}}% } -\KVS@AtEnd +\KVS@AtEnd% \endinput %% %% End of file `kvsetkeys.sty'. |