I seem to be missing something fairly fundamental about how tikz works… I really can't figure out where my missing semicolon is!
MWE:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[sibling distance=10em,
every node/.style = {draw=none, fill=none}]]
\node {What are the types of \code{a} and \code{b}?}
child { \node {\code{int} and \code{int}}
child { \node{Execute procedure \code{int\_add}. }; }; }
child { \node {\code{float} and \code{float}}
child { \node{Execute procedure \code{float\_add}.}; }; }
child { \node {\code{float} and \code{int}}
child { \node{Execute procedure \code{float\_plus\_int}.}; }; }
child { \node {\code{int} and \code{float}}
child { \node{Execute procedure \code{int\_plus\_float}.}; }; }
child { \node {\code{string} and \code{string}}
child { \node{Execute procedure \code{string\_concatenate}.}; }; }
child { \node {Any other combination}
child { \node{Raise \code{TypeError}.}; }; };
\end{tikzpicture}
\end{document}
Best Answer
There is a spurious
]
after the options oftikzpicture
(which doesn't do much harm, but shouldn't be there).There are more opening than closing braces.
The
\node
s within the tree should be justnode
s (without backslash), which do not require terminating semicolons..