summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/utilities')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex723
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfexternal.tex32
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex224
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex699
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex94
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex125
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def297
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def62
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def281
9 files changed, 699 insertions, 1838 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
deleted file mode 100644
index 1542ac71204..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
+++ /dev/null
@@ -1,723 +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.
-
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfcalendar.code.tex,v 1.9 2007/05/31 10:31:52 tantau Exp $
-
-
-% Translation stuff
-
-\ifx\translate\@undefined
- \def\translate#1{#1}
-\fi
-
-% Load month dictionary, if possible
-
-\ifx\usedictionary\@undefined
-\else
- \usedictionary{translator-months-dictionary}
-\fi
-
-
-
-
-% Typeset a calendar
-%
-% #1 = prefix for the calendar nodes
-% #2 = begin date in ISO format
-% #3 = end date in ISO format
-% #4 = date rendering code
-%
-% Description:
-%
-% First note that this macro need not be called inside a pgfpicture
-% (even though it often will be). You can use it to typeset
-% calendars also using packages other than pgf. You do not even need
-% to load pgf to use this file.
-%
-% A calendar is typeset as follows: You specify a range of dates (by
-% providing a begin and an end date). Then, for each date the code #4
-% is executed. When the code is called, lots of information about the
-% current date (like its day of week) is available. The job of
-% #4 is to render the date. Typically, this is done by placing nodes
-% somewhere, but the function could do other things as well.
-% It is also the job of #4 to position the calendar correctly.
-%
-% The different calls of #4 are not surrounded by TeX groups (though
-% you can do so yourself, of course). This means that settings can
-% accumulate between different calls, which is often desirable and
-% useful.
-%
-% Inside #4 code, different macros can be access:
-%
-% \pgfcalendarprefix
-% The parameter #1. This prefix is recomended for nodes inside the
-% calendar, but you have to use it yourself explicitly.
-%
-% \pgfcalendarbeginiso
-% Start date of range being typeset in ISO format (like 2006-01-10)
-%
-% \pgfcalendarbeginjulian
-% Julian day number of start date begin typeset
-%
-% \pgfcalendarendiso
-% End date of range begin typeset
-%
-% \pgfcalendarendjulian
-% Same as Julian day number
-%
-% \pgfcalendarcurrentjulian (a TeX-count)
-% Julian day number of day to be rendered/considered
-%
-% \pgfcalendarcurrentweekday
-% Weekday (0 = Monday) of day to be checked
-%
-% \pgfcalendarcurrentyear
-% Year of day to be checked
-%
-% \pgfcalendarcurrentmonth
-% Month of day to be chjeck
-%
-% \pgfcalendarcurrentday
-% Day of monath of day to be checked
-%
-%
-% Inside the \pgfcalendar macro the macro \ifdate is available, which
-% has the same effect as \pgfcalendarifdate{\pgfcalendarcurrentjulian}
-% (only faster). This means that you
-% can write, say, \ifdate{Monday}{current date is a Monday}{Not a Monday}.
-%
-% Example:
-%
-% \begin{tikzpicture}
-% \pgfcalendar{cal}{2007-01-20}{2007-02-10}
-% {\node[anchor=base] {\pgfcalendaronday}; \pgftransformyshift{-1.5em}}
-% \end{tikzpicture}
-%
-% \pgfcalendar{cal}{2007-01-20}{2007-02-10}{ \pgfcalendaronday\ }
-
-\long\def\pgfcalendar#1#2#3#4{%
- \begingroup%
- % Setup local \ifdate
- \let\ifdate=\pgfcalendar@local@ifdate%
- % Let's start with computing start and end dates...
- \def\pgfcalendarprefix{#1}%
- \pgfcalendardatetojulian{#2}{\pgfcalendarcurrentjulian}%
- \edef\pgfcalendarbeginjulian{\the\pgfcalendarcurrentjulian}%
- \edef\pgfcalendarbeginiso{#2}%
- \pgfcalendardatetojulian{#3}{\pgfutil@tempcnta}%
- \edef\pgfcalendarendjulian{\the\pgfutil@tempcnta}%
- \advance\pgfutil@tempcnta by1\relax%
- \edef\pgfcalendarendjulianplus{\the\pgfutil@tempcnta}%
- \edef\pgfcalendarendiso{#3}%
- %
- % Start main loop
- %
- \loop%
- \ifnum\pgfcalendarcurrentjulian<\pgfcalendarendjulianplus\relax%
- % Setup information about current date
- \pgfcalendarjuliantodate{\pgfcalendarcurrentjulian}%
- {\pgfcalendarcurrentyear}{\pgfcalendarcurrentmonth}{\pgfcalendarcurrentday}%
- \pgfcalendarjuliantoweekday{\pgfcalendarcurrentjulian}{\pgfutil@tempcntb}%
- \edef\pgfcalendarcurrentweekday{\the\pgfutil@tempcntb}%
- % Render:
- #4%
- % Advance day:
- \advance\pgfcalendarcurrentjulian by1\relax%
- \repeat%
- \endgroup%
-}
-
-\newcount\pgfcalendarcurrentjulian
-
-\def\pgfcalendar@local@ifdate{%
- \let\pgfcalendarifdatejulian=\pgfcalendarcurrentjulian%
- \let\pgfcalendarifdateyear=\pgfcalendarcurrentyear%
- \let\pgfcalendarifdatemonth=\pgfcalendarcurrentmonth%
- \let\pgfcalendarifdateday=\pgfcalendarcurrentday%
- \let\pgfcalendarifdateweekday=\pgfcalendarcurrentweekday%
- \pgfcalendar@launch@ifdate%
-}
-
-
-
-% Execute on specific kinds of dates
-%
-% #1 = ISO-format date
-% #2 = date specification
-% #3 = code
-%
-% Description:
-%
-% The given code #3 is execute on every day that matches the date
-% specification #2. This specification is a comma-separated list of
-% key-value pairs of the kind pgfcalendar, defined in the usual way
-% using \define@key. The code for a key-value should check whether the
-% given day matches its specification. If so, it should set
-% \pgfcalendarmatches to true.
-%
-% When the key-value code is executed, the following macros will have
-% been setup:
-%
-% \pgfcalendarifdatejulian
-% Julian day number of day to be checked
-%
-% \pgfcalendarifdateweekday
-% Weekday (0 = Monday) of day to be checked
-%
-% \pgfcalendarifdateyear
-% Year of day to be checked
-%
-% \pgfcalendarifdatemonth
-% Month of day to be chjeck
-%
-% \pgfcalendarifdateday
-% Day of month of day to be checked
-%
-% The setting of these macros will persist after the call, so a
-% sideeffect of callling this macro is to setup these macros.
-%
-% By setting \ifpgfcalendar@do@not@recompute to false, the computation
-% of the year, month etc. is suppressed.
-%
-% Examples:
-%
-% \pgfcalendarifdate{2007-01-10}{all}{}
-% % Simply setup the macros
-%
-% \pgfcalendarifdate{2007-01-10}{mondays}{Is a monday}
-%
-% \pgfcalendarifdate{\mydate}{date=05-01}{\mydate is a Worker's Day}
-
-\def\pgfcalendarifdate#1#2#3#4{%
- \pgfcalendardatetojulian{#1}{\pgfutil@tempcnta}%
- \pgfcalendarjuliantodate{\pgfutil@tempcnta}
- {\pgfcalendarifdateyear}{\pgfcalendarifdatemonth}{\pgfcalendarifdateday}%
- \edef\pgfcalendarifdatejulian{\the\pgfutil@tempcnta}%
- % Compute info about date
- \pgfcalendarjuliantoweekday{\pgfutil@tempcnta}{\pgfutil@tempcntb}%
- \edef\pgfcalendarifdateweekday{\the\pgfutil@tempcntb}%
- %
- \pgfcalendar@launch@ifdate{#2}{#3}{#4}%
-}
-
-
-\long\def\pgfcalendar@launch@ifdate#1#2#3{%
- % When this macro is called, the pgfcalendarifdatexxxx macros must
- % be setup correctly
- %
- % Set match to false
- \pgfcalendarmatchesfalse%
- \setkeys{pgfcalendar}{#1}% cleanup and change to \pgfutil@setkeys
- \ifpgfcalendarmatches%
- #2%
- \else%
- #3%
- \fi%
-}
-
-\newif\ifpgfcalendarmatches
-
-
-% Keys for matching
-
-\define@key{pgfcalendar}{all}[]{\pgfcalendarmatchestrue}
-
-\define@key{pgfcalendar}{Monday}[]{\ifnum\pgfcalendarifdateweekday=0\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Tuesday}[]{\ifnum\pgfcalendarifdateweekday=1\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Wednesday}[]{\ifnum\pgfcalendarifdateweekday=2\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Thursday}[]{\ifnum\pgfcalendarifdateweekday=3\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Friday}[]{\ifnum\pgfcalendarifdateweekday=4\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Saturday}[]{\ifnum\pgfcalendarifdateweekday=5\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{Sunday}[]{\ifnum\pgfcalendarifdateweekday=6\relax\pgfcalendarmatchestrue\fi}
-
-\define@key{pgfcalendar}{workday}[]{\ifnum\pgfcalendarifdateweekday<5\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{weekend}[]{\ifnum\pgfcalendarifdateweekday>4\relax\pgfcalendarmatchestrue\fi}
-
-\define@key{pgfcalendar}{equals}{%
- \pgfcalendar@special@datetojulian{#1}%
- \ifnum\pgfcalendarifdatejulian=\pgfutil@tempcnta\relax%
- \pgfcalendarmatchestrue%
- \fi%
-}
-
-\define@key{pgfcalendar}{day of month}{\ifnum#1=\pgfcalendarifdateday\relax\pgfcalendarmatchestrue\fi}
-\define@key{pgfcalendar}{end of month}[1]{%
- % Tricky and expensive ... do only if necessary
- \ifpgfcalendarmatches%
- \else% sigh
- {%
- \pgfutil@tempcnta=\pgfcalendarifdatejulian\relax%
- \advance\pgfutil@tempcnta by#1\relax%
- \pgfcalendarjuliantodate{\pgfutil@tempcnta}{\pgf@dummy}{\pgf@dummy}{\pgf@cal@temp}%
- \global\let\pgf@cal@temp=\pgf@cal@temp%
- }%
- \ifnum\pgf@cal@temp=1\relax\pgfcalendarmatchestrue\fi%
- \fi%
-}
-
-\define@key{pgfcalendar}{at least}{%
- \pgfcalendar@special@datetojulian{#1}%
- \ifnum\pgfcalendarifdatejulian<\pgfutil@tempcnta\relax%
- \else%
- \pgfcalendarmatchestrue%
- \fi%
-}
-\define@key{pgfcalendar}{at most}{%
- \pgfcalendar@special@datetojulian{#1}%
- \ifnum\pgfcalendarifdatejulian>\pgfutil@tempcnta\relax%
- \else%
- \pgfcalendarmatchestrue%
- \fi%
-}
-\define@key{pgfcalendar}{between}{%
- \pgfcalendar@between#1\relax%
- \pgfcalendar@special@datetojulian{\pgfcalendar@start}%
- \ifnum\pgfcalendarifdatejulian<\pgfutil@tempcnta\relax%
- \else%
- \pgfcalendar@special@datetojulian{\pgfcalendar@end}%
- \ifnum\pgfcalendarifdatejulian>\pgfutil@tempcnta\relax%
- \else%
- \pgfcalendarmatchestrue%
- \fi%
- \fi%
-}
-
-\def\pgfcalendar@between#1and#2\relax{%
- \def\pgfcalendar@start{#1}%
- \def\pgfcalendar@end{#2}%
-}
-
-
-\def\pgfcalendar@special@datetojulian#1{%
- \edef\pgf@temp{#1}%
- \expandafter\pgfcalendar@special@split@test\pgf@temp-\relax{#1}%
-}
-
-\def\pgfcalendar@special@split@test#1-#2-#3\relax#4{%
- \def\pgf@temp{#3}%
- \ifx\pgf@temp\pgfutil@empty%
- \def\pgf@temp{\pgfcalendarifdateyear-#1-#2}%
- \else%
- \def\pgf@temp{#4}%
- \fi%
- \pgfcalendardatetojulian{\pgf@temp}{\pgfutil@tempcnta}%
-}
-
-
-% Suggested name for nodes inside a calendar
-%
-% Description:
-%
-% It is suggested that (main) nodes (if present) in a calendar should
-% get this name.
-%
-% Example:
-%
-% \pgfcalendar{cal}{2007-01-20}{2007-02-10}{}
-% { \node[anchor=base] (\pgfcalendarsuggestedname) {\pgfcalendarifdateday};
-% \pgftransformyshift{-1.5em} }
-%
-% \draw (cal-2007-01-30) -- (cal-2007-02-08);
-
-\def\pgfcalendarsuggestedname{%
- \ifx\pgfcalendarprefix\pgfutil@empty\else\pgfcalendarprefix-%
- \pgfcalendarcurrentyear-\pgfcalendarcurrentmonth-\pgfcalendarcurrentday\fi%
-}
-
-
-
-%
-%
-% Date conversion functions
-%
-%
-
-
-
-% Convert a date to the Julian day number (number of days since
-% January 1st, -4712)
-%
-% #1 = date specification
-% #2 = counter that should be set to the number of days
-%
-% Description:
-%
-% The conversion is taken from the Wikipedia entry on Julian days.
-%
-% The date specification works as follows:
-%
-% - It starts with a year. Use \year for the current year (the year
-% the file is being typeset).
-% - Next comes a hyphen.
-% - Next comes a month (number). Use \month for the current month.
-% - Next comes a hyphen.
-% - Next comes either a day of month (number, use \day for current
-% day) or "last". The keyword "last" refers the last day of the
-% month. Thus, 2006-01-last is the same as 2006-01-31 and
-% 2000-02-last is the same as 2002-02-29.
-% - Next may come a plus sign, followed by a number (positive or
-% negative). This will adjust the date by the given number of
-% days. Thus, 2006-01-31+1 is the same as 2006-02-01 and
-% 2006-02-01+-2 is the same as 2006-01-30. And \year-\month-day+1 is
-% tomorrow. You may add a space before the +.
-%
-% Example:
-%
-% \pgfcalendardatetojulian{2006-01-10}{\mycount}
-
-\def\pgfcalendardatetojulian#1#2{\edef\pgf@temp{#1}\expandafter\pgfcalendar@datetojulian\pgf@temp+/{#2}}
-\def\pgfcalendar@datetojulian#1-#2-#3+#4/#5{%
- {%
- %
- % Store year, month and days.
- %
- \count1=#1\relax%
- \count2=#2\relax%
- % If #3=="last", then calculate first day of next month
- \edef\pgf@temp{#3}%
- \ifx\pgf@temp\pgfcalendar@last@text%
- \advance\count2 by1\relax%
- \count3=1\relax%
- \else%
- \count3=#3\relax%
- \fi%
- %
- % Store offset
- %
- \edef\pgf@@temp{#4}%
- \ifx\pgf@@temp\pgfutil@empty%
- \count8=0\relax%
- \else%
- \pgfcalendar@unpack#4%
- \fi%
- %
- %
- % 4) a = \lfloor (14-month) /12 \rfloor
- %
- \ifnum\count2<3\relax%
- \count4=1\relax%
- \else%
- \count4=0\relax%
- \fi%
- %
- % 5) y = year + 4800 - a
- %
- \count5=\count1\relax%
- \advance\count5 by 4800\relax%
- \advance\count5 by-\count4\relax%
- %
- % 6) m = month + 12a - 3
- %
- \count6=\count2\relax%
- \count0=\count4\relax%
- \multiply\count0 by12\relax
- \advance\count6 by\count0\relax%
- \advance\count6 by-3\relax%
- %
- % 7) jdn = day + \floor{(153 m+2)/5} + 365y + \floor{y/4} -
- % \floor{y/100} + \florr{y/400} - 32045
- %
- \count7=\count3\relax%
- % + \floor{(153 m+2)/5} :
- \count0=\count6\relax%
- \multiply\count0 by 153\relax%
- \advance\count0 by 2\relax%
- \divide\count0 by 5\relax%
- \advance\count7 by \count0\relax%
- % + 365y :
- \count0=\count5%
- \multiply\count0by365\relax%
- \advance\count7 by\count0\relax%
- % + \floor{y/4}
- \count0=\count5\relax%
- \divide\count0 by 4\relax%
- \advance\count7 by\count0%
- % - \floor{y/100}
- \count0=\count5\relax%
- \divide\count0 by 100\relax%
- \advance\count7 by-\count0\relax%
- % + \floor{y/400}
- \count0=\count5\relax%
- \divide\count0 by 400\relax%
- \advance\count7 by\count0%
- % - 32045
- \advance\count7 by-32045\relax%
- %
- % Undo "last" advance
- \ifx\pgf@temp\pgfcalendar@last@text%
- \advance\count7by-1\relax%
- \fi%
- % Add offset
- \advance\count7by\count8\relax%
- \xdef\pgf@temp{\the\count7}%
- }%
- #5=\pgf@temp\relax%
-}
-\def\pgfcalendar@last@text{last}
-\def\pgfcalendar@unpack#1+{%
- \count8=#1\relax%
-}
-
-% Convert Julian day number date.
-%
-% #1 = the number of Julian days
-% #2 = a macro in which the year should be stored.
-% #3 = a macro in which the month should be stored.
-% #4 = a macro in which the day should be stored.
-%
-% Formula used:
-%
-% 1) J = Julian day number
-% 2) j = J + 32044
-% 3) g = j div 146097
-% 4) dg = j mod 146097
-% 5) c = (dg div 36524 + 1) * 3 div 4
-% 6) dc = dg - c * 36524
-% 7) b = dc div 1461
-% 8) db = dc mod 1461
-% 9) a = (db div 365 + 1) * 3 div 4
-% 10)da = db - a * 365
-% 11)y = g * 400 + c * 100 + b * 4 + a
-% 12)m = (da * 5 + 308) div 153 - 2
-% 13)d = da - (m + 4) * 153 div 5 + 122
-% 14)Y = y - 4800 + (m + 2) div 12
-% 15)M = (m + 2) mod 12 + 1
-% 16)D = d + 1
-%
-% Example
-%
-% \pgfcalendarjuliantodate{\mynumber}{\myyear}{\mymonth}{\myday}
-
-\def\pgfcalendarjuliantodate#1#2#3#4{%
- {%
- % 1) J = Julian day number
- \count1=#1\relax%
- % 2) j = J + 32044
- \count2=\count1\relax%
- \advance\count2 by 32044\relax%
- % 3) g = j div 146097
- \count3=\count2\relax%
- \divide\count3 by 146097\relax%
- % 4) dg = j mod 146097
- \count4=\count3\relax%
- \multiply\count4 by-146097\relax%
- \advance\count4 by\count2\relax%
- % 5) c = (dg div 36524 + 1) * 3 div 4
- \count5=\count4\relax%
- \divide\count5 by36524\relax%
- \advance\count5 by1\relax%
- \multiply\count5 by3\relax%
- \divide\count5 by4\relax%
- % 6) dc = dg - c * 36524
- \count6=\count4\relax%
- \count0=\count5\relax%
- \multiply\count0 by-36524\relax%
- \advance\count6 by\count0\relax%
- % 7) b = dc div 1461
- \count7=\count6\relax%
- \divide\count7 by1461\relax%
- % 8) db = dc mod 1461
- \count8=\count7\relax%
- \multiply\count8 by-1461\relax%
- \advance\count8 by\count6\relax%
- % 9) a = (db div 365 + 1) * 3 div 4
- \count9=\count8\relax%
- \divide\count9 by 365\relax%
- \advance\count9 by 1\relax%
- \multiply\count9 by3\relax%
- \divide\count9 by4\relax%
- % 10)da = db - a * 365
- \count10=\count8\relax%
- \count0=\count9\relax%
- \multiply\count0 by-365\relax%
- \advance\count10 by\count0\relax%
- % 11)y = g * 400 + c * 100 + b * 4 + a
- \count11=\count3\relax%
- \multiply\count11 by400\relax%
- \count0=\count5\relax%
- \multiply\count0 by100\relax%
- \advance\count11 by\count0\relax%
- \count0=\count7\relax%
- \multiply\count0 by4\relax%
- \advance\count11 by\count0\relax%
- \advance\count11 by\count9\relax%
- % 12)m = (da * 5 + 308) div 153 - 2
- \count12=\count10\relax%
- \multiply\count12 by5\relax%
- \advance\count12 by 308\relax%
- \divide\count12 by 153\relax%
- \advance\count12 by -2\relax%
- % 13)d = - (m + 4) * 153 div 5 + 122 + da
- \count13=\count12\relax%
- \advance\count13 by 4\relax%
- \multiply\count13 by153\relax%
- \divide\count13 by5\relax%
- \count13=-\count13\relax%
- \advance\count13 by 122\relax%
- \advance\count13 by \count10\relax%
- % 14)Y = (m + 2) div 12 + y - 4800
- \count14=\count12\relax%
- \advance\count14 by 2\relax%
- \divide\count14 by12\relax%
- \advance\count14 by\count11\relax%
- \advance\count14 by-4800\relax%
- % 15)M = (m + 2) mod 12 + 1
- \count15=\count12\relax%
- \advance\count15 by2\relax%
- \count0=\count15\relax%
- \divide\count0 by12\relax%
- \multiply\count0 by12\relax%
- \advance\count15 by-\count0\relax%
- \advance\count15 by1\relax%
- % 16)D = d + 1
- \count16=\count13%
- \advance\count16by 1\relax%
- %
- \xdef\pgf@temp@year{\the\count14}%
- \xdef\pgf@temp@month{\ifnum\count15<10 0\fi\the\count15}%
- \xdef\pgf@temp@day{\ifnum\count16<10 0\fi\the\count16}%
- }%
- \let#2=\pgf@temp@year%
- \let#3=\pgf@temp@month%
- \let#4=\pgf@temp@day%
-}
-
-
-
-% Returns the day of week as a number between 0 = Monday and 6 =
-% Sunday
-%
-% #1 = a Julian day number
-% #2 = a counter into which the weekday should be put.
-%
-% Example:
-%
-% \pgfcalendardatetojulian{2006-01-10}{\mycount}
-% \pgfcalendarjuliantoweekday{\mycount}{\myweekday}
-
-\def\pgfcalendarjuliantoweekday#1#2{%
- {%
- \pgfutil@tempcnta=#1\relax%
- #2=\pgfutil@tempcnta%
- \divide#2by7\relax%
- \multiply#2by-7\relax%
- \advance#2by\pgfutil@tempcnta\relax%
- \xdef\pgf@temp{\the#2}%
- }%
- #2=\pgf@temp\relax%
-}
-
-
-
-% Converts a day of week into a weekday name (long or short)
-%
-% #1 = a number representing a weekday (0=Monday)
-%
-% Example:
-%
-% \pgfcalendardatetojulian{2006-01-10}{\mycount}
-% \pgfcalendarjuliantoweekday{\mycount}{\myweekday}
-% October 1st, 2006 was a \pgfcalendarweekdayname{\myweekday}
-
-\def\pgfcalendarweekdayname#1{%
- \translate{\ifcase#1Monday\or Tuesday\or Wednesday\or Thursday\or Friday\or Saturday\or Sunday\fi}%
-}
-
-\def\pgfcalendarweekdayshortname#1{%
- \translate{\ifcase#1Mon\or Tue\or Wed\or Thu\or Fri\or Sat\or Sun\fi}%
-}
-
-
-% Converts a month of year number into a month name (long or short)
-%
-% #1 = a number representing a month (1=January)
-%
-% Example:
-%
-% \pgfcalendarmonthname
-
-\def\pgfcalendarmonthname#1{%
- \translate{\ifcase#1\or January\or February\or March\or April\or
- May\or June\or July\or August\or September\or October\or
- November\or December\fi}%
-}
-
-\def\pgfcalendarmonthshortname#1{%
- \translate{\ifcase#1\or Jan\or Feb\or Mar\or Apr\or
- May\or Jun\or Jul\or Aug\or Sep\or Oct\or
- Nov\or Dec\fi}%
-}
-
-
-
-
-
-
-% Macro for easy typesetting of days, etc.
-%
-% #1 = kind selection
-% #2 = length and representation selection
-%
-% Description:
-%
-% Replaces the shorthand according to the following rules: The
-% first letter of the shorthand describes the kind of
-% shorthand. Possible kinds are:
-%
-% d = day of current date (in an invocation of \pgfcalendar)
-% m = month of current date
-% y = year of current date
-% w = week day of current date
-%
-% The second parameter determines how the kind is represented:
-%
-% - = shortest possible numerical way (allowed only for d, m, y)
-% = = same, but always of the same length (padded with blanks as
-% needed, allowed only for d, m, y)
-% 0 = numerical representation for d and m padded with leading zeros.
-% t = textual representation (allowed only for d, m, w)
-% . = abbreviated textual representation (allowed only for d, m, w)
-%
-% It is adivsed that you say, for example,
-% \let\%=\pgfcalendarshorthand.
-%
-% With this setting, you can typeset an ISO-date by saying \%y0-\%m0-\%d0.
-% For another example, on 2007-02-09, which is a
-% Friday, you can write "\%wt, \%mt \%d-, \%y0" to get "Friday, February 9, 2007"
-
-\def\pgfcalendarshorthand#1#2{\csname pgfcalendar@shorthand@#1#2\endcsname}
-\expandafter\def\csname pgfcalendar@shorthand@d-\endcsname{%
- {\pgfutil@tempcnta=\pgfcalendarcurrentday\relax\the\pgfutil@tempcnta}}
-\expandafter\def\csname pgfcalendar@shorthand@d=\endcsname{%
- {\pgfutil@tempcnta=\pgfcalendarcurrentday\relax\ifnum\pgfutil@tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil@tempcnta}}
-\expandafter\def\csname pgfcalendar@shorthand@d0\endcsname{%
- \pgfcalendarcurrentday}
-\expandafter\def\csname pgfcalendar@shorthand@m-\endcsname{%
- {\pgfutil@tempcnta=\pgfcalendarcurrentmonth\relax\the\pgfutil@tempcnta}}
-\expandafter\def\csname pgfcalendar@shorthand@m=\endcsname{%
- {\pgfutil@tempcnta=\pgfcalendarcurrentmonth\relax\ifnum\pgfutil@tempcnta<10\relax\setbox0=\hbox{1}\kern\wd0\relax\fi\the\pgfutil@tempcnta}}
-\expandafter\def\csname pgfcalendar@shorthand@m0\endcsname{%
- \pgfcalendarcurrentmonth}
-\expandafter\def\csname pgfcalendar@shorthand@y-\endcsname{%
- \pgfcalendarcurrentyear}
-\expandafter\def\csname pgfcalendar@shorthand@y=\endcsname{%
- \pgfcalendarcurrentyear}
-\expandafter\def\csname pgfcalendar@shorthand@y0\endcsname{%
- \pgfcalendarcurrentyear}
-\expandafter\def\csname pgfcalendar@shorthand@w.\endcsname{%
- \pgfcalendarweekdayshortname{\pgfcalendarcurrentweekday}}
-\expandafter\def\csname pgfcalendar@shorthand@wt\endcsname{%
- \pgfcalendarweekdayname{\pgfcalendarcurrentweekday}}
-\expandafter\def\csname pgfcalendar@shorthand@m.\endcsname{%
- \pgfcalendarmonthshortname{\pgfcalendarcurrentmonth}}
-\expandafter\def\csname pgfcalendar@shorthand@mt\endcsname{%
- \pgfcalendarmonthname{\pgfcalendarcurrentmonth}}
-
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfexternal.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfexternal.tex
deleted file mode 100644
index ff53e5e182f..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfexternal.tex
+++ /dev/null
@@ -1,32 +0,0 @@
-% Copyright 2007 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.
-%
-% In addition to the above licenses, this particular file may also be
-% directly inlined into other documents and this copyright notice may
-% be removed. Additionally, when you inline this file, you may modify
-% it as needed and you may remove comments.
-%
-% This file is intended to be distributed or even inlined into a file
-% when a document needs to be typeset on a system that does not have
-% pgf/TikZ installed.
-
-% "environment" for reading an external graphic. Note that there are
-% no (!) braces around the "name" of the environment
-%
-% #1 = name of the graphics file
-%
-% Example:
-%
-% \beginpgfgraphicnamed{mygraph}
-% \begin{tikzpicture}
-% ...
-% \end{tikzpicture}
-% \endpgfgraphicnamed
-
-\long\def\beginpgfgraphicnamed#1#2\endpgfgraphicnamed{\includegraphics{#1}}
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
deleted file mode 100644
index 6f2cc5f1996..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
+++ /dev/null
@@ -1,224 +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.
-
-\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=\pgfutil@empty
-\let\pgffor@endhook=\pgfutil@empty
-\let\pgffor@afterhook=\pgfutil@empty
-
-\def\pgffor@emptyvalues{, \pgffor@stop,}%
-
-\def\foreach#1in#2{%
- \def\pgffor@var{#1}%
- \def\pgffor@values{#2, \pgffor@stop,}%
- \ifx\pgffor@values\pgffor@emptyvalues
- \def\pgffor@values{\pgffor@stop,}%
- \fi%
- \let\pgffor@body\pgfutil@empty%
- \global\pgffor@continuetrue%
- \pgffor@collectbody}
-
-\def\pgffor@collectbody{%
- \pgfutil@ifnextchar\foreach{\pgffor@collectforeach}{%
- \pgfutil@ifnextchar\bgroup{\pgffor@collectargument}{\pgffor@collectsemicolon}}%
-}
-
-\def\pgffor@collectforeach\foreach#1in#2{%
- \expandafter\long\expandafter\def\expandafter\pgffor@body\expandafter{\pgffor@body\foreach#1in{#2}}%
- \pgffor@collectbody%
-}
-
-\long\def\pgffor@collectargument#1{%
- \expandafter\long\expandafter\def\expandafter\pgffor@body\expandafter{\pgffor@body{#1}}%
- \pgffor@iterate%
-}
-
-
-\def\pgffor@collectsemicolon{%
- \let\pgffor@next=\pgffor@collectnormalsemicolon%
- \ifnum\the\catcode`\;=\active\relax%
- \let\pgffor@next=\pgffor@collectactivesemicolon%
- \fi%
- \pgffor@next%
-}
-
-\def\pgffor@collectnormalsemicolon#1;{%
- \expandafter\long\expandafter\def\expandafter\pgffor@body\expandafter{\pgffor@body#1;}%
- \pgffor@iterate%
-}
-
-{
- \catcode`\;=\active
-
- \gdef\pgffor@collectactivesemicolon#1;{%
- \expandafter\long\expandafter\def\expandafter\pgffor@body\expandafter{\pgffor@body#1;}%
- \pgffor@iterate%
- }
-}
-
-\def\pgffor@iterate{%
- \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{\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}
-
-\def\pgffor@scanned{%
- \ifx\pgffor@value\pgffor@stop%
- \let\pgffor@next=\pgffor@after% done!
- \else%
- \ifx\pgffor@value\pgffor@dots%
- \let\pgffor@next=\pgffor@handledots%
- \else%
- \let\pgffor@next=\pgffor@handlevalue%
- \fi%
- \ifpgffor@continue%
- \else%
- \let\pgffor@next=\pgffor@scan% done!
- \fi%
- \fi%
- \pgffor@next}
-
-\def\pgffor@after{%
- \global\pgffor@continuetrue%
- \pgffor@afterhook}
-
-\def\pgffor@handlevalue{%
- \let\pgffor@prevlast\pgffor@last%
- \let\pgffor@last\pgffor@value%
- \pgffor@invokebody%
- \pgffor@scan%
-}
-
-\def\pgffor@invokebody{%
- \begingroup%
- \expandafter\in@\expandafter/\expandafter{\pgffor@var}%
- \ifin@%
- \expandafter\def\expandafter\pgffor@valuerest\expandafter{\pgffor@value//\relax}%
- \expandafter\pgffor@multiassign\pgffor@var/\pgffor@stop/\pgffor@stop/\relax%
- \else%
- \expandafter\expandafter\expandafter\def\expandafter\pgffor@var\expandafter{\pgffor@value}%
- \fi%
- \expandafter\pgffor@beginhook\pgffor@body\pgffor@endhook%
- \endgroup%
-}
-
-
-\def\pgffor@multiassign#1/#2/\relax{%
- \def\pgffor@currentvar{#1}%
- \def\pgffor@rest{#2}%
- \ifx\pgffor@currentvar\pgffor@stop%
- \let\pgffor@next=\relax%
- \else%
- \let\pgffor@next=\pgffor@multiassignrest%
- \fi%
- \pgffor@next%
-}
-
-\def\pgffor@multiassignrest{\expandafter\pgffor@multiassignfinal\pgffor@valuerest}
-\def\pgffor@multiassignfinal#1/#2/\relax{%
- \def\pgffor@test{#2}%
- \ifx\pgffor@test\pgfutil@empty%
- \def\pgffor@valuerest{#1//\relax}% repeat
- \else%
- \def\pgffor@valuerest{#2/\relax}%
- \fi%
- \expandafter\def\pgffor@currentvar{#1}%
- \expandafter\pgffor@multiassign\pgffor@rest/\relax%
-}
-
-
-
-
-\def\pgffor@handledots{%
- \ifx\pgffor@last\pgfutil@empty%
- \PackageError{pgffor}{``...'' not allowed without prior value}{}%
- \fi%
- \pgffor@dotsscanend%
-}
-\def\pgffor@dotsscanend#1,{%
- \def\pgffor@dotsend{#1}%
- % calculate skip%
- \ifx\pgffor@prevlast\pgfutil@empty%
- \ifdim\pgffor@dotsend pt>\pgffor@last pt%
- \pgffor@skip=1pt%
- \else%
- \pgffor@skip=-1pt%
- \fi%
- \else%
- \pgffor@skip=\pgffor@last pt%
- \pgffor@iter=\pgffor@prevlast pt%
- \advance\pgffor@skip by-\pgffor@iter%
- \fi%
- \pgffor@iter=\pgffor@last pt%
- % do loop
- \pgffor@loop%
-}
-
-\def\pgffor@loop{%
- \advance\pgffor@iter by\pgffor@skip%
- \let\pgffor@next=\pgffor@doloop%
- \ifdim\pgffor@skip<0pt%
- \ifdim\pgffor@iter<\pgffor@dotsend pt%
- \let\pgffor@next=\pgffor@endloop%
- \fi%
- \else%
- \ifdim\pgffor@iter>\pgffor@dotsend pt%
- \let\pgffor@next=\pgffor@endloop%
- \fi%
- \fi%
- \ifpgffor@continue%
- \else%
- \let\pgffor@next=\pgffor@endloop% done!
- \fi%
- \pgffor@next%
-}
-
-\def\pgffor@endloop{%
- \pgffor@scan%
-}
-
-{\catcode`\p=12\catcode`\t=12\gdef\Pgffor@geT#1pt{#1}}
-
-\def\pgffor@doloop{%
- \begingroup%
- \edef\pgffor@temp{\expandafter\Pgffor@geT\the\pgffor@iter}%
- \edef\pgffor@incheck{{.0/}{\pgffor@temp/}}%
- \expandafter\in@\pgffor@incheck%
- \ifin@%
- \expandafter\pgffor@strip\pgffor@temp%
- \fi%
- \expandafter\in@\expandafter/\expandafter{\pgffor@var}%
- \ifin@%
- \expandafter\def\expandafter\pgffor@valuerest\expandafter{\pgffor@temp//\relax}%
- \expandafter\pgffor@multiassign\pgffor@var/\pgffor@stop/\pgffor@stop/\relax%
- \else%
- \expandafter\expandafter\expandafter\def\expandafter\pgffor@var\expandafter{\pgffor@temp}%
- \fi%
- \expandafter\pgffor@beginhook\pgffor@body\pgffor@endhook%
- \endgroup%
- \pgffor@loop%
-}
-
-\def\pgffor@strip#1.0{\def\pgffor@temp{#1}}
-
-
-\def\breakforeach{\global\pgffor@continuefalse}
-
-\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
new file mode 100644
index 00000000000..dd660fd6ab7
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
@@ -0,0 +1,699 @@
+% Copyright 2007 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 is perfectly self-contained, except that the catcode of @ should be made a letter.
+
+
+% Guard against reading twice
+\ifx\pgfkeysloaded\undefined
+ \let\pgfkeysloaded=\relax
+\else
+ \expandafter\endinput
+\fi
+
+% The purpose of this file is to provide a general settings engine that
+% works with all TeX formats and has no save-stack impact
+
+
+% This is useful:
+
+\def\pgfkeys@ifcsname#1\endcsname#2\else#3\fi{\expandafter\ifx\csname#1\endcsname\relax#3\else#2\fi}%
+\ifx\eTeXrevision\undefined%
+\else%
+ \expandafter\let\expandafter\pgfkeys@ifcsname\csname ifcsname\endcsname%
+\fi
+
+\def\pgfkeys@empty{}
+
+% This also:
+
+\ifx\PackageError\undefined
+ \def\pgfkeys@error#1{\immediate\write-1{Package pgfkeys: Error! #1.}}%
+\else
+ \def\pgfkeys@error#1{\PackageError{pgfkeys}{#1}{}}%
+\fi
+
+% Set a key to a value
+%
+% #1 = key
+% #2 = tokens
+%
+% Description:
+%
+% This command sets the key to the given tokens. The tokens are stored as
+% is and can even contain things like #9.
+%
+% Keys are organized hierarchically using something similar to Unix
+% paths. Thus, a typically key might be called "/tikz/length" or
+% "/tikz/length dimension/.@cmd". Some keys starting with a dot are
+% special, so they should not be used as normal key names (they are
+% similar to Unix files starting with a dot -- you can use them, but
+% be careful).
+%
+% Keys are always local to the current TeX group.
+%
+% Example:
+%
+% \pgfkeyssetvalue{/tikz/length}{2cm-3cm}
+% \pgfkeyssetvalue{/algo/swap}{{#2}{#1}}
+
+\def\pgfkeyssetvalue#1#2{%
+ \pgfkeys@temptoks{#2}\expandafter\edef\csname pgfk@#1\endcsname{\the\pgfkeys@temptoks}%
+}
+
+
+
+% Add text to a key at the end
+%
+% #1 = key
+% #2 = a value to be added at the beginning
+% #3 = a value to be added at the end
+%
+% Description:
+%
+% This command adds #2 to the definition of the key. The key should
+% have been set previously using \pgfkeyssetvalue.
+%
+% Example:
+%
+% \pgfkeysaddvalue{/tikz/length}{}{-3cm}
+
+\def\pgfkeysaddvalue#1#2#3{%
+ {%
+ \toks0{#1}%
+ \pgfkeysifdefined{#1}
+ {\pgfkeys@temptoks\expandafter\expandafter\expandafter{\csname pgfk@#1\endcsname}}%
+ {\pgfkeys@temptoks{}}%
+ \toks1{#2}%
+ \xdef\pgfkeys@global@temp{\the\toks0 \the\pgfkeys@temptoks \the\toks1}% believe or don't: the spaces are important
+ }%
+ \pgfkeyslet{#1}\pgfkeys@global@temp%
+}
+
+
+
+% Makes a key equal a given code
+%
+% #1 = key
+% #2 = a code name
+%
+% Description:
+%
+% This command executes a \let command so that a key gets the same
+% value as the parameter #2.
+%
+% Keys are always local to the current TeX group.
+%
+% Example:
+%
+% \pgfkeyslet{/algo/swap}{\myswap}
+
+\def\pgfkeyslet#1#2{%
+ \expandafter\let\csname pgfk@#1\endcsname#2%
+}
+
+
+% Retrieve the code stored in a key into a code
+%
+% #1 = key
+% #2 = code
+%
+% Description:
+%
+% This command will set #2 to "point" to the value stored in the key.
+%
+% Example:
+%
+% \pgfkeysgetvalue{/tikz/swap}{\myswap}
+
+\def\pgfkeysgetvalue#1#2{\expandafter\let\expandafter#2\csname pgfk@#1\endcsname}
+
+
+
+% Retrieve the value stored in a key
+%
+% #1 = key
+%
+% Description:
+%
+% This command will expand to the value stored in the key. The key
+% should previously have been set using \pgfkeyasetkey or \pgfkeyslet.
+%
+% Example:
+%
+% The length is \pgfkeysvalue{/tikz/length}.
+
+\def\pgfkeysvalueof#1{\csname pgfk@#1\endcsname}
+
+
+
+% If for testing whether a key exists
+%
+% #1 = key
+% #2 = if-case
+% #3 = else-case
+%
+% Description:
+%
+% This if will be executed if the key exists. In eTeX mode this works
+% like a normal if, in normal TeX mode you need to provide an \else.
+%
+% Example:
+%
+% \pgfkeysifdefined{/tikz/length}{key exists}{does not exist}
+
+\def\pgfkeysifdefined#1#2#3{\pgfkeys@ifcsname pgfk@#1\endcsname#2\else#3\fi}
+
+
+
+
+% Execute settings
+%
+% #1 = list of settings
+%
+% Description:
+%
+% The list of settings should contain comma-separated settings. Each
+% setting has the following form:
+%
+% /path/key=value
+%
+% The parts "/path/" and "=value" are optional. When the path is not
+% specified, the value of the token register "\pgfkeypath" is used. If
+% "=value" is missing, the value of the setting "/path/key/.@def" is used
+% instead. If this key is set to "\pgfvaluerequired", the key
+% "/errors/value required/.@cmd" is executed. Theis error handler,
+% like all other error handlers, will get the current key as its first
+% parameter (unexpanded) and the current value as its second value
+% (also unexpanded).
+%
+% Any spaces at the beginning and at the end and around the
+% equals-sign are removed. The key with the complete path is set to
+% the code \pgfcurrentkey.
+%
+% The setting is then processed according to the following rules:
+%
+% 1) If the key /path/key/.@cmd" is present, its code is executed
+% with the value computed above, followed by \pgfeov (end of
+% value). So, to handle
+%
+% "/stuff/height= 1.5 ,"
+%
+% /stuff/height/.@cmd should be set to some code, that can
+% handle the parameter
+%
+% "1.5\pgfeov"
+%
+% For instance, saying
+%
+% \pgfkeys{/stuff/height/.@cmd}{#1\pgfeov}{\def\myheight{#1}}
+%
+% will do nicely.
+%
+% 2) Otherwise, if the key /path/key is present, this key is
+% set to the value computed above.
+%
+% 3) Otherwise, if the key /handlers/key/.@cmd is present, it is executed
+% with the same parameters as in 1). Additionally, the
+% token register \pgfcurrentkeypath will be set to "/path/" and the
+% macor \pgfcurrentkeywithoutpath to "key". So, in the above
+% example if neither "/stuff/height/.@cmd" nor
+% "/stuff/height" is present, but "/handlers/height" is,
+% then "/handlers/height" is executed with the parameters:
+%
+% "1.5\pgfeov"
+%
+% and \pgfcurrentkey is set to "/stuff/height" and \pgfcurrentkeypath
+% is set to "/stuff/" and \pgfcurrentkeywithoutpath to "height".
+%
+% 4) Otherwise, if the key "/path/.unknown/.@cmd" is present, its code is
+% executed with the same parameters as in 3).
+%
+% 5) Otherwise, the key "/handlers/.unknown/.@cmd" is executed with the same
+% parameters as in 1).
+%
+% After all settings have been processed, the value of the token
+% register \pgfdefaultkeypath is set to its original value. Thus, any local
+% change of this token register has no effect outside the call.
+%
+% Example:
+%
+% \pgfkeys{/tikz/.is family}
+% \pgfkeys{/tikz/line width/.cd,
+% .def=\pgfsetlinewidth{##1},
+% .set default=.4pt}
+% \pgfkeys{tikz,line width=1pt}
+
+\newtoks\pgfkeys@pathtoks
+\def\pgfkeyscurrentpath{\the\pgfkeys@pathtoks}
+\newtoks\pgfkeys@temptoks
+
+\def\pgfkeys@root{/}
+\let\pgfkeysdefaultpath\pgfkeys@root
+
+\def\pgfkeys{\expandafter\pgfkeys@@set\expandafter{\pgfkeysdefaultpath}}%
+\def\pgfkeys@@set#1#2{%
+ \let\pgfkeysdefaultpath\pgfkeys@root%
+ \pgfkeys@parse#2,\pgfkeys@mainstop%
+ \def\pgfkeysdefaultpath{#1}}
+
+\def\pgfkeys@parse{\futurelet\pgfkeys@possiblerelax\pgfkeys@parse@main}
+\def\pgfkeys@parse@main{%
+ \ifx\pgfkeys@possiblerelax\pgfkeys@mainstop%
+ \expandafter\pgfkeys@cleanup%
+ \else%
+ \expandafter\pgfkeys@normal%
+ \fi%
+}
+\def\pgfkeys@normal#1,{%
+ \pgfkeys@unpack#1=\pgfkeysnovalue=\pgfkeys@stop%
+ \pgfkeys@parse%
+}
+\def\pgfkeys@cleanup\pgfkeys@mainstop{}
+
+\def\pgfkeys@mainstop{\pgfkeys@mainstop} % equals only itself
+\def\pgfkeys@novalue{} % equals only itself
+\def\pgfkeysnovalue{\pgfkeys@novalue} % equals only itself
+\def\pgfkeysnovalue@text{\pgfkeysnovalue}
+\def\pgfkeysvaluerequired{\pgfkeysvaluerequired} % equals only itself
+
+\def\pgfkeys@unpack#1=#2=#3\pgfkeys@stop{%
+ \pgfkeys@spdef\pgfkeyscurrentkey{#1}%
+ \edef\pgfkeyscurrentkey{\pgfkeyscurrentkey}%
+ \ifx\pgfkeyscurrentkey\pgfkeys@empty%
+ % Skip
+ \else%
+ \pgfkeys@add@path@as@needed%
+ \pgfkeys@spdef\pgfkeyscurrentvalue{#2}%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% Hmm... no value
+ \pgfkeysifdefined{\pgfkeyscurrentkey/.@def}%
+ {\pgfkeysgetvalue{\pgfkeyscurrentkey/.@def}{\pgfkeyscurrentvalue}}
+ {}% no default, so leave it
+ \fi%
+ \ifx\pgfkeyscurrentvalue\pgfkeysvaluerequired%
+ \pgfkeysvalueof{/errors/value required/.@cmd}\pgfkeyscurrentkey\pgfkeyscurrentvalue\pgfeov%
+ \else%
+ \pgfkeys@case@one%
+ \fi%
+ \fi}
+
+\def\pgfkeys@case@one{%
+ \pgfkeysifdefined{\pgfkeyscurrentkey/.@cmd}%
+ {\pgfkeysgetvalue{\pgfkeyscurrentkey/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}
+ {\pgfkeys@case@two}%
+}
+
+\def\pgfkeys@case@two{%
+ \pgfkeysifdefined{\pgfkeyscurrentkey}%
+ {\pgfkeys@case@two@extern}%
+ {\pgfkeys@case@three}%
+}
+
+\def\pgfkeys@case@two@extern{%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text%
+ \pgfkeysvalueof{\pgfkeyscurrentkey}%
+ \else%
+ \pgfkeyslet{\pgfkeyscurrentkey}\pgfkeyscurrentvalue%
+ \fi%
+}
+
+
+\def\pgfkeys@case@three{%
+ \pgfkeys@split@path%
+ \pgfkeysifdefined{/handlers/\pgfkeyscurrentname/.@cmd}%
+ {\pgfkeysgetvalue{/handlers/\pgfkeyscurrentname/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}
+ {\pgfkeys@unknown}%
+}
+
+\def\pgfkeys@unknown{%
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.unknown/.@cmd}%
+ {%
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.unknown/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}
+ {%
+ \pgfkeysgetvalue{/handlers/.unknown/.@cmd}{\pgfkeys@code}%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov%
+ }%
+}
+
+
+\def\pgfkey@argumentisspace#1{%
+ \def\pgfkeys@spdef##1##2{%
+ \futurelet\pgfkeys@possiblespace\pgfkeys@sp@a##2\pgfkeys@stop\pgfkeys@stop#1\pgfkeys@stop\relax##1}%
+ \def\pgfkeys@sp@a{%
+ \ifx\pgfkeys@possiblespace\pgfkeys@sptoken%
+ \expandafter\pgfkeys@sp@b%
+ \else%
+ \expandafter\pgfkeys@sp@b\expandafter#1%
+ \fi}%
+ \def\pgfkeys@sp@b#1##1 \pgfkeys@stop{\pgfkeys@sp@c##1}%
+}
+\pgfkey@argumentisspace{ }
+\def\pgfkeys@sp@c#1\pgfkeys@stop#2\relax#3{\pgfkeys@temptoks{#1}\edef#3{\the\pgfkeys@temptoks}}
+{\def\:{\global\let\pgfkeys@sptoken= } \: }
+
+
+
+\def\pgfkeys@add@path@as@needed{% Should add the path if the
+ % \pgfkeyscurrentkey does not start with /
+ \expandafter\futurelet\expandafter\pgfkeys@possibleslash\expandafter\pgfkeys@check@slash\pgfkeyscurrentkey\relax%
+}
+\def\pgfkeys@check@slash{%
+ \ifx\pgfkeys@possibleslash/%
+ \expandafter\pgfkeys@nevermind%
+ \else%
+ \expandafter\pgfkeys@addpath%
+ \fi%
+}
+
+\def\pgfkeys@nevermind#1\relax{}
+\def\pgfkeys@addpath#1\relax{\edef\pgfkeyscurrentkey{\pgfkeysdefaultpath#1}}
+
+\def\pgfkeys@split@path{% Should assign the two codes
+ % \pgfkeyscurrentname and \pgfcurrentlkeypath
+ \pgfkeys@pathtoks{}%
+ \expandafter\pgfkeys@splitter\pgfkeyscurrentkey//%
+}
+\def\pgfkeys@splitter#1/#2/{%
+ \def\pgfkeys@temp{#2}%
+ \ifx\pgfkeys@temp\pgfkeys@empty%
+ % Ah. done
+ \def\pgfkeyscurrentname{#1}%
+ \expandafter\pgfkeys@gobbletoslash%
+ \else%
+ \expandafter\pgfkeys@pathtoks\expandafter{\the\pgfkeys@pathtoks#1/}%
+ \fi%
+ \pgfkeys@splitter#2/%
+}
+\def\pgfkeys@gobbletoslash\pgfkeys@splitter/{\expandafter\pgfkeys@remove@slash\the\pgfkeys@pathtoks\relax}%
+\def\pgfkeys@remove@slash#1/\relax{\pgfkeys@pathtoks{#1}}
+
+
+
+% Quickly set keys
+%
+% #1 = default path
+% #2 = key-value pairs
+%
+% Desscription:
+%
+% This command starts the execution with the default path set to
+% #1. This command should only be used when speed is important (like
+% in a heavily used macro like \tikzset). Normally, keys should be
+% used to set the path. Note that if #1 equals /, then \pgfkeys will
+% actually be quicker!
+%
+% Example:
+%
+% \pgfqkeys{/tikz}{myother length/.code=\def\myotherlength{#1}\pgfkeysalso{length=#1}}
+
+\def\pgfqkeys{\expandafter\pgfkeys@@qset\expandafter{\pgfkeysdefaultpath}}%
+\def\pgfkeys@@qset#1#2#3{\def\pgfkeysdefaultpath{#2/}\pgfkeys@parse#3,\pgfkeys@mainstop\def\pgfkeysdefaultpath{#1}}
+
+
+% Sets keys while setting keys
+%
+% #1 = key-value pairs
+%
+% Desscription:
+%
+% This code may only be called inside the code that is executed for a
+% key. The #1 should be a list of settings pairs. They will be executed
+% as if they had been given as the argument to the \pgfkeys command.
+%
+% Example:
+%
+% \pgfkeys{tikz,myother length/.code=\def\myotherlength{#1}\pgfkeysalso{length=#1}}
+
+\def\pgfkeysalso#1{\pgfkeys@parse#1,\pgfkeys@mainstop}
+
+
+
+% Quickly sets keys while setting keys
+%
+% #1 = default path
+% #2 = key-value pairs
+%
+% Desscription:
+%
+% This command executes #2 with the default path set to #1. This
+% command will cause chaos if used incorrectly. The only safe
+% place to use it instead of \pgfkeys is at the beginning of a TeX group.
+%
+% Example:
+%
+% \begingroup
+% \pgfqkeysalso{/tikz}{myother length/.code=\def\myotherlength{#1}\pgfkeysalso{length=#1}}
+
+\def\pgfqkeysalso#1#2{\def\pgfkeysdefaultpath{#1/}\pgfkeys@parse#2,\pgfkeys@mainstop}
+
+
+
+
+% Now setup the default handelers and keys:
+
+% Define a key macro with one argument (\def or \edef)
+%
+% #1 = key
+% #2 = code
+%
+% Description:
+%
+% This command will setup things so the key/.@cmd contains a macro
+% that takes one parameter and has #2 as its code.
+%
+% Example:
+%
+% \pgfkeysdef{/my key}{\show#1}
+
+\def\pgfkeysdef#1#2{%
+ \def\pgfkeys@temp##1\pgfeov{#2}%
+ \pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
+}
+\def\pgfkeysedef#1#2{%
+ \edef\pgfkeys@temp##1\pgfeov{#2}%
+ \pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
+}
+
+
+% Define a key macro with mutliple arguments (\def or \edef)
+%
+% #1 = key
+% #2 = argument pattern
+% #2 = code
+%
+% Description:
+%
+% This command will setup things so the key/.@cmd contains a macro
+% that takes #2 as its parameter pattern and has #3 as its code.
+%
+% Example:
+%
+% \pgfkeysdefargs{/swap}{#1#2}{#2#1}
+
+\def\pgfkeysdefargs#1#2#3{%
+ \def\pgfkeys@temp#2\pgfeov{#3}%
+ \pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
+ \pgfkeyssetvalue{#1/.@args}{#2\pgfeov}%
+ \pgfkeyssetvalue{#1/.@body}{#3}%
+}
+\def\pgfkeysedefargs#1#2#3{%
+ \edef\pgfkeys@temp#2\pgfeov{#3}%
+ \pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
+ \pgfkeyssetvalue{#1/.@args}{#2\pgfeov}%
+ \pgfkeyssetvalue{#1/.@body}{#3}%
+}
+
+
+
+% Defining a key command
+
+\pgfkeysdef{/handlers/.code}{\pgfkeysdef{\pgfkeyscurrentpath}{#1}}
+\pgfkeysdef{/handlers/.code 2 args}{\pgfkeysdefargs{\pgfkeyscurrentpath}{##1##2}{#1}}
+\pgfkeysdef{/handlers/.ecode}{\pgfkeysedef{\pgfkeyscurrentpath}{#1}}
+\pgfkeysdef{/handlers/.ecode 2 args}{\pgfkeysedefargs{\pgfkeyscurrentpath}{##1##2}{#1}}
+\pgfkeysdefargs{/handlers/.code args}{#1#2}{\pgfkeysdefargs{\pgfkeyscurrentpath}{#1}{#2}}
+\pgfkeysdefargs{/handlers/.ecode args}{#1#2}{\pgfkeysedefargs{\pgfkeyscurrentpath}{#1}{#2}}
+
+% Adding to a key command
+
+\pgfkeys{/handlers/.add code/.code 2 args=%
+ % Find out, whether with args or not.
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@args}%
+ {% Yes, so add to body and reuse args
+ \pgfkeysaddvalue{\pgfkeyscurrentpath/.@body}{#1}{#2}%
+ % Redefine code
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.@args}{\pgfkeys@tempargs}
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.@body}{\pgfkeys@tempbody}
+ \expandafter\expandafter\expandafter\def\expandafter\pgfkeys@temp\expandafter\pgfkeys@tempargs\expandafter{\pgfkeys@tempbody}%
+ \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@temp}%
+ }%
+ {%
+ % No, so single argument. Redefine accordingly.
+ {%
+ \toks0{#1}%
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}%
+ {\pgfkeys@temptoks\expandafter\expandafter\expandafter{\csname pgfk@\pgfkeyscurrentpath/.@cmd\endcsname##1\pgfeov}}%
+ {\pgfkeys@temptoks{}}%
+ \toks1{#2}%
+ \xdef\pgfkeys@global@temp{\the\toks0 \the\pgfkeys@temptoks \the\toks1}%
+ }%
+ \expandafter\def\expandafter\pgfkeys@temp\expandafter##\expandafter1\expandafter\pgfeov\expandafter{\pgfkeys@global@temp}%
+ \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}\pgfkeys@temp%
+ }%
+}
+\pgfkeys{/handlers/.prefix code/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={#1}{}}}%
+\pgfkeys{/handlers/.append code/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={}{#1}}}%
+
+
+% Defining a style
+
+\pgfkeys{/handlers/.style/.code=\pgfkeys{\pgfkeyscurrentpath/.code=\pgfkeysalso{#1}}}
+\pgfkeys{/handlers/.estyle/.code=\pgfkeys{\pgfkeyscurrentpath/.ecode=\noexpand\pgfkeysalso{#1}}}
+\pgfkeys{/handlers/.style args/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.code args={#1}{\pgfkeysalso{#2}}}}
+\pgfkeys{/handlers/.estyle args/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.ecode args={#1}{\noexpand\pgfkeysalso{#2}}}}
+\pgfkeys{/handlers/.style 2 args/.code=\pgfkeys{\pgfkeyscurrentpath/.code 2 args=\pgfkeysalso{#1}}}
+
+% Adding to a style
+
+\pgfkeys{/handlers/.add style/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.add code={\pgfkeysalso{#1}}{\pgfkeysalso{#2}}}}%
+\pgfkeys{/handlers/.prefix style/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={\pgfkeysalso{#1}}{}}}%
+\pgfkeys{/handlers/.append style/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={}{\pgfkeysalso{#1}}}}%
+
+
+% Defining a value
+
+\pgfkeys{/handlers/.initial/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath}{#1}}
+\pgfkeys{/handlers/.add/.code 2 args=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{#2}}
+\pgfkeys{/handlers/.get/.code=\pgfkeysgetvalue{\pgfkeyscurrentpath}{#1}}
+
+% Defining a default
+
+\pgfkeys{/handlers/.default/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath/.@def}{#1}}
+\pgfkeys{/handlers/.value required/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath/.@def}{\pgfkeysvaluerequired}}
+\pgfkeys{/handlers/.value forbidden/.code=\pgfkeys{\pgfkeyscurrentpath/.add code=%
+{%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text%
+ \else%
+ \pgfkeysvalueof{/errors/value forbidden/.@cmd}\pgfkeyscurrentkey\pgfkeyscurrentvalue\pgfeov%
+ \fi%
+}{}}}
+
+
+% High-level cmds
+
+\pgfkeys{/handlers/.store in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\def#1{##1}}}
+\pgfkeys{/handlers/.estore in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\edef#1{##1}}}
+
+\pgfkeys{/handlers/.is if/.code=\pgfkeysalso{%
+ \pgfkeyscurrentpath/.code=\pgfkeys@handle@boolean{#1}{##1},
+ \pgfkeyscurrentpath/.default=true%
+ }%
+}
+\def\pgfkeys@handle@boolean#1#2{%
+ \pgfkeys@ifcsname#1#2\endcsname%
+ \csname#1#2\endcsname%
+ \else%
+ \pgfkeysvalueof{/errors/boolean expected/.@cmd}\pgfkeyscurrentkey{#2}\pgfeov%
+ \fi
+}
+
+\pgfkeys{/handlers/.is choice/.code=%
+ \pgfkeys{%
+ \pgfkeyscurrentpath/.cd,%
+ .code=\expandafter\pgfkeysalso\expandafter{\pgfkeyscurrentkey/##1},
+ .unknown/.style={/errors/unknown choice value=\pgfkeyscurrentkey\pgfkeyscurrentvalue}}}
+
+
+% Inspection handlers
+
+\pgfkeys{/handlers/.show value/.code=\pgfkeysgetvalue{\pgfkeyscurrentpath}{\pgfkeysshower}\show\pgfkeysshower} % inspect the value
+\pgfkeys{/handlers/.show code/.code=\pgfkeysgetvalue{\pgfkeyscurrentpath/.@cmd}{\pgfkeysshower}\show\pgfkeysshower} % inspect the body of the command
+
+
+% Path handling
+
+\pgfkeys{/handlers/.is family/.code=\pgfkeys{\pgfkeyscurrentpath/.ecode=\edef\noexpand\pgfkeysdefaultpath{\pgfkeyscurrentpath/}}}
+\pgfkeys{/handlers/.cd/.code=\edef\pgfkeysdefaultpath{\pgfkeyscurrentpath/}}
+
+
+% Value expansion
+
+\pgfkeys{/handlers/.expand once/.code=\expandafter\pgfkeys@exp@call\expandafter{#1}}
+\pgfkeys{/handlers/.expand twice/.code=\expandafter\expandafter\expandafter\pgfkeys@exp@call\expandafter\expandafter\expandafter{#1}}
+\pgfkeys{/handlers/.expanded/.code=\edef\pgfkeys@temp{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfkeys@temp}}
+
+\def\pgfkeys@exp@call#1{\pgfkeysalso{\pgfkeyscurrentpath=#1}}
+
+% Try to set a key and do nothing if not define
+
+\newif\ifpgfkeyssuccess
+\pgfkeys{/handlers/.try/.code=\pgfkeys@try}
+\pgfkeys{/handlers/.retry/.code=\ifpgfkeyssuccess\else\pgfkeys@try\fi}
+\def\pgfkeys@try{%
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}%
+ {%
+ \pgfkeysgetvalue{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@code}%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% Hmm... no value
+ \pgfkeysifdefined{\pgfkeyscurrentpath/.@def}%
+ {\pgfkeysgetvalue{\pgfkeyscurrentpath/.@def}{\pgfkeyscurrentvalue}}
+ {}% no default, so leave it
+ \fi%
+ \expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov%
+ \pgfkeyssuccesstrue%
+ }%
+ {%
+ \pgfkeysifdefined{\pgfkeyscurrentpath}%
+ {%
+ \ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text%
+ \pgfkeysvalueof{\pgfkeyscurrentpath}%
+ \else%
+ \pgfkeyslet{\pgfkeyscurrentpath}\pgfkeyscurrentvalue%
+ \fi%
+ \pgfkeyssuccesstrue%
+ }%
+ {\pgfkeyssuccessfalse}%
+ }%
+}
+
+% Utilities
+
+\pgfkeys{/utils/exec/.code=#1} % simply execute the given code directly.
+
+
+% Errors
+
+\pgfkeys{/errors/boolean expected/.code 2 args=\pgfkeys@error{%
+ Boolean parameter of key '#1' must be 'true' or 'false', not
+ '#2'. I am going to ignore it}}
+\pgfkeys{/errors/value required/.code 2 args=\pgfkeys@error{%
+ The key '#1' requires a value. I am going to ignore this key}{}}
+\pgfkeys{/errors/value forbidden/.code 2 args=\pgfkeys@error{%
+ You may not specify a value for the key '#1'. I am going to ignore
+ the value '#2' that you provided}}
+\pgfkeys{/errors/unknown choice value/.code 2 args=\pgfkeys@error{%
+ Choice '\pgfkeyscurrentname' unknown in key
+ '\pgfkeyscurrentpath'. I am going to ignore this key}}
+\pgfkeys{/errors/unknown key/.code 2 args=\pgfkeys@error{%
+ I do not know the key '#1' and I am going to ignore it. Perhaps
+ you misspelled it}}
+
+\pgfkeys{/handlers/.unknown/.code=%
+ {%
+ \let\pgfkeys@orig@key=\pgfkeyscurrentkey%
+ \pgfkeysalso{/errors/unknown key=\pgfkeys@orig@key{}}%
+ }
+}
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
deleted file mode 100644
index 25aae47b840..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
+++ /dev/null
@@ -1,94 +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.
-
-
-
-% The purpose of this file is to define the command
-% \ProvidesPackageRCS, which should be followed by an RCS id
-% string. This command will also be available in plain TeX, where it
-% prints out a message to the log.
-
-
-\def\pgfversion{1.18}
-
-
-\ifx\pgfrcsloaded\undefined
-\def\pgfrcsloaded{}
-
-\edef\pgfrcsatcode{\the\catcode`\@}
-\catcode`\@=11
-
-% Get date and version from RCS Ids
-\def\pgf@parseid $#1: #2.#3,v #4 #5/#6/#7 #8${%
- \pgf@parsercsfile$#2/$
- \def\pgf@rcssuffix{#3}
- \def\pgf@rcsrevision{#4}
- \def\pgf@rcsdate{#5/#6/#7}
-}
-\def\pgf@parsercsfile$#1/#2${
- \def\pgf@temp{#2}
- \ifx\pgf@temp\pgfutil@empty
- \def\pgf@rcsfile{#1}
- \else
- \pgf@parsercsfile$#2$
- \fi}
-
-\def\ProvidesFileRCS{%
- \def\pgfrcs@marshal{\ProvidesFile{\pgf@rcsfile.\pgf@rcssuffix}}%
- \pgfrcs@parserest%
-}
-
-\def\ProvidesPackageRCS{%
- \def\pgfrcs@marshal{\ProvidesPackage{\pgf@rcsfile}}%
- \pgfrcs@parserest%
-}
-
-\def\pgfrcs@parserest{%
- \def\pgf@rcsadditional{}%
- \afterassignment\pgfrcs@checkforoptional\let\next=}
-
-\def\pgfrcs@checkforoptional{%
- \ifx\next[%
- \let\next=\pgfrcs@getoptional%
- \else
- \let\next=\pgfrcs@package%
- \fi%
- \next}%}
-
-\def\pgfrcs@getoptional#1] ${%
- \def\pgf@rcsadditional{#1}%
- \pgfrcs@package%
-}
-
-\def\pgfrcs@package#1${
- \pgf@parseid $#1$
- \pgfrcs@marshal[\pgf@rcsdate\space\pgf@rcsadditional\space(rcs-revision \pgf@rcsrevision)]
-}
-
-\def\ProvidesClassRCS $#1$ [#2]{%
- \pgf@parseid $#1$
- \ProvidesClass{\pgf@rcsfile}[\pgf@rcsdate\space#2\space (rcs-revision \pgf@rcsrevision)]
-}
-
-\ifx\ProvidesPackage\@undefined
- % plain tex
- \def\ProvidesPackage#1[#2]{\wlog{Loading package #1 version #2.}}
-\fi
-
-\ifx\ProvidesFile\@undefined
- % plain tex
- \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.16 2007/06/08 11:24:59 tantau Exp $
-
-\catcode`\@=\pgfrcsatcode
-
-\fi
-
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
deleted file mode 100644
index 0ead47d4fea..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
+++ /dev/null
@@ -1,125 +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.
-
-
-%
-% 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@firstofone#1{#1}
-\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\gdef\: {\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}}%
-
-
-% aux-read-hook
-
-\let\pgfutil@aux@read@hook=\relax
-
-
-\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
deleted file mode 100644
index 4cd975d6600..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def
+++ /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.
-
-
-
-
-% The aux files, needed for reading back coordinates
-\def\pgfutil@aux@read@hook{
- \pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
- \csname newwrite\endcsname\pgfutil@auxout
- \csname openout\endcsname\pgfutil@auxout\jobname.pgf
-}
-
-% 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}
-
-\let\pgfutil@font@normalfont=\rm
-
-\let\pgfutil@selectfont=\rm
-
-
-% Extra counters, registers, boxes
-
-\newcount\pgfutil@tempcnta
-\newcount\pgfutil@tempcntb
-
-\newbox\pgfutil@tempboxa
-
-\newdimen\pgfutil@tempdima
-\newdimen\pgfutil@tempdimb
-
-
-% Module stuff
-
-\def\pgfutil@usemodule#1{\usemodule[#1]}
-
-
-
-% 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}%
-
-\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@
-
-\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
deleted file mode 100644
index 5941eeb2b80..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
+++ /dev/null
@@ -1,62 +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
-
-\let\pgfutil@auxout=\@auxout
-\let\pgfutil@tempcnta=\@tempcnta
-\let\pgfutil@tempcntb=\@tempcntb
-
-\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}
-
-\let\pgfutil@minipage=\minipage
-\let\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}
-
-\def\pgfutil@font@normalfont{\normalfont}
-
-\def\pgfutil@usemodule#1{\usepackage{#1}}
-
-\let\pgfutil@selectfont=\selectfont
-
-\let\pgfutil@tempboxa=\@tempboxa
-
-\let\pgfutil@tempdima=\@tempdima
-\let\pgfutil@tempdimb=\@tempdimb
-
-\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
deleted file mode 100644
index e69159cabb0..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def
+++ /dev/null
@@ -1,281 +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.
-
-
-
-
-
-% The aux files, needed for reading back coordinates
-\def\pgfutil@aux@read@hook{
- \pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
- \csname newwrite\endcsname\pgfutil@auxout
- \csname openout\endcsname\pgfutil@auxout\jobname.pgf
-}
-
-
-% 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}
-
-\let\pgfutil@font@normalfont=\rm
-
-\let\pgfutil@selectfont=\rm
-
-
-% Extra counters, registers, boxes
-
-\newcount\pgfutil@tempcnta
-\newcount\pgfutil@tempcntb
-
-\newbox\pgfutil@tempboxa
-
-\newdimen\pgfutil@tempdima
-\newdimen\pgfutil@tempdimb
-
-
-% Module stuff
-
-\def\pgfutil@usemodule#1{\input #1.tex}
-
-
-
-% 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}%
-
-\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@
-
-
-
-\endinput