Sometime, for example in a solution to a recent question, one wants to apply a postaction
(like a decoration) to a group of paths. A naive solution is to use every path/.style={}
. Unfortunately this also this then applies the postaction to every path drawn in the postaction, leading to an infinite regress.
Is there any way to avoid this?
A somewhat stupid minimal example of the problem:
\begin{tikzpicture}[every path/.style={postaction={draw}}]
\draw (0,0)--(1,0);
\end{tikzpicture}
with error message
! TeX capacity exceeded, sorry [grouping levels=255].
\pgfutil@g@addto@macro #1#2->\begingroup
\toks@ \expandafter {#1#2}\xdef #1{...
l.12 \draw (0,0)--(1,0);