summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex50
1 files changed, 39 insertions, 11 deletions
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 70f8da088e0..477418b7167 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
@@ -2120,10 +2120,15 @@
\else%
\tikz@invoke@collected@onpath%
\fi%
- \afterassignment\tikz@handle\let\pgf@let@token=%
+ \tikz@scan@@next@command
}%
+\def\tikz@scan@@next@command{%
+ \afterassignment\tikz@handle\let\pgf@let@token=%
+}
+
\newcount\tikz@expandcount
\let\tikz@collected@onpath=\pgfutil@empty%
+\edef\tikz@frozen@relax@token{\ifnum0=0\fi}
% Central dispatcher for commands
\def\tikz@handle{%
@@ -2224,7 +2229,7 @@
\ifx\pgf@let@token:%
\let\pgfutil@next=\tikz@colon@char%
\else%
- \let\pgfutil@next=\tikz@expand%
+ \let\pgfutil@next=\tikz@handle@evenmore
\fi%
\fi%
\fi%
@@ -2240,10 +2245,26 @@
\fi%
\fi%
\fi%
- \ifx\pgfutil@next\tikz@expand\else\tikz@expandcount=100\relax\fi%
\pgfutil@next%
}%
+% Continued...
+\def\tikz@handle@evenmore{%
+ % if \pgf@let@token is \relax or frozen \relax, skip it and
+ % scan from the next token
+ \ifx\pgf@let@token\relax
+ \let\pgfutil@next=\tikz@scan@@next@command
+ \else
+ \ifx\pgf@let@token\tikz@frozen@relax@token
+ \let\pgfutil@next=\tikz@scan@@next@command
+ \else
+ \let\pgfutil@next=\tikz@expand
+ \fi
+ \fi
+ \ifx\pgfutil@next\tikz@expand\else\tikz@expandcount=100\relax\fi
+ \pgfutil@next
+}
+
\def\tikz@l@char{%
\pgfutil@ifnextchar e{\tikz@let@command}{%
\pgfutil@ifnextchar i{\tikz@lsystem}{%
@@ -2566,7 +2587,7 @@
\def\tikz@skip#1{\tikz@scan@next@command#1}%
\def\tikz@expand{%
- \advance\tikz@expandcount by -1%
+ \advance\tikz@expandcount by -1
\ifnum\tikz@expandcount<0\relax%
\tikzerror{Giving up on this path. Did you forget a semicolon?}%
\let\pgfutil@next=\tikz@finish%
@@ -2939,7 +2960,7 @@
% -| <point>
\def\tikz@hv@lineto{%
- \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@hv@lineto}{
+ \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@hv@lineto}{%
\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikz@hv@lineto}%
{\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@hv@lineto}%
{\tikz@scan@one@point{\tikz@@hv@lineto}}}}}%
@@ -3159,6 +3180,7 @@
\pgf@stop%
\expandafter\tikz@scan@next@command\expandafter%
}\tikz@after@path%
+ \pgfextra{\tikz@updatenexttrue\tikz@updatecurrenttrue}%
}%
@@ -3204,13 +3226,13 @@
\let\tikz@collected@onpath=\pgfutil@empty%
\tikz@edgetoparentcollect%
}%
-\def\tikz@edgetoparentcollect{
+\def\tikz@edgetoparentcollect{%
\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@edgetoparentcollect}%
{%
\expandafter%
\endgroup%
\expandafter\tikz@edgetoparent@rollout\expandafter{\tikz@collected@onpath}%
- }
+ }%
}%
\def\tikz@edgetoparent@rollout#1{%
@@ -3262,7 +3284,9 @@
\else%
\tikzerror{Dot expected}%
\fi%
- \tikz@updatecurrenttrue%
+ \iftikz@updatenext
+ \tikz@updatecurrenttrue%
+ \fi
\tikz@curveCcheck%
}%
\def\tikz@curveCcheck{%
@@ -3840,7 +3864,7 @@
% A label text always ``ends'' the node.
%
\def\tikz@fig ode{%
- \pgfutil@ifnextchar a\tikz@test@also{
+ \pgfutil@ifnextchar a\tikz@test@also{%
\pgfutil@ifnextchar f{\tikz@nodes@start}\tikz@normal@fig}}%
\def\tikz@test@also a{\pgfutil@ifnextchar l\tikz@node@also{\tikz@normal@fig a}}%
\def\tikz@normal@fig{%
@@ -5221,11 +5245,15 @@
\tikz@lastxsaved=\pgf@x\relax%
\tikz@lastysaved=\pgf@y\relax%
\fi%
- \tikz@updatecurrenttrue%
+ \iftikz@updatenext
+ \tikz@updatecurrenttrue%
+ \fi
}%
\newif\iftikz@updatecurrent
\tikz@updatecurrenttrue
+\newif\iftikz@updatenext
+\tikz@updatenexttrue
@@ -5240,7 +5268,7 @@
\def\tikz@scan@absolute#1{%
\pgfutil@ifnextchar({\tikz@scan@@absolute#1}%)
{%
- \advance\tikz@expandcount by -1%
+ \advance\tikz@expandcount by -1
\ifnum\tikz@expandcount<0\relax%
\let\pgfutil@next=\tikz@@scangiveup%
\else%