diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty | 72 |
1 files changed, 57 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty b/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty index 7b20a7c133b..2df72b03ac0 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty @@ -27,7 +27,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-test1.tex, kvoptions-test2.tex, +%% kvoptions-test3.tex. %% %% No we don't need the option 'color'. %% With color support option 'emphcolor' will dynamically @@ -92,7 +93,7 @@ \fi \expandafter\x\csname ver@kvoptions.sty\endcsname \ProvidesPackage{kvoptions}% - [2009/08/13 v3.4 Keyval support for LaTeX options (HO)] + [2009/12/08 v3.6 Keyval support for LaTeX options (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -159,7 +160,7 @@ \DeclareOption{debugshow}{\catcode\@ne=9 } \DeclareOption{patch}{% \AtEndOfPackage{% - \RequirePackage{kvoptions-patch}[2009/08/13]% + \RequirePackage{kvoptions-patch}[2009/12/08]% }% } \ProcessOptions\relax @@ -518,6 +519,41 @@ and has no effect% }% } +\newcommand*{\AddToKeyvalOption}{% + \@ifstar{% + \begingroup + \edef\x{\endgroup + \noexpand\KVO@AddToKeyvalOption{\KVO@family}% + }% + \x + }% + \KVO@AddToKeyvalOption +} +\def\KVO@AddToKeyvalOption#1#2{% + \@ifundefined{KV@#1@#2}{% + \PackageWarning{kvoptions}{% + Key `#2' of family `#1' does not exist.\MessageBreak + Ignoring \string\AddToKeyvalOption + }% + \@gobble + }{% + \edef\KVO@next{% + \noexpand\KVO@@AddToKeyvalOption + \expandafter\noexpand\csname KV@#1@#2\endcsname + }% + \afterassignment\KVO@next + \def\KVO@temp##1% + }% +} +\def\KVO@@AddToKeyvalOption#1{% + \begingroup + \toks@\expandafter{#1{##1}}% + \toks@\expandafter{\the\expandafter\toks@\KVO@temp{##1}}% + \edef\x{\endgroup + \noexpand\def\noexpand#1####1{\the\toks@}% + }% + \x +} \newcommand*{\ProcessKeyvalOptions}{% \@ifstar{% \begingroup @@ -583,19 +619,25 @@ \@ifundefined{% KV@#1@\expandafter\KVO@getkey\CurrentOption=\@nil }{% - \ifx\KVO@Patch Y% - \@onelevel@sanitize\CurrentOption - \fi - \ifx\@unusedoptionlist\@empty - \global\let\@unusedoptionlist\CurrentOption - \else - \expandafter\expandafter\expandafter\gdef - \expandafter\expandafter\expandafter\@unusedoptionlist - \expandafter\expandafter\expandafter{% - \expandafter\@unusedoptionlist - \expandafter,\CurrentOption + \@ifundefined{KVO@default@\@currname.\@currext}{% + \ifx\KVO@Patch Y% + \@onelevel@sanitize\CurrentOption + \fi + \ifx\@unusedoptionlist\@empty + \global\let\@unusedoptionlist\CurrentOption + \else + \expandafter\expandafter\expandafter\gdef + \expandafter\expandafter\expandafter\@unusedoptionlist + \expandafter\expandafter\expandafter{% + \expandafter\@unusedoptionlist + \expandafter,\CurrentOption + }% + \fi + }{% + \toks\tw@\expandafter{% + \the\toks\expandafter\tw@\expandafter,\CurrentOption }% - \fi + }% }{% \toks@\expandafter{% \the\expandafter\toks@\expandafter,\CurrentOption |