summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/frontendlayer
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/frontendlayer')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex30
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex3
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex157
4 files changed, 49 insertions, 147 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
index 73a47f6574c..98cdffe154c 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
@@ -358,7 +358,7 @@ execute before day scope={\ifdate{day of month=1}{%
\def\tikz@lib@cal@calendar{%
\begingroup%
\let\tikz@lib@cal@ifs=\pgfutil@empty%
- \tikz@expandcount=1000\relax%
+ \tikz@resetexpandcount
\tikzset{name=,at={(0,0)}}%
\let\%=\pgfcalendarshorthand%
\tikzset{every calendar/.try}%
@@ -370,27 +370,13 @@ execute before day scope={\ifdate{day of month=1}{%
}
\def\tikz@lib@cal@handle{%
- \let\pgfutil@next=\tikz@lib@cal@expand%
- \ifx\pgf@let@token;%
- \let\pgfutil@next=\tikz@lib@cal@stop%
- \else%
- \ifx\pgf@let@token(%)
- \let\pgfutil@next=\tikz@lib@cal@name%
- \else%
- \ifx\pgf@let@token a%
- \let\pgfutil@next=\tikz@lib@cal@at%
- \else%
- \ifx\pgf@let@token[%
- \let\pgfutil@next=\tikz@lib@cal@option%
- \else%
- \ifx\pgf@let@token i%
- \let\pgfutil@next=\tikz@lib@cal@if%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgfutil@next%
+ \pgfutil@switch\pgfutil@ifx\pgf@let@token{%
+ {;}{\let\pgfutil@next\tikz@lib@cal@stop}%
+ {(}{\let\pgfutil@next\tikz@lib@cal@name}%)
+ {a}{\let\pgfutil@next\tikz@lib@cal@at}%
+ {[}{\let\pgfutil@next\tikz@lib@cal@option}%]
+ {i}{\let\pgfutil@next\tikz@lib@cal@if}%
+ }{\tikz@resetexpandcount\pgfutil@next}{\tikz@lib@cal@expand}%
}
\def\tikz@lib@cal@expand{%
\advance\tikz@expandcount by -1
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex
index 3e703fad986..4683c71cd3f 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex
@@ -532,7 +532,8 @@
\long\def\tikz@math@for@parselist#1{%
\edef\tikz@math@for@list{#1}%
- \tikz@math@collecttosemicolon{\tikz@math@for@parseaction}}%
+ \tikz@math@gobblespaces{%
+ \tikz@math@collecttosemicolon{\tikz@math@for@parseaction}}}%
\def\tikz@math@for@parseaction{%
\tikz@math@for@namedef{prevvalue}{}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex
index 1a5e47b4461..7f3a63b045f 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex
@@ -97,7 +97,7 @@
\pgftransformcm{\pgf@lib@svg@a}{\pgf@lib@svg@b}{\pgf@lib@svg@c}{\pgf@lib@svg@d}{\pgfpointorigin}%
}
}]{};
- \expandafter\pgfutil@switch\expandafter{\tikz@anchor}{%
+ \expandafter\pgfutil@switch\expandafter\pgfutil@ifstrequal\expandafter{\tikz@anchor}{%
{north} {\def\tikz@spy@anchor{south}}%
{north east}{\def\tikz@spy@anchor{south west}}%
{east} {\def\tikz@spy@anchor{west}}%
@@ -106,9 +106,7 @@
{south west}{\def\tikz@spy@anchor{north east}}%
{west} {\def\tikz@spy@anchor{east}}%
{north west}{\def\tikz@spy@anchor{south east}}%
- % default to center
- {default} {\def\tikz@spy@anchor{center}}%
- }
+ }{}{\def\tikz@spy@anchor{center}}%
\node [alias=tikzspyinnode,inner sep=0pt,outer sep=0pt,at={#2},every spy in node/.try,
path picture={\node[anchor=\tikz@spy@anchor,tikz@lib@reset@gs]{\nullfont%
\pgfpicture\relax\pgfsetbaseline{default}\pgfsettrimleft{default}\pgfsettrimright{default}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
index f848487e705..d5244e9e853 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
@@ -2105,7 +2105,7 @@
\tikz@snakedfalse%
\tikz@decoratepathfalse%
\tikz@node@is@a@labelfalse%
- \tikz@expandcount=100\relax%
+ \tikz@resetexpandcount
\pgf@path@lastx=0pt%
\pgf@path@lasty=0pt%
\tikz@lastx=0pt%
@@ -2123,125 +2123,42 @@
\afterassignment\tikz@handle\let\pgf@let@token=%
}%
\newcount\tikz@expandcount
+\def\tikz@resetexpandcount{\tikz@expandcount=100\relax}
\let\tikz@collected@onpath=\pgfutil@empty%
+\edef\tikz@frozen@relax@token{\ifnum0=0\fi}
+
% Central dispatcher for commands
\def\tikz@handle{%
- \let\pgfutil@next=\tikz@expand%
- \ifx\pgf@let@token(%)
- \let\pgfutil@next=\tikz@movetoabs%
- \else%
- \ifx\pgf@let@token+%
- \let\pgfutil@next=\tikz@movetorel%
- \else%
- \ifx\pgf@let@token-%
- \let\pgfutil@next=\tikz@lineto%
- \else%
- \ifx\pgf@let@token.%
- \let\pgfutil@next=\tikz@dot%
- \else%
- \ifx\pgf@let@token r%
- \let\pgfutil@next=\tikz@rect%
- \else%
- \ifx\pgf@let@token n%
- \let\pgfutil@next=\tikz@fig%
- \else%
- \ifx\pgf@let@token[%]
- \let\pgfutil@next=\tikz@parse@options%
- \else%
- \ifx\pgf@let@token c%
- \let\pgfutil@next=\tikz@cchar%
- \else%
- \ifx\pgf@let@token\bgroup%
- \let\pgfutil@next=\tikz@beginscope%
- \else%
- \ifx\pgf@let@token\egroup%
- \let\pgfutil@next=\tikz@endscope%
- \else%
- \ifx\pgf@let@token;%
- \let\pgfutil@next=\tikz@finish%
- \else%
- \let\pgfutil@next=\tikz@handle@more%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgfutil@next%
-}%
-
-% Continued...
-\def\tikz@handle@more{%
- \ifx\pgf@let@token a%
- \let\pgfutil@next=\tikz@a@char%
- \else%
- \ifx\pgf@let@token e%
- \let\pgfutil@next=\tikz@e@char%
- \else%
- \ifx\pgf@let@token g%
- \let\pgfutil@next=\tikz@g@char%
- \else%
- \ifx\pgf@let@token s%
- \let\pgfutil@next=\tikz@schar%
- \else%
- \ifx\pgf@let@token |%
- \let\pgfutil@next=\tikz@vh@lineto%
- \else%
- \ifx\pgf@let@token p%
- \let\pgfutil@next=\tikz@pchar%
- \pgfsetmovetofirstplotpoint%
- \else%
- \ifx\pgf@let@token t%
- \let\pgfutil@next=\tikz@to%
- \else%
- \ifx\pgf@let@token\pgfextra%
- \let\pgfutil@next=\tikz@extra%
- \else%
- \ifx\pgf@let@token\foreach%
- \let\pgfutil@next=\tikz@foreach%
- \else%
- \ifx\pgf@let@token f%
- \let\pgfutil@next=\tikz@fchar%
- \else%
- \ifx\pgf@let@token\pgf@stop%
- \let\pgfutil@next=\relax%
- \else%
- \ifx\pgf@let@token\par%
- \let\pgfutil@next=\tikz@scan@next@command%
- \else%
- \ifx\pgf@let@token d%
- \let\pgfutil@next=\tikz@decoration%
- \else%
- \ifx\pgf@let@token l%
- \let\pgfutil@next=\tikz@l@char%
- \else%
- \ifx\pgf@let@token:%
- \let\pgfutil@next=\tikz@colon@char%
- \else%
- \let\pgfutil@next=\tikz@expand%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \ifx\pgfutil@next\tikz@expand\else\tikz@expandcount=100\relax\fi%
- \pgfutil@next%
+ \pgfutil@switch\pgfutil@ifx\pgf@let@token{%
+ {(}{\let\pgfutil@next\tikz@movetoabs}%)
+ {+}{\let\pgfutil@next\tikz@movetorel}%
+ {-}{\let\pgfutil@next\tikz@lineto}%
+ {.}{\let\pgfutil@next\tikz@dot}%
+ {r}{\let\pgfutil@next\tikz@rect}%
+ {n}{\let\pgfutil@next\tikz@fig}%
+ {[}{\let\pgfutil@next\tikz@parse@options}%]
+ {c}{\let\pgfutil@next\tikz@cchar}%
+ {\bgroup}{\let\pgfutil@next\tikz@beginscope}%
+ {\egroup}{\let\pgfutil@next\tikz@endscope}%
+ {;}{\let\pgfutil@next\tikz@finish}%
+ {a}{\let\pgfutil@next\tikz@a@char}%
+ {e}{\let\pgfutil@next\tikz@e@char}%
+ {g}{\let\pgfutil@next\tikz@g@char}%
+ {s}{\let\pgfutil@next\tikz@schar}%
+ {|}{\let\pgfutil@next\tikz@vh@lineto}%
+ {p}{\pgfsetmovetofirstplotpoint\let\pgfutil@next\tikz@pchar}%
+ {t}{\let\pgfutil@next\tikz@to}%
+ {\pgfextra}{\let\pgfutil@next\tikz@extra}%
+ {\foreach}{\let\pgfutil@next\tikz@foreach}%
+ {f}{\let\pgfutil@next\tikz@fchar}%
+ {\pgf@stop}{\let\pgfutil@next\relax}%
+ {\par}{\let\pgfutil@next\tikz@scan@next@command}%
+ {d}{\let\pgfutil@next\tikz@decoration}%
+ {l}{\let\pgfutil@next\tikz@l@char}%
+ {:}{\let\pgfutil@next\tikz@colon@char}%
+ {\relax}{\relax\let\pgfutil@next\tikz@scan@next@command}%
+ }{\tikz@resetexpandcount\pgfutil@next}{\tikz@expand}%
}%
\def\tikz@l@char{%
@@ -4093,7 +4010,7 @@
\pgfutil@for\pgf@temp:=\tikz@common@matrix@code@styleorder\do{%
\toks0=\expandafter{\romannumeral-`0\expandafter\pgfutil@trimspaces\expandafter{\pgf@temp}}%
\def\pgf@marshal{}%
- \pgfutil@ifempty\pgf@temp{}{%
+ \pgfutil@ifxempty\pgf@temp{}{%
\edef\pgf@marshal{\noexpand\tikzset{matrix/inner style/.cd,\the\toks0}}%
}%
\pgf@marshal
@@ -4754,8 +4671,8 @@
\expandafter\expandafter\expandafter\tikz@parse@child@node%
\fi%
}%
-\def\tikz@parse@child@node@rest#1\pgf@stop{\tikz@expandcount=100\relax\def\tikz@child@node@rest{#1}}%
-\def\tikz@parse@child@node@c c{\tikz@expandcount=100\pgfutil@ifnextchar o{\tikz@parse@child@node@co}{\tikz@parse@child@node@rest c}}%
+\def\tikz@parse@child@node@rest#1\pgf@stop{\tikz@resetexpandcount\def\tikz@child@node@rest{#1}}%
+\def\tikz@parse@child@node@c c{\tikz@resetexpandcount\pgfutil@ifnextchar o{\tikz@parse@child@node@co}{\tikz@parse@child@node@rest c}}%
\def\tikz@parse@child@node@co o{\pgfutil@ifnextchar o{\tikz@parse@child@node@coordinate}{\tikz@parse@child@node@rest co}}%
\def\tikz@parse@child@node@coordinate ordinate{%
\pgfutil@ifnextchar ({\tikz@@parse@child@node@coordinate}{%
@@ -4777,7 +4694,7 @@
\expandafter\expandafter\expandafter{\expandafter\tikz@child@node@text@pre\tikz@marshal}%
\tikz@parse@child@node@rest%
}%
-\def\tikz@parse@child@node@n node{\tikz@expandcount=100%
+\def\tikz@parse@child@node@n node{\tikz@resetexpandcount%
\let\tikz@child@node@text=\pgfutil@empty%
\tikz@p@c@s}%
\def\tikz@p@c@s{%