Is there a way to pre- and append code (text and commands) to all nodes with the rectangle
option?
I found this post which explains how to execute a command before every node, but this does not allow me to insert visible text, at least not when I tried it.
Edit:
\tikzset{
ell/.style={
% The shape:
ellipse,
%minimum width=6mm,
minimum height=6mm,
% The rest
inner sep=0,
draw=black,
fill=white,
font=\ttfamily},
skip loop/.style={to path={-- ++(0,#1) -| (\tikztotarget)}}
}
{
\tikzset{ell/.append style={text height=1.5ex,text depth=.25ex}}
}
\begin{tikzpicture}[
>=latex,thick,
/pgf/every decoration/.style={/tikz/sharp corners},
line join=round,line cap=round,
fuzzy/.style={decorate,
decoration={random steps,segment length=0.5mm,amplitude=0.15pt}},
]
\ttfamily
\begin{scope}[start chain=1 going below,
node distance=1mm,
every node/.append style={on chain, scale=0.7,
minimum width=5cm, align=center},
every ell node/.append style={
execute at begin node=(,
execute at end node=)},
scale=0.7,
]
\node [ell] (stmt01) {2. \verb|z = 20|};
\end{scope}
\end{tikzpicture}