diff options
author | Karl Berry <karl@freefriends.org> | 2009-09-05 22:54:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-09-05 22:54:26 +0000 |
commit | 874ece84a0d160db419570dff359a6e4c3c44063 (patch) | |
tree | 4ee6c8290f49de79ad922ba8f839da431c78aaad /Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty | |
parent | 427bf11201b13e9a0778a390b930f70f8b697b8e (diff) |
oberdiek update (5sep09)
git-svn-id: svn://tug.org/texlive/trunk@15145 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty | 87 |
1 files changed, 48 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty b/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty index ad00881c91b..7b20a7c133b 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty @@ -38,29 +38,26 @@ \catcode46 12 % . \catcode58 12 % : \catcode64 11 % @ + \catcode123 1 % { + \catcode125 2 % } \expandafter\let\expandafter\x\csname ver@kvoptions.sty\endcsname - \ifcase 0% - \ifx\x\relax % plain + \ifx\x\relax % plain-TeX, first loading + \else + \def\empty{}% + \ifx\x\empty % LaTeX, first loading, + % variable is initialized, but \ProvidesPackage not yet seen \else - \ifx\x\empty % LaTeX + \catcode35 6 % # + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% \else - 1% + \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% \fi + \x{kvoptions}{The package is already loaded}% + \aftergroup\endinput \fi - \else - \catcode35 6 % # - \catcode123 1 % { - \catcode125 2 % } - \expandafter\ifx\csname PackageInfo\endcsname\relax - \def\x#1#2{% - \immediate\write-1{Package #1 Info: #2.}% - }% - \else - \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% - \fi - \x{kvoptions}{The package is already loaded}% - \endgroup - \expandafter\endinput \fi \endgroup \begingroup @@ -73,6 +70,8 @@ \catcode47 12 % / \catcode58 12 % : \catcode64 11 % @ + \catcode91 12 % [ + \catcode93 12 % ] \catcode123 1 % { \catcode125 2 % } \expandafter\ifx\csname ProvidesPackage\endcsname\relax @@ -93,7 +92,7 @@ \fi \expandafter\x\csname ver@kvoptions.sty\endcsname \ProvidesPackage{kvoptions}% - [2009/07/17 v3.2 Keyval support for LaTeX options (HO)] + [2009/08/13 v3.4 Keyval support for LaTeX options (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -136,6 +135,7 @@ \@ifundefined{define@key}{% \RequirePackage{keyval}\relax }{} +\RequirePackage{kvsetkeys}[2007/09/29] \@ifundefined{@onelevel@sanitize}{% \def\@onelevel@sanitize#1{% \edef#1{\expandafter\strip@prefix\meaning#1}% @@ -159,7 +159,7 @@ \DeclareOption{debugshow}{\catcode\@ne=9 } \DeclareOption{patch}{% \AtEndOfPackage{% - \RequirePackage{kvoptions-patch}[2009/07/17]% + \RequirePackage{kvoptions-patch}[2009/08/13]% }% } \ProcessOptions\relax @@ -388,6 +388,12 @@ \newcommand*{\DeclareDefaultOption}{% \@namedef{KVO@default@\@currname.\@currext}% } +\newcommand*{\DeclareLocalOptions}[1]{% + \comma@parse{#1}\KVO@DeclareLocalOption +} +\def\KVO@DeclareLocalOption#1{% + \expandafter\def\csname KVO@local@\KVO@family @#1\endcsname{}% +} \SetupKeyvalOptions{% family=KVOdyn,% prefix=KVOdyn@% @@ -533,28 +539,31 @@ \@ifundefined{KV@#1@\expandafter\KVO@getkey \KVO@CurrentOption=\@nil}{% }{% - \ifx\KVO@Patch Y% - \edef\KVO@temp{% - \etex@unexpanded\expandafter{% - \KVO@temp + \@ifundefined{KVO@local@#1@\expandafter\KVO@getkey + \KVO@CurrentOption=\@nil}{% + \ifx\KVO@Patch Y% + \edef\KVO@temp{% + \etex@unexpanded\expandafter{% + \KVO@temp + }% + ,% + \etex@unexpanded\expandafter{% + \KVO@CurrentOption + }% + ,% }% - ,% - \etex@unexpanded\expandafter{% + \@onelevel@sanitize\KVO@CurrentOption + \else + \edef\KVO@temp{% + \KVO@temp + ,% \KVO@CurrentOption + ,% }% - ,% - }% - \@onelevel@sanitize\KVO@CurrentOption - \else - \edef\KVO@temp{% - \KVO@temp - ,% - \KVO@CurrentOption - ,% - }% - \fi - \@expandtwoargs\@removeelement\KVO@CurrentOption - \@unusedoptionlist\@unusedoptionlist + \fi + \@expandtwoargs\@removeelement\KVO@CurrentOption + \@unusedoptionlist\@unusedoptionlist + }{}% }% }% \fi |