Debian Codegraph @

texmf-dist/doc/latex/binarytree/examples/binarytree-ex1.tex

raw
1 \documentclass{standalone}
2 \usepackage{binarytree}
3 \usetikzlibrary{graphs}
4
5 \begin{document}
6 \btreeset{math labels,scale=0.7}
7 \begin{tikzpicture}
8 \BinaryTree[local bounding box=INIT]{%
9 :1!l:w!r:x:red!l:\sigma,ll!l:\sigma,lr!r:\sigma,
10 r:w!r:y!r:\sigma,rr!l:\sigma,rl!l:\sigma}{3}
11 \BinaryTree[local bounding box=FINAL,xshift=10cm]{
12 :1!l:w!l:x':red!l:\sigma,lr!r:\sigma,ll!r:\sigma,
13 r:w!r:y!r:\sigma,rr!l:\sigma,rl!l:\sigma}{3}
14 \graph[use existing nodes]{ INIT -> FINAL};
15 \end{tikzpicture}
16 \end{document}