diff options
author | Karl Berry <karl@freefriends.org> | 2010-11-10 00:33:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-11-10 00:33:32 +0000 |
commit | 6a43749c68fb713c7747927e2dbce5fecebeef41 (patch) | |
tree | 34f43407f72e4b10c32d13b2b54c57d891472171 /Master/texmf-dist/tex/latex/interfaces/interfaces-pgfkeys.sty | |
parent | 6c695847dd86eb6feee74b5f466414efa62ca037 (diff) |
interfaces 2.0 (9nov10)
git-svn-id: svn://tug.org/texlive/trunk@20388 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/interfaces/interfaces-pgfkeys.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/interfaces/interfaces-pgfkeys.sty | 85 |
1 files changed, 57 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/interfaces/interfaces-pgfkeys.sty b/Master/texmf-dist/tex/latex/interfaces/interfaces-pgfkeys.sty index 6347d988c1e..b2fea1ea476 100644 --- a/Master/texmf-dist/tex/latex/interfaces/interfaces-pgfkeys.sty +++ b/Master/texmf-dist/tex/latex/interfaces/interfaces-pgfkeys.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% interfaces : 2010/10/20 v1.1 - interfaces : interfaces with keys for other packages (FC) +%% interfaces : 2010/10/31 v2.0 - interfaces : interfaces with keys for other packages (FC) %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -47,18 +47,20 @@ \ProvidesPackage{interfaces-pgfkeys} [2010/10/27 v1.2 pgfkeys handlers definitions (FC)] \RequirePackage{interfaces-base} -\AtEndOfPackage{% - \let\itf@pgfkeys@unpack\pgfkeys@unpack - \let\itf@pgfkeys@case@three\pgfkeys@case@three - \let\itf@pgfkeys@exp@call\pgfkeys@exp@call - \let\itf@pgfkeysaddvalue\pgfkeysaddvalue -}% AtEndOfPackage +\ifdefined\pgfkeys@ifexecutehandler % pgf version 2.1 \def\itf@pgfkeys{% - \global\let\pgfkeys@unpack\itf@pgfkeys@unpack - \global\let\pgfkeys@case@three\itf@pgfkeys@case@three - \global\let\pgfkeys@exp@call\itf@pgfkeys@exp@call - \global\let\pgfkeysaddvalue\itf@pgfkeysaddvalue + \global\let\pgfkeys@unpack \itf@pgfkeys@unpack + \global\let\pgfkeys@case@three \itf@pgfkeys@case@three + \global\let\pgfkeys@case@three@handleall\itf@pgfkeys@case@three@handleall }% \itf@pgfkeys +\else +\def\itf@pgfkeys{% + \global\let\pgfkeys@unpack \itf@pgfkeys@unpack + \global\let\pgfkeys@case@three \itf@pgfkeys@case@three + \global\let\pgfkeysaddvalue \itf@pgfkeysaddvalue + \global\let\pgfkeys@exp@call \itf@pgfkeys@exp@call +}% \itf@pgfkeys +\fi \AtBeginDocument{% \itf@pgfkeys \let\itf@pgfkeys\relax @@ -72,10 +74,8 @@ \unexpanded\expandafter\expandafter\expandafter{% \csname pgfk@#1\endcsname}% }% \pgfkeysvalueof@unexpanded -\newrobustcmd*\pgfkeysEsetvalue[2]{% - \expandafter\edef\csname pgfk@#1\endcsname{#2}% -}% \pgfkeysEsetvalue -\renewrobustcmd*\pgfkeysaddvalue[3]{% \cspreappto{pgfk@#1}{#2}{#3} (bug in pgfkeys.code.tex) +\ifdefined\pgfkeys@ifexecutehandler \else % pgf v2.1: bug fixed +\def\itf@pgfkeysaddvalue#1#2#3{% (pgf v2.0: bug in pgfkeys.code.tex) \edef\pgfkeys@global@temp{% \unexpanded{#2}% \ifcsname pgfk@#1\endcsname @@ -84,8 +84,14 @@ \fi \unexpanded{#3}}% \pgfkeyslet{#1}\pgfkeys@global@temp -}% \pgfkeysaddvalue -\newrobustcmd*\pgfkeysEaddvalue[3]{% \csepreappto{pgfk@#1}{#2}{#3} +}% \itf@pgfkeysaddvalue +\fi +\ifdefined\pgfkeys@ifexecutehandler \long \fi % pgf version 2.1 +\def\pgfkeysEsetvalue#1#2{% + \expandafter\edef\csname pgfk@#1\endcsname{#2}% +}% \pgfkeysEsetvalue +\ifdefined\pgfkeys@ifexecutehandler \long \fi % pgf v2.1 +\def\pgfkeysEaddvalue#1#2#3{% \csepreappto{pgfk@#1}{#2}{#3} \edef\pgfkeys@global@temp{% #2% \ifcsname pgfk@#1\endcsname @@ -96,9 +102,12 @@ \pgfkeyslet{#1}\pgfkeys@global@temp }% \pgfkeysaddvalue %% missed a pair of braces around the argument in pgfkeys.code.tex ( code could break if it contains = or , ) -\def\pgfkeys@exp@call#1{\pgfkeysalso{\pgfkeyscurrentpath={#1}}} +\ifdefined\pgfkeys@ifexecutehandler\else % pgf v2.1 (bug corrected in v2.1) + \def\itf@pgfkeys@exp@call#1{\pgfkeysalso{\pgfkeyscurrentpath={#1}}}% +\fi %% The value is now checked by \itf@pgfkeys@default@blank@required: -\def\pgfkeys@unpack#1=#2=#3\pgfkeys@stop{% +\ifdefined\pgfkeys@ifexecutehandler \long \fi % pgf v2.1 +\def\itf@pgfkeys@unpack#1=#2=#3\pgfkeys@stop{% \pgfkeys@spdef\pgfkeyscurrentkey{#1}% \edef\pgfkeyscurrentkey{\pgfkeyscurrentkey}% \ifx\pgfkeyscurrentkey\pgfkeys@empty @@ -110,7 +119,7 @@ \pgfkeyscurrentkey % <FC> \pgfkeys@case@one % <FC> \fi -}% \pgfkeys@unpack +}% \itf@pgfkeys@unpack \def\itf@pgfkeys@default@blank@required#1#2{% \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% Hmm... no value \pgfkeysifdefined{#1/.@def}% @@ -136,7 +145,7 @@ }% \itf@pgfkeys@default@blank@required %% To handle the cases of: /handler/.default= /handler/.blank= /handler/.value required, %% it is necessary to redefine \pgfkeys@case@three -\renewcommand*\pgfkeys@case@three{% +\def\itf@pgfkeys@case@three{% \pgfkeys@split@path \pgfkeysifdefined{/handlers/\pgfkeyscurrentname/.@cmd} {% @@ -145,7 +154,11 @@ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}% } \pgfkeys@unknown % no handler, thus the key is unknown -}% \pgfkeys@case@three +}% \itf@pgfkeys@case@three +\ifdefined\pgfkeys@ifexecutehandler + \let\itf@pgfkeys@case@three@handleall \itf@pgfkeys@case@three +\fi +\itf@pgfkeys \pgfkeys{% /handlers/.alias/.code=\itf@pgfkeys@ifaliasexists{#1}{% \pgfkeysedef\pgfkeyscurrentpath{\noexpand\pgfkeysalso{\pgfkeysdefaultpath#1={##1}}}},% @@ -314,7 +327,7 @@ \pgfkeys{% /handlers/.store as number/.code={% \pgfkeysedef\pgfkeyscurrentpath{% - \normalcolor\pgfkeyssetvalue{\pgfkeyscurrentpath}{\numexpr##1\relax}}% + \noexpand\pgfkeyssetvalue{\pgfkeyscurrentpath}{\numexpr##1\relax}}% \pgfkeyslet\pgfkeyscurrentpath\z@ \pgfkeyslet{\pgfkeyscurrentpath/.@def}\z@ \pgfkeyslet{\pgfkeyscurrentpath/.@blank}\z@ @@ -332,7 +345,8 @@ \pgfkeys{% /handlers/.estore as number/.code={% \pgfkeysedef\pgfkeyscurrentpath{% - \noexpand\pgfkeyssetvalue{\pgfkeyscurrentpath}{\number\numexpr##1\relax}}% + \noexpand\pgfkeyssetvalue{\pgfkeyscurrentpath}{% + \noexpand\number\numexpr##1\relax}}% \pgfkeyslet\pgfkeyscurrentpath\z@ \pgfkeyslet{\pgfkeyscurrentpath/.@def}\z@ \pgfkeyslet{\pgfkeyscurrentpath/.@blank}\z@ @@ -355,7 +369,7 @@ \pgfkeysedef{\pgfkeyscurrentpath\x}{% \letcs\noexpand\pgfkeys@temp{% \noexpand\ifcsname#1\endcsname - #1\noexpand\else z@\noexpand\fi}% + #1\noexpand\else\if*\x @ne\else z@\fi\noexpand\fi}% \edef\noexpand\pgfkeys@temp{% \noexpand\pgfkeysalso{\pgfkeyscurrentpath={% \noexpand\expandonce\noexpand\pgfkeys@temp @@ -377,7 +391,7 @@ \pgfkeysedef{\pgfkeyscurrentpath\x}{% \noexpand\pgfkeysalso{\pgfkeyscurrentpath=% \noexpand\csname\noexpand\ifcsname#1\endcsname - #1\noexpand\else z@\noexpand\fi\endcsname + #1\noexpand\else\if*\x @ne\else z@\fi\noexpand\fi\endcsname \x \numexpr##1\relax}}% \pgfkeysEsetvalue{\pgfkeyscurrentpath\x/.@def}{\if*\x\@ne\else\z@\fi}% @@ -386,8 +400,23 @@ /handlers/.estore as number in cs/.value required,% }% /.estore as number in cs \pgfkeys{% - /handlers/.defcounter/.code=\pgfkeysdef\pgfkeyscurrentpath{\defcounter{#1}{##1}}% -}% /.defcounter + /handlers/.store in counter cs/.code={% + \pgfkeysdef\pgfkeyscurrentpath{% + \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text + \else\csname#1\endcsname\numexpr##1\relax\fi}% + \pgfkeyslet{\pgfkeyscurrentpath/.@blank}\z@ + \@tfor\x:=+-*\do{% + \pgfkeysedef{\pgfkeyscurrentpath\x}{% + \noexpand\pgfkeysalso{\pgfkeyscurrentpath=% + \noexpand\csname\noexpand\ifcsname#1\endcsname + #1\noexpand\else\if*\x @ne\else z@\fi\noexpand\fi\endcsname + \x + \numexpr##1\relax}}% + \pgfkeysEsetvalue{\pgfkeyscurrentpath\x/.@def}{\if*\x\@ne\else\z@\fi}% + \pgfkeysEsetvalue{\pgfkeyscurrentpath\x/.@blank}{\if*\@ne\else\z@\fi}% + }},% + /handlers/.store in counter cs/.value required,% +}% /.store in counter cs \pgfkeys{% /handlers/.store as glue/.code={% \pgfkeysedef\pgfkeyscurrentpath{% |