You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in #967 (comment), currently tikz never resets \tikz@expandcount when a token handled in \tikz@handle is encountered on a path. This will raise error Giving up on this path. Did you forget a semicolon? when too many steps of expansions are executed when scanning a path.
Minimal working example (MWE)
\documentclass{article}
\usepackage{tikz}
\makeatletter% Token "r" is handled in \tikz@handle. % To show the problem, redefine its handler.\let\tikz@rect\tikz@scan@next@command\def\oneHundredExpansions{}
\def\oneExpansion{r}
\foreach\i in {1,...,101} { % 100 passes, 101 throws error\g@addto@macro\oneHundredExpansions{\oneExpansion}
}
\makeatother\begin{document}
\begin{tikzpicture}
% One handled "r" is encountered every two expansions, but the % \tikz@expandcount is never reset until the 101st expansion throws an error.\draw (0,0) -- (1,1) \oneHundredExpansions;
\end{tikzpicture}
\end{document}
! Package tikz Error: Giving up on this path. Did you forget a semicolon?.
@Rmano
Note that in pgf 3.1.8 and 3.1.8a, tokens handled by \tikz@handler@more will not reset the count as well. In the above example, they are ( in (0, 0), - in --, and ( in (1, 1), hence \foreach \i in {1,...,98} is enough to trigger the error. See a therefore broken circuitikz example in #967 (comment).
The text was updated successfully, but these errors were encountered:
Brief outline of the bug
As discussed in #967 (comment), currently tikz never resets
\tikz@expandcount
when a token handled in\tikz@handle
is encountered on a path. This will raise errorGiving up on this path. Did you forget a semicolon?
when too many steps of expansions are executed when scanning a path.Minimal working example (MWE)
@Rmano
Note that in pgf 3.1.8 and 3.1.8a, tokens handled by
\tikz@handler@more
will not reset the count as well. In the above example, they are(
in(0, 0)
,-
in--
, and(
in(1, 1)
, hence\foreach \i in {1,...,98}
is enough to trigger the error. See a therefore brokencircuitikz
example in #967 (comment).The text was updated successfully, but these errors were encountered: