I am trying to build on the filesystem tree example. I have a similar requirement to display a hierarchical tree, but I'm struggling to get the tree layout right. In the example, the link between a node and its child always extends from the center of the parent node. I have managed to change the design in a way that all vertical lines start at a fixed distance from the left edge of the parent node so that all vertical lines are aligned, no matter what the size of the parent node is. However, the child nodes themselves still appear to be positioned in relation to the center of the parent node, making the tree look rather untidy. How can I change this so that the nodes are aligned as well?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\tikzstyle{every node}=[draw=black,thick,anchor=west]
\begin{tikzpicture}[%
grow via three points={one child at (0.5,-0.7) and
two children at (0.5,-0.7) and (0.5,-1.4)},
edge from parent path={([xshift=2ex]\tikzparentnode.south west) |- (\tikzchildnode.west)}]
\node{root}
child { node {shrt}
child { node {looonger}
child { node {veryveryverylong} }
}
child [missing] {}
child [missing] {}
child { node {looonger} }
child { node {veryveryverylong}
child { node {shrt} }
child { node {looonger} }
child { node {veryveryverylong} }
}
}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child [missing] {}
child { node {veryveryverylong}
child { node {shrt} }
child { node {looonger} }
};
\end{tikzpicture}
\end{document}
growth parent anchor=westappears to have done the trick although I don't really understand why or how... – vwegert Feb 10 '14 at 19:08