| 1 |
\begin{tikzpicture} |
| 2 |
\definecolor{variablecolor}{named}{cyan} |
| 3 |
\draw (-2,-2) rectangle (2,2); |
| 4 |
|
| 5 |
% Script {{{ |
| 6 |
\begin{scope}[shift={(-0.5,1.25)}] |
| 7 |
\node[draw=black,rounded corners=5] (code) at (0,0) {\texttt{> {\color{variablecolor}x} = 0.025;}}; |
| 8 |
\end{scope} |
| 9 |
% }}} |
| 10 |
|
| 11 |
% Document {{{ |
| 12 |
\begin{scope}[shift={(1,-0.75)}, scale=1.25] |
| 13 |
\draw (0.2,0.705) -| (-0.5,-0.705) -| (0.5,0.405) -- cycle; |
| 14 |
\draw[line width=2] (-0.4,0.5) -- (0.2,0.5); |
| 15 |
\draw[thick] % |
| 16 |
(-0.4,0.3) -- (0.4,0.3) % |
| 17 |
(-0.4,0.1) -- (0.4,0.1) % |
| 18 |
(-0.4,-0.1) -- (0.4,-0.1) % |
| 19 |
(-0.4,-0.3) -- node[inner sep=1.5,circle,midway,variablecolor,draw=black,fill=white](variable) {\(x\)} (0.4,-0.3) % |
| 20 |
(-0.4,-0.5) -- (0.4,-0.5) % |
| 21 |
; |
| 22 |
\end{scope} |
| 23 |
% }}} |
| 24 |
|
| 25 |
\draw[thick,-stealth, shorten >=10, variablecolor] (code.-160) |- (variable); |
| 26 |
|
| 27 |
\end{tikzpicture} |