diff --git a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex index 5b0e83d5e..f7ff81b7e 100644 --- a/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex @@ -72,6 +72,10 @@ \let\tikz@intersect@total=\pgfutil@empty \tikzset{ + every scope/.append style={ + execute at begin scope={\let\tikz@intersect@namedpaths@outside\tikz@intersect@namedpaths}, + execute at end scope={\global\let\tikz@intersect@namedpaths\tikz@intersect@namedpaths@outside}, + }, name intersections/.code={% \tikzset{/tikz/intersection/.cd, by=, diff --git a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex index e65535e62..110f4a1db 100644 --- a/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +++ b/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex @@ -2058,7 +2058,6 @@ % settings. \def\tikz@command@path{% - \global\let\tikz@intersect@namedpaths=\pgfutil@empty% clear intersections \let\tikz@signal@path=\tikz@signal@path% for detection at begin of matrix cell \pgfutil@ifnextchar[{\tikz@check@earg}%] {\pgfutil@ifnextchar<{\tikz@doopt}{\tikz@@command@path}}}%