diff options
author | Norbert Preining <norbert@preining.info> | 2020-12-26 03:02:09 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-12-26 03:02:09 +0000 |
commit | 7ae913a662e817e559620e1114b63e0f412ff2e3 (patch) | |
tree | 96a6fab8955d0a1a5632599d839a1006290a2930 /graphics/pgf/base/tex/tikz.code.tex | |
parent | 41eb4dfa0badd165fc762b85c3ba592b4e57d38a (diff) |
CTAN sync 202012260302
Diffstat (limited to 'graphics/pgf/base/tex/tikz.code.tex')
-rw-r--r-- | graphics/pgf/base/tex/tikz.code.tex | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/graphics/pgf/base/tex/tikz.code.tex b/graphics/pgf/base/tex/tikz.code.tex index 70f8da088e..477418b716 100644 --- a/graphics/pgf/base/tex/tikz.code.tex +++ b/graphics/pgf/base/tex/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% |