%% LaTeX2e file `tmp-gen-anatomy-of-an-if-statement.tex' %% generated by the `filecontents' environment %% from source `codeanatomy.lstlisting' on 2025/10/19. %% \lstset{escapeinside={!}{!}} \begin{lrbox}{\mycodebox} \begin{lstlisting} if (!\cPart{e}{x > y}!) { int t = x;!\mtPoint{tr}! x = y; !\mbPoint{bl}! y = t;!\extremPoint{br}! } \end{lstlisting} \end{lrbox} \begin{tikzpicture}[remember picture] % {[on background layer]\draw[code grid debug] (-2.5,-0.5) grid (2.5,2.5);} \node(code) [anatomy] at (0,0) {\usebox\mycodebox}; \fitExtrem{b}{(tr) (bl) (br)} % Annotation \codeAnnotation{eText} (1,3.5) {boolean\\expression} \codeAnnotation{bText} (-1,1.125) {sequence\\of \extremPoint{bPoint}[0.75ex]\\statements} % Arrow \draw[->,annotation] (eText) -- (e); \draw[->,annotation] (bPoint) -- (b); \end{tikzpicture}