I want to draw a tree using tikz, but I want the vertical distance between nodes in successive levels to be the same, regardless of the size of the node.
For example:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[level distance=1cm]
\path node {a}
child {
node {b}
child {
node [align=center] {c \\ d}
child {
node {e}
}
}
};
\end{tikzpicture}
\end{document}
I know this is a silly example of a tree, since it doesn't “branch”, but it shows better the problem I'm referring to. The actual tree that I have to produce does eventually branch. But anyway, the produced output looks like:
where the edge between a—b is longer than the edge between b-cd.
What I want is the distance between the bottom of a parent node and the top of its children nodes to remain constant throughout the tree, regardless of the (vertical) size of the nodes. In this example all edges should show up with the same size.
Is there a way to easily accomplish this using tikz?