# Tikz Hierarchical Chart - Branching

I am trying to get Rachel Brown all on one line, and below Rachel Brown - three branches that say Mary Brown, Laura Brown and Emma Brown. I am also trying to get ages to show below each name, for example directly below Hannah Brown it needs to say (Age: 23), etc. Many Thanks!

\documentclass{article}
\usepackage{tikz-qtree}

\begin{document}
\tikzset{edge from parent/.style=
{draw, edge from parent path={(\tikzparentnode.south)
-- +(0,-8pt)
-| (\tikzchildnode)}},
blank/.style={draw=none}}
\begin{tikzpicture}
\matrix
{
\node{\Tree
[.{Hannah Brown}
[.Rachel Brown ]]};\\
};
\end{tikzpicture}

\end{document}

-
Did my answer solve your problem? If not, what is missing? – Torbjørn T. Apr 15 '14 at 18:02

To get Rachel Brown in one line, do as with Hannah, and add braces ({}). If you add every tree node/.style={align=center} you can use \\ to add linebreaks in a node, and then you can use Rachel Brown\\Age: 23 to place the age below the name. To get three branches you need to write something like [ .root [ .{first branch}] [ .{second branch} ] [ .{third branch} ] ]. Note that each branch is within the pair of brackets where the root is defined.

To properly align the middle branch, add minimum width=\widthof{Hannah Brown} to the every tree node style. You can also use a specific length (e.g. 3cm) instead of \widthof{the longest name in the family}.

\documentclass{article}
\usepackage{tikz-qtree}

\begin{document}
\tikzset{edge from parent/.style=
{draw, edge from parent path={(\tikzparentnode.south)
-- +(0,-8pt)
-| (\tikzchildnode)}},
blank/.style={draw=none},
level distance=45pt}
\begin{tikzpicture}[every tree node/.style={align=center,minimum width=\widthof{Hannah Brown}}]
\Tree
[ .{Hannah Brown}
[ .{Rachel Brown\\Age: 23}
[ .{Mary Brown\\Age: 1} ]
[ .{Laura Brown\\Age: 2} ]
[ .{Emma Brown\\Age: 3} ] ] ]
\end{tikzpicture}

\end{document}

-