diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty | 66 |
1 files changed, 62 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty b/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty index b560a2bbc58..ad00881c91b 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty @@ -93,7 +93,7 @@ \fi \expandafter\x\csname ver@kvoptions.sty\endcsname \ProvidesPackage{kvoptions}% - [2009/04/10 v3.1 Keyval support for LaTeX options (HO)] + [2009/07/17 v3.2 Keyval support for LaTeX options (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -159,7 +159,7 @@ \DeclareOption{debugshow}{\catcode\@ne=9 } \DeclareOption{patch}{% \AtEndOfPackage{% - \RequirePackage{kvoptions-patch}[2009/04/10]% + \RequirePackage{kvoptions-patch}[2009/07/17]% }% } \ProcessOptions\relax @@ -441,11 +441,11 @@ \ifKVOdyn@global\global\fi \let \expandafter\noexpand\csname KV@#1@#2\endcsname - \@gobble + \noexpand\@gobble \ifKVOdyn@global\global\fi \let \expandafter\noexpand\csname KV@#1@#2@default\endcsname - \@empty + \noexpand\@empty }% ^^A\PackageInfo{kvoptions}{% ^^A [option] key `#2' of family `#1'\MessageBreak @@ -625,6 +625,64 @@ \let\CurrentOption\@empty \AtEndOfPackage{\let\@unprocessedoptions\relax}% } +\newcommand*{\ProcessLocalKeyvalOptions}{% + \@ifstar{% + \begingroup + \edef\x{\endgroup + \noexpand\KVO@ProcessLocalKeyvalOptions{\KVO@family}% + }% + \x + }% + \KVO@ProcessLocalKeyvalOptions +} +\def\KVO@ProcessLocalKeyvalOptions#1{% + \let\@tempc\relax + \let\KVO@temp\@empty + \ifx\@currext\@pkgextension + \else + \PackageError{kvoptions}{% + \string\ProcessLocalKeyvalOptions is intended for packages only% + }\@ehc + \fi + \begingroup + \toks\tw@{}% + \@ifundefined{opt@\@currname.\@currext}{% + \toks@\expandafter{\KVO@temp}% + }{% + \toks@\expandafter\expandafter\expandafter{% + \csname opt@\@currname.\@currext\endcsname + }% + \@ifundefined{KVO@default@\@currname.\@currext}{% + \toks@\expandafter\expandafter\expandafter{% + \expandafter\KVO@temp\the\toks@ + }% + }{% + \edef\CurrentOption{\the\toks@}% + \toks@\expandafter{\KVO@temp}% + \@for\CurrentOption:=\CurrentOption\do{% + \@ifundefined{% + KV@#1@\expandafter\KVO@getkey\CurrentOption=\@nil + }{% + \toks\tw@\expandafter{% + \the\toks\expandafter\tw@\expandafter,\CurrentOption + }% + }{% + \toks@\expandafter{% + \the\expandafter\toks@\expandafter,\CurrentOption + }% + }% + }% + }% + \fi + }% + \edef\KVO@temp{\endgroup + \noexpand\KVO@calldefault{\the\toks\tw@}% + \noexpand\setkeys{#1}{\the\toks@}% + }% + \KVO@temp + \let\CurrentOption\@empty + \AtEndOfPackage{\let\@unprocessedoptions\relax}% +} \def\KVO@getkey#1=#2\@nil{#1} \def\KVO@calldefault#1{% \begingroup |