diff options
author | Norbert Preining <preining@logic.at> | 2006-11-03 06:16:00 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2006-11-03 06:16:00 +0000 |
commit | a6d4e22f961008636a3bfc36f89570e6fa0c85f6 (patch) | |
tree | 9d13f81b2a37ab6bdf3336066017d4cb5e701011 /Master/texmf-dist/tex/generic/pgf/utilities | |
parent | e9b9a3f32d1a5b371fa2256f098ee4b158f6df1d (diff) |
several updates (sorry Karl, it was a long train ride):
updates of packages: screenplay, bussproofs computational-complexity
dvdcoll gnuplottex mathmode movie15 pgf pstricks-add pst-labo
trfsigns (dvi->pdf move, COPYING file to doc) toptesi tocvsec2 thumb
textfit (doc move)
added to tpm-ctan-check: typogrid trsym trfsigns tracking toptesi toolbox
todo tocvsec2 tocloft tocbibind titling titlefoot thumb textopo textfit
teubner tensor
git-svn-id: svn://tug.org/texlive/trunk@2382 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/utilities')
7 files changed, 780 insertions, 315 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgf-latex-emulation.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgf-latex-emulation.tex deleted file mode 100644 index 257741a3c9a..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/utilities/pgf-latex-emulation.tex +++ /dev/null @@ -1,297 +0,0 @@ -% Copyright 2006 by Till Tantau -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Public License. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - - -\catcode`\@=11\relax - -\def\pgf@test@fmtname{LaTeX2e} -\expandafter\ifx\csname fmtname\endcsname\pgf@test@fmtname% - \PackageError{pgf}{This file should not be loaded with \LaTeX.}{} -\else% - -% Direct copy from latex.ltx: -\def\typeout#1{\immediate\write\@unused{#1}} -\alloc@7\write\chardef\sixt@@n\@unused -\let\@@par=\par -\def\@empty{} -\def\@gobble #1{} -\def\@gobbletwo #1#2{} -\long\def\@ifnextchar#1#2#3{% - \let\reserved@d=#1% - \def\reserved@a{#2}% - \def\reserved@b{#3}% - \futurelet\@let@token\@ifnch} -\def\@ifnch{% - \ifx\@let@token\@sptoken - \let\reserved@c\@xifnch - \else - \ifx\@let@token\reserved@d - \let\reserved@c\reserved@a - \else - \let\reserved@c\reserved@b - \fi - \fi - \reserved@c} -\def\in@#1#2{% - \def\in@@##1#1##2##3\in@@{% - \ifx\in@##2\in@false\else\in@true\fi}% - \in@@#2#1\in@\in@@} -\newif\ifin@ -\newdimen\@tempdima -\newdimen\@tempdimb -\newcount\@tempcnta -\newcount\@tempcntb -\def\@namedef#1{\expandafter\def\csname #1\endcsname} -\long\def\g@addto@macro#1#2{% - \begingroup - \toks@\expandafter{#1#2}% - \xdef#1{\the\toks@}% - \endgroup} -\long\def\mbox#1{\leavevmode\hbox{#1}} -\def\:{\global\let\@sptoken= } \: -\def\:{\@xifnch} \expandafter\def\: {\futurelet\@let@token\@ifnch} -\def\@nnil{\@nil} -\def\@fornoop#1\@@#2#3{} -\long\def\@for#1:=#2\do#3{% - \expandafter\def\expandafter\@fortmp\expandafter{#2}% - \ifx\@fortmp\@empty \else - \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}\fi} -\long\def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else - #5\def#4{#2}\ifx #4\@nnil \else#5\@iforloop #3\@@#4{#5}\fi\fi} -\long\def\@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil - \expandafter\@fornoop \else - #4\relax\expandafter\@iforloop\fi#2\@@#3{#4}} -\def\@tfor#1:={\@tf@r#1 } -\long\def\@tf@r#1#2\do#3{\def\@fortmp{#2}\ifx\@fortmp\space\else - \@tforloop#2\@nil\@nil\@@#1{#3}\fi} -\long\def\@tforloop#1#2\@@#3#4{\def#3{#1}\ifx #3\@nnil - \expandafter\@fornoop \else - #4\relax\expandafter\@tforloop\fi#2\@@#3{#4}} -\chardef\@inputcheck0 -\def\IfFileExists#1#2#3{% - \openin\@inputcheck#1 % - \ifeof\@inputcheck - #3\relax - \else - #2\relax - \fi - \closein\@inputcheck} -\newbox\@tempboxa -\newif\if@tempswa -\long\def\@firstoftwo#1#2{#1} -\long\def\@secondoftwo#1#2{#2} - -% Simplified version of latex.ltx: -\def\PackageInfo#1#2{}%\typeout{Package #1: Info: #2.}}% -\def\PackageWarning#1#2{\typeout{Package #1: Warning! #2.}}% -\def\PackageError#1#2#3{\typeout{Package #1: Error! #2.}}% -\long\def\AtBeginDocument#1{#1}% -\long\def\AtBeginDvi#1{#1}% -\def\InputIfFileExists#1#2#3{\input #1\relax#2}% -\def\minipage[#1]#2{% - \hbox to#2\bgroup% - \hsize=#2\relax% - \vbox\bgroup\leavevmode% -} -\def\endminipage{\egroup\egroup} -\def\providecommand#1#2{\def#1{#2}} - -\def\newcounter#1{\expandafter\alloc@\expandafter0\expandafter\count\expandafter\countdef\expandafter\insc@unt\csname c@#1\endcsname}% -\def\setcounter#1#2{\global\csname c@#1\endcsname#2\relax}% -\def\addtocounter#1#2{\global\advance\csname c@#1\endcsname #2\relax} -\newskip\pgf@length@skip -\def\setlength#1#2{\pgf@length@skip#2\relax#1\pgf@length@skip} -\def\addtolength#1#2{\advance#1 #2\relax} - - -% Driver detector (not so good): -\ifx\pdfoutput\@undefined\alloc@0\count\countdef\insc@unt\pdfoutput\fi -\ifx\pdfoutput\relax\alloc@0\count\countdef\insc@unt\pdfoutput\fi -\ifcase\pdfoutput% - \gdef\Gin@driver{dvips.def}% -\else% - \gdef\Gin@driver{pdftex.def}% -\fi% - -% aux files -\newwrite\@auxout -\IfFileExists{\jobname.aux}{\input \jobname.aux\relax}{} -\openout\@auxout - -% Things that are not too clever, yet: -\def\selectfont{\rm} -\def\applycolormixins#1{} - - -% My ultra-quick xcolor.sty emulation... -\newif\ifglobalcolors -\def\definecolor#1#2#3{\csname pgf@emu@#2\endcsname{#1}#3\@nil} -\def\pgf@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}} -\def\pgf@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}} - -\definecolor{white}{gray}{1} -\definecolor{black}{gray}{0} -\definecolor{gray}{gray}{0.5} -\definecolor{red}{rgb}{1,0,0} -\definecolor{green}{rgb}{0,1,0} -\definecolor{blue}{rgb}{0,0,1} -\definecolor{cyan}{rgb}{0,1,1} -\definecolor{magenta}{rgb}{1,0,1} -\definecolor{yellow}{rgb}{1,1,0} -\definecolor{orange}{rgb}{1,0.5,0} -\definecolor{violet}{rgb}{0.5,0,0.5} -\definecolor{purple}{rgb}{0.75,0,0.25} -\definecolor{brown}{rgb}{0.75,0.5,0.25} - -\ifx\color\@undefined -\def\color#1{% - \colorlet{.}{#1}% - \pgfsysprotocol@getcurrentprotocol\pgf@emu@temp% - {% - \pgfsysprotocol@setcurrentprotocol\@empty% - \pgfsysprotocol@bufferedtrue% - \pgfsetcolor{.}% - \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}% - }% - \pgfsysprotocol@setcurrentprotocol\pgf@emu@temp% - \aftergroup\reset@color% -} -\fi - -\def\reset@color{% - \pgfsysprotocol@getcurrentprotocol\pgf@emu@temp% - {% - \pgfsysprotocol@setcurrentprotocol\@empty% - \pgfsysprotocol@bufferedtrue% - \pgfsetcolor{.}% - \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}% - }% - \pgfsysprotocol@setcurrentprotocol\pgf@emu@temp% -} -\expandafter\def\csname\string\color@.\endcsname{\xcolor@{}{}{rgb}{0,0,0}} - - -\def\colorlet#1#2{% - \edef\pgf@marshal{#2}% - \expandafter\in@\expandafter!\expandafter{\pgf@marshal}% - \ifin@% - % compute mixture - {% - \expandafter\pgf@emu@mix\pgf@marshal!white!\@nil% - \xdef\pgf@marshal{\noexpand\def\expandafter\noexpand\csname\string\color@#1\endcsname{% - \noexpand\xcolor@{}{}{rgb}{\pgf@sys@tonumber\pgf@xa,\pgf@sys@tonumber\pgf@xb,\pgf@sys@tonumber\pgf@xc}}}% - }% - \pgf@marshal% - \else% - \edef\pgf@marshal{\noexpand\let\expandafter\noexpand\csname\string\color@#1\endcsname=% - \expandafter\noexpand\csname\string\color@#2\endcsname}% - \pgf@marshal% - \fi% -} -\def\pgf@emu@mix#1!#2!#3!#4\@nil{% - \expandafter\expandafter\expandafter\pgf@emu@unpack\csname\string\color@#1\endcsname% - \pgf@ya=\pgf@xa% - \pgf@yb=\pgf@xb% - \pgf@yc=\pgf@xc% - \expandafter\expandafter\expandafter\pgf@emu@unpack\csname\string\color@#3\endcsname% - \c@pgf@counta=#2\relax% - \c@pgf@countb=100\relax% - \advance\c@pgf@countb by-\c@pgf@counta\relax% - \pgf@xa=\c@pgf@countb\pgf@xa% - \advance\pgf@xa by\c@pgf@counta\pgf@ya% - \divide\pgf@xa by 100\relax% - \pgf@xb=\c@pgf@countb\pgf@xb% - \advance\pgf@xb by\c@pgf@counta\pgf@yb% - \divide\pgf@xb by 100\relax% - \pgf@xc=\c@pgf@countb\pgf@xc% - \advance\pgf@xc by\c@pgf@counta\pgf@yc% - \divide\pgf@xc by 100\relax% -} -\def\pgf@emu@unpack#1#2#3#4#5{% - \pgf@emu@@unpack#5\@nil% -} -\def\pgf@emu@@unpack#1,#2,#3\@nil{% - \pgf@xa=#1pt% - \pgf@xb=#2pt% - \pgf@xc=#3pt% -} - -\def\extractcolorspec#1#2{% - \def#2{{#1}}% -} - -\def\convertcolorspec#1#2#3{% - \edef#3{\expandafter\expandafter\expandafter\pgf@emu@select\csname\string\color@#1\endcsname}% -} -\def\pgf@emu@select#1#2#3#4#5{#5} - - - - -% Adapted from keyval.sty: -\newtoks\KV@toks@ - -\ifx\setkeys\@undefined -\def\setkeys#1#2{% - \def\KV@prefix{KV@#1@}% - \let\@tempc\relax - \KV@do#2,\relax,} -\def\KV@do#1,{% - \ifx\relax#1\empty\else - \KV@split#1==\relax - \expandafter\KV@do\fi} -\def\KV@split#1=#2=#3\relax{% - \KV@@sp@def\@tempa{#1}% - \ifx\@tempa\@empty\else - \expandafter\let\expandafter\@tempc - \csname\KV@prefix\@tempa\endcsname - \ifx\@tempc\relax - \KV@errx - {\@tempa\space undefined}% - \else - \ifx\@empty#3\@empty - \KV@default - \else - \KV@@sp@def\@tempb{#2}% - \expandafter\@tempc\expandafter{\@tempb}\relax - \fi - \fi - \fi} -\def\KV@default{% - \expandafter\let\expandafter\@tempb - \csname\KV@prefix\@tempa @default\endcsname - \ifx\@tempb\relax - \KV@errx{No value specified for \@tempa}% - \else - \@tempb\relax - \fi} -\def\KV@errx#1{\PackageError{keyval}{#1}{}} -\def\@tempa#1{% -\def\KV@@sp@def##1##2{% - \futurelet\KV@tempa\KV@@sp@d##2\@nil\@nil#1\@nil\relax##1}% -\def\KV@@sp@d{% - \ifx\KV@tempa\@sptoken - \expandafter\KV@@sp@b - \else - \expandafter\KV@@sp@b\expandafter#1% - \fi}% -\def\KV@@sp@b#1##1 \@nil{\KV@@sp@c##1}% - } -\@tempa{ } -\def\KV@@sp@c#1\@nil#2\relax#3{\KV@toks@{#1}\edef#3{\the\KV@toks@}} -\def\define@key#1#2{% - \@ifnextchar[{\KV@def{#1}{#2}}{\@namedef{KV@#1@#2}####1}} -\def\KV@def#1#2[#3]{% - \@namedef{KV@#1@#2@default\expandafter}\expandafter - {\csname KV@#1@#2\endcsname{#3}}% - \@namedef{KV@#1@#2}##1} -\fi% -\fi% - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex index 86b4106af18..6f2cc5f1996 100644 --- a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex @@ -7,15 +7,15 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgffor.code.tex,v 1.4 2006/10/11 15:22:26 tantau Exp $ +\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgffor.code.tex,v 1.5 2006/10/16 22:32:59 tantau Exp $ \newdimen\pgffor@iter \newdimen\pgffor@skip \newif\ifpgffor@continue -\let\pgffor@beginhook=\@empty -\let\pgffor@endhook=\@empty -\let\pgffor@afterhook=\@empty +\let\pgffor@beginhook=\pgfutil@empty +\let\pgffor@endhook=\pgfutil@empty +\let\pgffor@afterhook=\pgfutil@empty \def\pgffor@emptyvalues{, \pgffor@stop,}% @@ -25,13 +25,13 @@ \ifx\pgffor@values\pgffor@emptyvalues \def\pgffor@values{\pgffor@stop,}% \fi% - \let\pgffor@body\@empty% + \let\pgffor@body\pgfutil@empty% \global\pgffor@continuetrue% \pgffor@collectbody} \def\pgffor@collectbody{% - \@ifnextchar\foreach{\pgffor@collectforeach}{% - \@ifnextchar\bgroup{\pgffor@collectargument}{\pgffor@collectsemicolon}}% + \pgfutil@ifnextchar\foreach{\pgffor@collectforeach}{% + \pgfutil@ifnextchar\bgroup{\pgffor@collectargument}{\pgffor@collectsemicolon}}% } \def\pgffor@collectforeach\foreach#1in#2{% @@ -68,14 +68,14 @@ } \def\pgffor@iterate{% - \let\pgffor@last\@empty% - \let\pgffor@prevlast\@empty% + \let\pgffor@last\pgfutil@empty% + \let\pgffor@prevlast\pgfutil@empty% \expandafter\pgffor@scan\pgffor@values} \def\pgffor@stop{\pgffor@stop}% \def\pgffor@dots{...}% -\def\pgffor@scan{\@ifnextchar({\pgffor@scanround}{\pgffor@scanone}} +\def\pgffor@scan{\pgfutil@ifnextchar({\pgffor@scanround}{\pgffor@scanone}} \def\pgffor@scanround(#1)#2,{\def\pgffor@value{(#1)}\pgffor@scanned} \def\pgffor@scanone#1,{\def\pgffor@value{#1}\pgffor@scanned} @@ -134,7 +134,7 @@ \def\pgffor@multiassignrest{\expandafter\pgffor@multiassignfinal\pgffor@valuerest} \def\pgffor@multiassignfinal#1/#2/\relax{% \def\pgffor@test{#2}% - \ifx\pgffor@test\@empty% + \ifx\pgffor@test\pgfutil@empty% \def\pgffor@valuerest{#1//\relax}% repeat \else% \def\pgffor@valuerest{#2/\relax}% @@ -147,7 +147,7 @@ \def\pgffor@handledots{% - \ifx\pgffor@last\@empty% + \ifx\pgffor@last\pgfutil@empty% \PackageError{pgffor}{``...'' not allowed without prior value}{}% \fi% \pgffor@dotsscanend% @@ -155,7 +155,7 @@ \def\pgffor@dotsscanend#1,{% \def\pgffor@dotsend{#1}% % calculate skip% - \ifx\pgffor@prevlast\@empty% + \ifx\pgffor@prevlast\pgfutil@empty% \ifdim\pgffor@dotsend pt>\pgffor@last pt% \pgffor@skip=1pt% \else% diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex index 68c5150641a..d3a6b4d6077 100644 --- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex @@ -15,7 +15,7 @@ % prints out a message to the log. -\def\pgfversion{1.09} +\def\pgfversion{1.10} \ifx\pgfrcsloaded\undefined @@ -24,8 +24,6 @@ \edef\pgfrcsatcode{\the\catcode`\@} \catcode`\@=11 -\def\@empty{} - % Get date and version from RCS Ids \def\pgf@parseid $#1: #2.#3,v #4 #5/#6/#7 #8${% \pgf@parsercsfile$#2/$ @@ -35,7 +33,7 @@ } \def\pgf@parsercsfile$#1/#2${ \def\pgf@temp{#2} - \ifx\pgf@temp\@empty + \ifx\pgf@temp\pgfutil@empty \def\pgf@rcsfile{#1} \else \pgf@parsercsfile$#2$ @@ -88,7 +86,7 @@ \def\ProvidesFile#1[#2]{\wlog{Loading file #1 version #2.}} \fi -\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfrcs.code.tex,v 1.12 2006/10/11 15:22:26 tantau Exp $ +\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfrcs.code.tex,v 1.14 2006/10/26 16:07:01 tantau Exp $ \catcode`\@=\pgfrcsatcode diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex new file mode 100644 index 00000000000..e134db7a099 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex @@ -0,0 +1,119 @@ +% Copyright 2006 by Till Tantau +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details. + + +% +% This file provides utitiliy commands that are used throughout pgf. +% +% For most commands, the definition of these commands is just given +% below. We cannot use the LaTeX definition of these commands since +% LaTeX may not be the current format and since LaTeX packages tend to +% redefine these commands. +% +% For some commands the actual definition of the format (like latex or +% context) is to be preferred over the generic definition below. In +% this case, the definition of the format is installed when the file +% pgfutil-XXXX.tex is read, where XXXX is the format name (latex, +% plain, or context). + + + +\catcode`\@=11\relax + + +% Simple stuff + +\long\def\pgfutil@ifundefined#1{% + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\pgfutil@firstoftwo + \else + \expandafter\pgfutil@secondoftwo + \fi} +\def\pgfutil@firstoftwo#1#2{#1} +\def\pgfutil@secondoftwo#1#2{#2} +\def\pgfutil@empty{} +\def\pgfutil@gobble#1{} +\def\pgfutil@gobbletwo#1#2{} +\def\pgfutil@namedef#1{\expandafter\def\csname #1\endcsname} +\long\def\pgfutil@g@addto@macro#1#2{% + \begingroup + \toks@\expandafter{#1#2}% + \xdef#1{\the\toks@}% + \endgroup} +\newif\ifpgfutil@tempswa + +% pgfutil@ifnextchar + +\long\def\pgfutil@ifnextchar#1#2#3{% + \let\pgfutil@reserved@d=#1% + \def\pgfutil@reserved@a{#2}% + \def\pgfutil@reserved@b{#3}% + \futurelet\pgfutil@let@token\pgfutil@ifnch} +\def\pgfutil@ifnch{% + \ifx\pgfutil@let@token\pgfutil@sptoken + \let\pgfutil@reserved@c\pgfutil@xifnch + \else + \ifx\pgfutil@let@token\pgfutil@reserved@d + \let\pgfutil@reserved@c\pgfutil@reserved@a + \else + \let\pgfutil@reserved@c\pgfutil@reserved@b + \fi + \fi + \pgfutil@reserved@c} +\def\:{\global\let\pgfutil@sptoken= } \: +\def\:{\pgfutil@xifnch} \expandafter\def\: {\futurelet\pgfutil@let@token\pgfutil@ifnch} + + +% pgfutil@in@ + +\newif\ifpgfutil@in@ +\def\pgfutil@in@#1#2{% + \def\pgfutil@in@@##1#1##2##3\pgfutil@in@@{% + \ifx\pgfutil@in@##2\pgfutil@in@false\else\pgfutil@in@true\fi}% + \pgfutil@in@@#2#1\pgfutil@in@\pgfutil@in@@} + + +% pgfutil@for + +\def\pgfutil@nnil{\pgfutil@nil} +\def\pgfutil@fornoop#1\@@#2#3{} +\long\def\pgfutil@for#1:=#2\do#3{% + \expandafter\def\expandafter\pgfutil@fortmp\expandafter{#2}% + \ifx\pgfutil@fortmp\pgfutil@empty \else + \expandafter\pgfutil@forloop#2,\pgfutil@nil,\pgfutil@nil\@@#1{#3}\fi} +\long\def\pgfutil@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\pgfutil@nnil \else + #5\def#4{#2}\ifx #4\pgfutil@nnil \else#5\pgfutil@iforloop #3\@@#4{#5}\fi\fi} +\long\def\pgfutil@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\pgfutil@nnil + \expandafter\pgfutil@fornoop \else + #4\relax\expandafter\pgfutil@iforloop\fi#2\@@#3{#4}} +\def\pgfutil@tfor#1:={\pgfutil@tf@r#1 } +\long\def\pgfutil@tf@r#1#2\do#3{\def\pgfutil@fortmp{#2}\ifx\pgfutil@fortmp\space\else + \pgfutil@tforloop#2\pgfutil@nil\pgfutil@nil\@@#1{#3}\fi} +\long\def\pgfutil@tforloop#1#2\@@#3#4{\def#3{#1}\ifx #3\pgfutil@nnil + \expandafter\pgfutil@fornoop \else + #4\relax\expandafter\pgfutil@tforloop\fi#2\@@#3{#4}} + + +% pgfutil@IfFileExists + +\chardef\pgfutil@inputcheck0 +\def\pgfutil@IfFileExists#1#2#3{% + \openin\pgfutil@inputcheck#1 % + \ifeof\pgfutil@inputcheck + #3\relax + \else + #2\relax + \fi + \closein\pgfutil@inputcheck} + +\def\pgfutil@InputIfFileExists#1#2#3{\pgfutil@IfFileExists{#1}{\input #1\relax#2}{#3}}% + + + +\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def new file mode 100644 index 00000000000..ebd9780372c --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def @@ -0,0 +1,307 @@ +% Copyright 2006 by Till Tantau +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details. + + + + +% The aux files, needed for reading back coordinates + +\newwrite\pgfutil@auxout +\pgfutil@IfFileExists{\jobname.aux}{\input \jobname.aux\relax}{} +\openout\pgfutil@auxout +% Hmm, is there a better file for use with ConTeXt? + + + + +% XColor-like support for ConTeXt + +\def\pgfutil@definecolor#1#2#3{\csname pgfutil@emu@#2\endcsname{#1}#3\@nil} + +\def\pgfutil@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}} +\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}} + +\pgfutil@definecolor{white}{gray}{1} +\pgfutil@definecolor{black}{gray}{0} +\pgfutil@definecolor{gray}{gray}{0.5} +\pgfutil@definecolor{red}{rgb}{1,0,0} +\pgfutil@definecolor{green}{rgb}{0,1,0} +\pgfutil@definecolor{blue}{rgb}{0,0,1} +\pgfutil@definecolor{cyan}{rgb}{0,1,1} +\pgfutil@definecolor{magenta}{rgb}{1,0,1} +\pgfutil@definecolor{yellow}{rgb}{1,1,0} +\pgfutil@definecolor{orange}{rgb}{1,0.5,0} +\pgfutil@definecolor{violet}{rgb}{0.5,0,0.5} +\pgfutil@definecolor{purple}{rgb}{0.75,0,0.25} +\pgfutil@definecolor{brown}{rgb}{0.75,0.5,0.25} + +\def\pgfutil@color#1{% + \pgfutil@colorlet{.}{#1}% + \pgfsysprotocol@getcurrentprotocol\pgfutil@emu@temp% + {% + \pgfsysprotocol@setcurrentprotocol\pgfutil@empty% + \pgfsysprotocol@bufferedtrue% + \pgfsetcolor{.}% + \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}% + }% + \pgfsysprotocol@setcurrentprotocol\pgfutil@emu@temp% + \aftergroup\pgfutil@reset@color% +} + +\def\pgfutil@extractcolorspec#1#2{% + \def#2{{#1}}% +} + +\def\pgfutil@convertcolorspec#1#2#3{% + \edef#3{\expandafter\expandafter\expandafter\pgfutil@emu@select\csname\string\color@#1\endcsname}% +} + +\let\pgfutil@doifcolorelse=\doifcolorelse + + +\def\pgfutil@reset@color{% + \pgfsysprotocol@getcurrentprotocol\pgfutil@emu@temp% + {% + \pgfsysprotocol@setcurrentprotocol\pgfutil@empty% + \pgfsysprotocol@bufferedtrue% + \pgfsetcolor{.}% + \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}% + }% + \pgfsysprotocol@setcurrentprotocol\pgfutil@emu@temp% +} +\expandafter\def\csname\string\color@.\endcsname{\xcolor@{}{}{rgb}{0,0,0}} + +\def\pgfutil@colorlet#1#2{% + \edef\pgf@marshal{#2}% + \expandafter\pgfutil@in@\expandafter!\expandafter{\pgf@marshal}% + \ifpgfutil@in@% + % compute mixture + {% + \expandafter\pgfutil@emu@mix\pgf@marshal!white!\@nil% + \xdef\pgf@marshal{\noexpand\def\expandafter\noexpand\csname\string\color@#1\endcsname{% + \noexpand\xcolor@{}{}{rgb}{\pgf@sys@tonumber\pgf@xa,\pgf@sys@tonumber\pgf@xb,\pgf@sys@tonumber\pgf@xc}}}% + }% + \pgf@marshal% + \else% + \expandafter\ifx\csname\string\color@#2\endcsname\relax% + \pgfutil@registercolor{#2}% + \fi% + \edef\pgf@marshal{\noexpand\let\expandafter\noexpand\csname\string\color@#1\endcsname=% + \expandafter\noexpand\csname\string\color@#2\endcsname}% + \pgf@marshal% + \fi% +} +\def\pgfutil@emu@mix#1!#2!#3!#4\@nil{% + \expandafter\ifx\csname\string\color@#1\endcsname\relax% + \pgfutil@registercolor{#1}% + \fi% + \expandafter\ifx\csname\string\color@#3\endcsname\relax% + \pgfutil@registercolor{#3}% + \fi% + \expandafter\expandafter\expandafter\pgfutil@emu@unpack\csname\string\color@#1\endcsname% + \pgf@ya=\pgf@xa% + \pgf@yb=\pgf@xb% + \pgf@yc=\pgf@xc% + \expandafter\expandafter\expandafter\pgfutil@emu@unpack\csname\string\color@#3\endcsname% + \c@pgf@counta=#2\relax% + \c@pgf@countb=100\relax% + \advance\c@pgf@countb by-\c@pgf@counta\relax% + \pgf@xa=\c@pgf@countb\pgf@xa% + \advance\pgf@xa by\c@pgf@counta\pgf@ya% + \divide\pgf@xa by 100\relax% + \pgf@xb=\c@pgf@countb\pgf@xb% + \advance\pgf@xb by\c@pgf@counta\pgf@yb% + \divide\pgf@xb by 100\relax% + \pgf@xc=\c@pgf@countb\pgf@xc% + \advance\pgf@xc by\c@pgf@counta\pgf@yc% + \divide\pgf@xc by 100\relax% +} +\def\pgfutil@emu@unpack#1#2#3#4#5{% + \pgfutil@emu@@unpack#5\@nil% +} +\def\pgfutil@emu@@unpack#1,#2,#3\@nil{% + \pgf@xa=#1pt% + \pgf@xb=#2pt% + \pgf@xc=#3pt% +} + +\def\pgfutil@emu@select#1#2#3#4#5{#5} + + +\def\pgfutil@registercolor#1{% + \edef\pgf@temp{\PDFcolor{#1}}% + \edef\pgf@marshal{\noexpand\pgfutil@in@{ g}{\pgf@temp}}% + \pgf@marshal% + \ifpgfutil@in@% + \expandafter\pgfutil@context@parse@gray\pgf@temp{#1}% + \else% + \edef\pgf@marshal{\noexpand\pgfutil@in@{ rg}{\pgf@temp}}% + \pgf@marshal% + \ifpgfutil@in@% + \expandafter\pgfutil@context@parse@rgb\pgf@temp{#1}% + \else% + \PackageError{pgf}{Color #1 has an unsupported color model.}{}% + \pgfutil@definecolor{#1}{gray}{0} + \fi% + \fi% +} + +\def\pgfutil@context@parse@gray#1 g#2{% + \pgfutil@definecolor{#2}{gray}{#1} +} + +\def\pgfutil@context@parse@rgb#1 #2 #3 rg#4{% + \pgfutil@definecolor{#4}{rgb}{#1,#2,#3} +} + + + +% pgfutil@minipage + +\def\pgfutil@minipage[#1]#2{% + \hbox to#2\bgroup% + \hsize=#2\relax% + \vbox\bgroup\leavevmode% +} +\def\pgfutil@endminipage{\egroup\egroup} + + + +% Driver detector (how should we do this in ConTeXt?) : + +\ifx\pdfoutput\@undefined\newcount\pdfoutput\fi +\ifx\pdfoutput\relax\newcount\pdfoutput\fi +\ifcase\pdfoutput% + \gdef\Gin@driver{dvips.def}% +\else% + \gdef\Gin@driver{pdftex.def}% +\fi% + + + +% Global colors + +\let\pgfutil@globalcolorsfalse=\relax +\let\pgfutil@globalcolorstrue=\relax + + + +% Font stuff + +\def\pgfutil@font@tiny{\tfxx} % How to do this correctly? +\def\pgfutil@font@scriptsize{\tfxx} +\def\pgfutil@font@footnotesize{\tfx} +\def\pgfutil@font@small{\tfx} +\def\pgfutil@font@normalsize{\tf} +\def\pgfutil@font@large{\tfa} +\def\pgfutil@font@Large{\tfb} +\def\pgfutil@font@huge{\tfc} +\def\pgfutil@font@Huge{\tfc} + +\def\pgfutil@font@itshape{\it} +\def\pgfutil@font@bfseries{\bf} + + +% The following is still messy and needs to be cleanup up (everything +% prefixed by pgfutil@): + +\def\PackageInfo#1#2{} +\def\PackageWarning#1#2{\immediate\write-1{Package #1: Warning! #2.}}% +\def\PackageError#1#2#3{\immediate\write-1{Package #1: Error! #2.}}% +\long\def\AtBeginDocument#1{#1}% +\long\def\AtBeginDvi#1{#1}% +\def\providecommand#1#2{\ifx#1\@undefined\def#1{#2}\fi} + +\def\pgflatex@setcounter#1#2{\global\csname c@#1\endcsname#2\relax}% + +\def\setlength#1#2{% + \pgf@length@skip=0pt% + \edef\pgf@temp{#2}% + \expandafter\pgfutil@parse@setlength\pgf@temp+\pgf@stop% + #1=\pgf@length@skip% +} +\def\pgfutil@parse@setlength#1+#2\pgf@stop{% + \advance\pgf@length@skip by#1\relax% + \def\pgf@test{#2}% + \ifx\pgf@test\pgfutil@empty% + \else% + \pgfutil@parse@setlength#2\pgf@stop% + \fi% +} +\def\addtolength#1#2{\setlength{\pgf@length@skip}{#2}\advance#1 \pgf@length@skip\relax} +\def\selectfont{\rm} +\def\applycolormixins#1{} + +\ifx\setkeys\@undefined +\def\setkeys#1#2{% + \def\KV@prefix{KV@#1@}% + \let\@tempc\relax + \KV@do#2,\relax,} +\def\KV@do#1,{% + \ifx\relax#1\pgfutil@empty\else + \KV@split#1==\relax + \expandafter\KV@do\fi} +\def\KV@split#1=#2=#3\relax{% + \KV@@sp@def\@tempa{#1}% + \ifx\@tempa\pgfutil@empty\else + \expandafter\let\expandafter\@tempc + \csname\KV@prefix\@tempa\endcsname + \ifx\@tempc\relax + \KV@errx + {\@tempa\space undefined}% + \else + \ifx\pgfutil@empty#3\pgfutil@empty + \KV@default + \else + \KV@@sp@def\@tempb{#2}% + \expandafter\@tempc\expandafter{\@tempb}\relax + \fi + \fi + \fi} +\def\KV@default{% + \expandafter\let\expandafter\@tempb + \csname\KV@prefix\@tempa @default\endcsname + \ifx\@tempb\relax + \KV@errx{No value specified for \@tempa}% + \else + \@tempb\relax + \fi} +\def\KV@errx#1{\PackageError{keyval}{#1}{}} +\def\@tempa#1{% +\def\KV@@sp@def##1##2{% + \futurelet\KV@tempa\KV@@sp@d##2\@nil\@nil#1\@nil\relax##1}% +\def\KV@@sp@d{% + \ifx\KV@tempa\@sptoken + \expandafter\KV@@sp@b + \else + \expandafter\KV@@sp@b\expandafter#1% + \fi}% +\def\KV@@sp@b#1##1 \@nil{\KV@@sp@c##1}% + } +\@tempa{ } +\def\KV@@sp@c#1\@nil#2\relax#3{\KV@toks@{#1}\edef#3{\the\KV@toks@}} +\def\define@key#1#2{% + \pgfutil@ifnextchar[{\KV@def{#1}{#2}}{\pgfutil@namedef{KV@#1@#2}####1}} +\def\KV@def#1#2[#3]{% + \pgfutil@namedef{KV@#1@#2@default\expandafter}\expandafter + {\csname KV@#1@#2\endcsname{#3}}% + \pgfutil@namedef{KV@#1@#2}##1} +\fi% + + +\newtoks\KV@toks@ +\newdimen\@tempdima +\newdimen\@tempdimb +\newcount\@tempcnta +\newcount\@tempcntb +\newbox\@tempboxa +\newskip\pgf@length@skip + + +\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def new file mode 100644 index 00000000000..8d75746a663 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def @@ -0,0 +1,51 @@ +% Copyright 2006 by Till Tantau +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details. + + +\catcode`\@=11\relax + +\let\pgfutil@auxout=\@auxout + +\def\pgfutil@definecolor{\definecolor} +\def\pgfutil@color{\color} +\def\pgfutil@colorlet{\colorlet} +\def\pgfutil@extractcolorspec{\extractcolorspec} +\def\pgfutil@convertcolorspec{\convertcolorspec} + +\def\pgfutil@globalcolorsfalse{\let\ifglobalcolors\iffalse} +\def\pgfutil@globalcolorstrue{\let\ifglobalcolors\iftrue} + +\def\pgfutil@minipage{\minipage} +\def\pgfutil@endminipage{\endminipage} + +\def\pgfutil@doifcolorelse#1#2#3{% + \expandafter\ifx\csname\string\color@#1\endcsname\relax% + \let\pgf@next=\pgfutil@secondoftwo% + \else + \let\pgf@next=\pgfutil@firstoftwo% + \fi% + \pgf@next{#2}{#3}% +} + + +\def\pgfutil@font@tiny{\tiny} +\def\pgfutil@font@scriptsize{\scriptsize} +\def\pgfutil@font@footnotesize{\footnotesize} +\def\pgfutil@font@small{\small} +\def\pgfutil@font@normalsize{\normalsize} +\def\pgfutil@font@large{\large} +\def\pgfutil@font@Large{\Large} +\def\pgfutil@font@huge{\huge} +\def\pgfutil@font@Huge{\Huge} + +\def\pgfutil@font@itshape{\itshape} +\def\pgfutil@font@bfseries{\bfseries} + + +\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def new file mode 100644 index 00000000000..474cdea9f1a --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def @@ -0,0 +1,287 @@ +% Copyright 2006 by Till Tantau +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details. + + + + + +% The aux files, needed for reading back coordinates + +\newwrite\pgfutil@auxout +\pgfutil@IfFileExists{\jobname.aux}{\input \jobname.aux\relax}{} +\openout\pgfutil@auxout + + + +% XColor-like support for plain TeX + +\def\pgfutil@definecolor#1#2#3{\csname pgfutil@emu@#2\endcsname{#1}#3\@nil} + +\def\pgfutil@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}} +\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}} + +\pgfutil@definecolor{white}{gray}{1} +\pgfutil@definecolor{black}{gray}{0} +\pgfutil@definecolor{gray}{gray}{0.5} +\pgfutil@definecolor{red}{rgb}{1,0,0} +\pgfutil@definecolor{green}{rgb}{0,1,0} +\pgfutil@definecolor{blue}{rgb}{0,0,1} +\pgfutil@definecolor{cyan}{rgb}{0,1,1} +\pgfutil@definecolor{magenta}{rgb}{1,0,1} +\pgfutil@definecolor{yellow}{rgb}{1,1,0} +\pgfutil@definecolor{orange}{rgb}{1,0.5,0} +\pgfutil@definecolor{violet}{rgb}{0.5,0,0.5} +\pgfutil@definecolor{purple}{rgb}{0.75,0,0.25} +\pgfutil@definecolor{brown}{rgb}{0.75,0.5,0.25} + +\def\pgfutil@color#1{% + \pgfutil@colorlet{.}{#1}% + \pgfsysprotocol@getcurrentprotocol\pgfutil@emu@temp% + {% + \pgfsysprotocol@setcurrentprotocol\pgfutil@empty% + \pgfsysprotocol@bufferedtrue% + \pgfsetcolor{.}% + \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}% + }% + \pgfsysprotocol@setcurrentprotocol\pgfutil@emu@temp% + \aftergroup\pgfutil@reset@color% +} + +\def\pgfutil@extractcolorspec#1#2{% + \def#2{{#1}}% +} + +\def\pgfutil@convertcolorspec#1#2#3{% + \edef#3{\expandafter\expandafter\expandafter\pgfutil@emu@select\csname\string\color@#1\endcsname}% +} + + +\def\pgfutil@doifcolorelse#1#2#3{% + \expandafter\ifx\csname\string\color@#1\endcsname\relax% + \let\pgf@next=\pgfutil@secondoftwo% + \else + \let\pgf@next=\pgfutil@firstoftwo% + \fi% + \pgf@next{#2}{#3}% +} + + +\def\pgfutil@reset@color{% + \pgfsysprotocol@getcurrentprotocol\pgfutil@emu@temp% + {% + \pgfsysprotocol@setcurrentprotocol\pgfutil@empty% + \pgfsysprotocol@bufferedtrue% + \pgfsetcolor{.}% + \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}% + }% + \pgfsysprotocol@setcurrentprotocol\pgfutil@emu@temp% +} +\expandafter\def\csname\string\color@.\endcsname{\xcolor@{}{}{rgb}{0,0,0}} + +\def\pgfutil@colorlet#1#2{% + \edef\pgf@marshal{#2}% + \expandafter\pgfutil@in@\expandafter!\expandafter{\pgf@marshal}% + \ifpgfutil@in@% + % compute mixture + {% + \expandafter\pgfutil@emu@mix\pgf@marshal!white!\@nil% + \xdef\pgf@marshal{\noexpand\def\expandafter\noexpand\csname\string\color@#1\endcsname{% + \noexpand\xcolor@{}{}{rgb}{\pgf@sys@tonumber\pgf@xa,\pgf@sys@tonumber\pgf@xb,\pgf@sys@tonumber\pgf@xc}}}% + }% + \pgf@marshal% + \else% + \edef\pgf@marshal{\noexpand\let\expandafter\noexpand\csname\string\color@#1\endcsname=% + \expandafter\noexpand\csname\string\color@#2\endcsname}% + \pgf@marshal% + \fi% +} +\def\pgfutil@emu@mix#1!#2!#3!#4\@nil{% + \expandafter\expandafter\expandafter\pgfutil@emu@unpack\csname\string\color@#1\endcsname% + \pgf@ya=\pgf@xa% + \pgf@yb=\pgf@xb% + \pgf@yc=\pgf@xc% + \expandafter\expandafter\expandafter\pgfutil@emu@unpack\csname\string\color@#3\endcsname% + \c@pgf@counta=#2\relax% + \c@pgf@countb=100\relax% + \advance\c@pgf@countb by-\c@pgf@counta\relax% + \pgf@xa=\c@pgf@countb\pgf@xa% + \advance\pgf@xa by\c@pgf@counta\pgf@ya% + \divide\pgf@xa by 100\relax% + \pgf@xb=\c@pgf@countb\pgf@xb% + \advance\pgf@xb by\c@pgf@counta\pgf@yb% + \divide\pgf@xb by 100\relax% + \pgf@xc=\c@pgf@countb\pgf@xc% + \advance\pgf@xc by\c@pgf@counta\pgf@yc% + \divide\pgf@xc by 100\relax% +} +\def\pgfutil@emu@unpack#1#2#3#4#5{% + \pgfutil@emu@@unpack#5\@nil% +} +\def\pgfutil@emu@@unpack#1,#2,#3\@nil{% + \pgf@xa=#1pt% + \pgf@xb=#2pt% + \pgf@xc=#3pt% +} + +\def\pgfutil@emu@select#1#2#3#4#5{#5} + + + +\let\definecolor=\pgfutil@definecolor +\let\color=\pgfutil@color +\let\colorlet=\pgfutil@colorlet +\let\extractcolorspec=\pgfutil@extractcolorspec +\let\convertcolorspec=\pgfutil@convertcolorspec + + + + +% pgfutil@minipage + +\def\pgfutil@minipage[#1]#2{% + \hbox to#2\bgroup% + \hsize=#2\relax% + \vbox\bgroup\leavevmode% +} +\def\pgfutil@endminipage{\egroup\egroup} + + + +% Driver detector (not so good): + +\ifx\pdfoutput\@undefined\alloc@0\count\countdef\insc@unt\pdfoutput\fi +\ifx\pdfoutput\relax\alloc@0\count\countdef\insc@unt\pdfoutput\fi +\ifcase\pdfoutput% + \gdef\Gin@driver{dvips.def}% +\else% + \gdef\Gin@driver{pdftex.def}% +\fi% + + +% Global colors + +\let\pgfutil@globalcolorsfalse=\relax +\let\pgfutil@globalcolorstrue=\relax + + + +% Font stuff + +\def\pgfutil@font@tiny{\fam\z@\fiverm} % How to do this correctly? +\def\pgfutil@font@scriptsize{\fam\z@\sevenrm} +\def\pgfutil@font@footnotesize{\rm} +\def\pgfutil@font@small{\fam\z@\ninerm} +\def\pgfutil@font@normalsize{\rm} +\def\pgfutil@font@large{\rm} +\def\pgfutil@font@Large{\rm} +\def\pgfutil@font@huge{\rm} +\def\pgfutil@font@Huge{\rm} + +\def\pgfutil@font@itshape{\it} +\def\pgfutil@font@bfseries{\bf} + + + + +% The following is still messy and needs to be cleanup up (everything +% prefixed by pgfutil@): + +\def\PackageInfo#1#2{} +\def\PackageWarning#1#2{\immediate\write-1{Package #1: Warning! #2.}}% +\def\PackageError#1#2#3{\immediate\write-1{Package #1: Error! #2.}}% +\long\def\AtBeginDocument#1{#1}% +\long\def\AtBeginDvi#1{#1}% +\def\providecommand#1#2{\ifx#1\@undefined\def#1{#2}\fi} +\def\pgflatex@setcounter#1#2{\global\csname c@#1\endcsname#2\relax}% +\def\setlength#1#2{% + \pgf@length@skip=0pt% + \edef\pgf@temp{#2}% + \expandafter\pgfutil@parse@setlength\pgf@temp+\pgf@stop% + #1=\pgf@length@skip% +} +\def\pgfutil@parse@setlength#1+#2\pgf@stop{% + \advance\pgf@length@skip by#1\relax% + \def\pgf@test{#2}% + \ifx\pgf@test\pgfutil@empty% + \else% + \pgfutil@parse@setlength#2\pgf@stop% + \fi% +} +\def\addtolength#1#2{\setlength{\pgf@length@skip}{#2}\advance#1 \pgf@length@skip\relax} +\def\selectfont{\rm} +\def\applycolormixins#1{} +\ifx\setkeys\@undefined +\def\setkeys#1#2{% + \def\KV@prefix{KV@#1@}% + \let\@tempc\relax + \KV@do#2,\relax,} +\def\KV@do#1,{% + \ifx\relax#1\pgfutil@empty\else + \KV@split#1==\relax + \expandafter\KV@do\fi} +\def\KV@split#1=#2=#3\relax{% + \KV@@sp@def\@tempa{#1}% + \ifx\@tempa\pgfutil@empty\else + \expandafter\let\expandafter\@tempc + \csname\KV@prefix\@tempa\endcsname + \ifx\@tempc\relax + \KV@errx + {\@tempa\space undefined}% + \else + \ifx\pgfutil@empty#3\pgfutil@empty + \KV@default + \else + \KV@@sp@def\@tempb{#2}% + \expandafter\@tempc\expandafter{\@tempb}\relax + \fi + \fi + \fi} +\def\KV@default{% + \expandafter\let\expandafter\@tempb + \csname\KV@prefix\@tempa @default\endcsname + \ifx\@tempb\relax + \KV@errx{No value specified for \@tempa}% + \else + \@tempb\relax + \fi} +\def\KV@errx#1{\PackageError{keyval}{#1}{}} +\def\@tempa#1{% +\def\KV@@sp@def##1##2{% + \futurelet\KV@tempa\KV@@sp@d##2\@nil\@nil#1\@nil\relax##1}% +\def\KV@@sp@d{% + \ifx\KV@tempa\@sptoken + \expandafter\KV@@sp@b + \else + \expandafter\KV@@sp@b\expandafter#1% + \fi}% +\def\KV@@sp@b#1##1 \@nil{\KV@@sp@c##1}% + } +\@tempa{ } +\def\KV@@sp@c#1\@nil#2\relax#3{\KV@toks@{#1}\edef#3{\the\KV@toks@}} +\def\define@key#1#2{% + \pgfutil@ifnextchar[{\KV@def{#1}{#2}}{\pgfutil@namedef{KV@#1@#2}####1}} +\def\KV@def#1#2[#3]{% + \pgfutil@namedef{KV@#1@#2@default\expandafter}\expandafter + {\csname KV@#1@#2\endcsname{#3}}% + \pgfutil@namedef{KV@#1@#2}##1} +\fi% + + +\newtoks\KV@toks@ +\newdimen\@tempdima +\newdimen\@tempdimb +\newcount\@tempcnta +\newcount\@tempcntb +\newbox\@tempboxa +\newskip\pgf@length@skip + + + + +\endinput |