diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/pgfopts/pgfopts.pdf | bin | 123224 -> 123293 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/pgfopts/pgfopts.dtx | 25 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pgfopts/pgfopts.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pgfopts/pgfopts.sty | 16 |
4 files changed, 31 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfopts/pgfopts.pdf b/Master/texmf-dist/doc/latex/pgfopts/pgfopts.pdf Binary files differindex 8ca42c4708c..75478c28b2a 100644 --- a/Master/texmf-dist/doc/latex/pgfopts/pgfopts.pdf +++ b/Master/texmf-dist/doc/latex/pgfopts/pgfopts.pdf diff --git a/Master/texmf-dist/source/latex/pgfopts/pgfopts.dtx b/Master/texmf-dist/source/latex/pgfopts/pgfopts.dtx index ec9eb644d77..bed73f0e179 100644 --- a/Master/texmf-dist/source/latex/pgfopts/pgfopts.dtx +++ b/Master/texmf-dist/source/latex/pgfopts/pgfopts.dtx @@ -65,7 +65,7 @@ See http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2008,2010 by +Copyright (C) 2008-2011 by Joseph Wright <joseph.wright@morningstar2.co.uk> It may be distributed and/or modified under the conditions of @@ -200,6 +200,8 @@ This work consists of the file pgfopts.dtx % %\changes{v1.0}{2008/06/26}{First public release} %\changes{v2.0}{2009/04/30}{Complete internal rewrite} +%\changes{v2.1}{2011/06/02}{Allow for \texttt{.unknown} handler for +% class options} % %\begin{abstract} % Using key--value options for packages and macros is a good way of @@ -333,7 +335,7 @@ This work consists of the file pgfopts.dtx % \begin{macrocode} %<*package> \ProvidesClass{pgfopts} - [2010/05/01 v2.0 LaTeX package options with pgfkeys] + [2011/06/02 v2.1 LaTeX package options with pgfkeys] % \end{macrocode} % % The only package requires is \pkg{pgfkeys} itself. @@ -435,6 +437,7 @@ This work consists of the file pgfopts.dtx %\begin{macro}{\pgfopts@process@local@options@aux@i} %\begin{macro}{\pgfopts@process@local@options@aux@ii} %\begin{macro}{\pgfopts@process@local@options@class} +%\begin{macro}{\pgfopts@process@local@options@class@aux} %\begin{macro}{\pgfopts@process@local@options@package} % The first step in processing local options is to see if any exist. % This is done inside a group to avoid polluting the hash table. If @@ -449,8 +452,8 @@ This work consists of the file pgfopts.dtx \@ifundefined{opt@\@currname.\@currext}% {\endgroup}% {% - \toks@\expandafter\expandafter\expandafter - {\csname opt@\@currname.\@currext\endcsname}% + \toks@\expandafter\expandafter\expandafter + {\csname opt@\@currname.\@currext\endcsname}% \expandafter\endgroup \expandafter\def\expandafter\pgfopts@local@options \expandafter{\the\toks@}% @@ -484,10 +487,17 @@ This work consists of the file pgfopts.dtx } % \end{macrocode} % Options given for a class may not be applicable to the class itself, -% and so they have to be checked. The option is then added either to -% the list for processing now or two the list for packages to examine. +% and so they have to be checked. First, there is a simple test for an +% unknown key handler: if it exists then there is no need to look at +% each option separately. % \begin{macrocode} -\newcommand*\pgfopts@process@local@options@class{% +\newcommand*\pgfopts@process@local@options@class + {% + \pgfkeysifdefined{\pgfopts@key@path .unknown/.@cmd}% + {\pgfopts@list@add\pgfopts@options@clist\@classoptionslist} + {\pgfopts@process@local@options@class@aux}% + } +\newcommand*\pgfopts@process@local@options@class@aux{% \@for\pgfopts@current@option:=\pgfopts@local@options\do{% \pgfkeysifdefined {% @@ -513,6 +523,7 @@ This work consists of the file pgfopts.dtx %\end{macro} %\end{macro} %\end{macro} +%\end{macro} % %\begin{macro}{\pgfopts@get@key@name} %\begin{macro}{\pgfopts@get@key@name@aux} diff --git a/Master/texmf-dist/source/latex/pgfopts/pgfopts.ins b/Master/texmf-dist/source/latex/pgfopts/pgfopts.ins index 97028707835..010855143e2 100644 --- a/Master/texmf-dist/source/latex/pgfopts/pgfopts.ins +++ b/Master/texmf-dist/source/latex/pgfopts/pgfopts.ins @@ -26,7 +26,7 @@ See http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2008,2010 by +Copyright (C) 2008-2011 by Joseph Wright <joseph.wright@morningstar2.co.uk> It may be distributed and/or modified under the conditions of @@ -50,7 +50,7 @@ This work consists of the file pgfopts.dtx } \endbatchfile %% -%% Copyright (C) 2008,2010 by +%% Copyright (C) 2008-2011 by %% Joseph Wright <joseph.wright@morningstar2.co.uk> %% %% It may be distributed and/or modified under the conditions of diff --git a/Master/texmf-dist/tex/latex/pgfopts/pgfopts.sty b/Master/texmf-dist/tex/latex/pgfopts/pgfopts.sty index cd20c898a73..67cfa79f964 100644 --- a/Master/texmf-dist/tex/latex/pgfopts/pgfopts.sty +++ b/Master/texmf-dist/tex/latex/pgfopts/pgfopts.sty @@ -13,7 +13,7 @@ %% ---------------------------------------------------------------- %% \ProvidesClass{pgfopts} - [2010/05/01 v2.0 LaTeX package options with pgfkeys] + [2011/06/02 v2.1 LaTeX package options with pgfkeys] \RequirePackage{pgfkeys} \newif\ifpgfopts@process@class \newcommand*\pgfopts@options@clist{} @@ -63,8 +63,8 @@ \@ifundefined{opt@\@currname.\@currext}% {\endgroup}% {% - \toks@\expandafter\expandafter\expandafter - {\csname opt@\@currname.\@currext\endcsname}% + \toks@\expandafter\expandafter\expandafter + {\csname opt@\@currname.\@currext\endcsname}% \expandafter\endgroup \expandafter\def\expandafter\pgfopts@local@options \expandafter{\the\toks@}% @@ -96,7 +96,13 @@ \expandafter\def\expandafter\pgfopts@options@execute \expandafter{\pgfopts@options@execute}% } -\newcommand*\pgfopts@process@local@options@class{% +\newcommand*\pgfopts@process@local@options@class + {% + \pgfkeysifdefined{\pgfopts@key@path .unknown/.@cmd}% + {\pgfopts@list@add\pgfopts@options@clist\@classoptionslist} + {\pgfopts@process@local@options@class@aux}% + } +\newcommand*\pgfopts@process@local@options@class@aux{% \@for\pgfopts@current@option:=\pgfopts@local@options\do{% \pgfkeysifdefined {% @@ -155,7 +161,7 @@ \@onlypreamble\ProcessPgfOptions \@onlypreamble\ProcessPgfPackageOptions %% -%% Copyright (C) 2008,2010 by +%% Copyright (C) 2008-2011 by %% Joseph Wright <joseph.wright@morningstar2.co.uk> %% %% It may be distributed and/or modified under the conditions of |