I am drawing a tree with tikz, namely, using tikz-qtree-compat for simpler syntax. On the tree there can be nodes of different height but then branches become messy. I want to add an instruction where distance between the south point of a mother nodes and the north point of a child node is constant.
MWE: https://www.overleaf.com/2453721thvhsh#/6394537/
\documentclass[10pt]{report}
\usepackage{tikz-qtree-compat} % draw trees with simple syntax
\begin{document}
wanted but obtained non-general way:
\begin{tikzpicture}[baseline=-20pt, grow=down]
\tikzset{level distance = 25pt, sibling distance = 30pt}
\tikzset{every tree node/.style={align=center,anchor=north}}
\tikzset{level 1/.style={level distance=38pt}}
\tikzset{level 2/.style={level distance=60pt}}
\tikzset{level 4/.style={level distance=60pt}}
\Tree
[.\node{A\\A};
[.\node{B\\B\\B\\B};
[.\node{C};
[.\node{E\\E\\E};]
]
[.\node{D\\D\\D};
[.\node at(0,-25pt){F\\F};
[.\node{G};]
]
]
]
]
\end{tikzpicture}
without any modification looks like:
\begin{tikzpicture}[baseline=-20pt, grow=down]
\tikzset{level distance = 25pt, sibling distance = 30pt}
\tikzset{every tree node/.style={align=center,anchor=north}}
%\tikzet{some single instruction that fix all trees in this way}
\Tree
[.\node{A\\A};
[.\node{B\\B\\B\\B};
[.\node{C};
[.\node{E\\E\\E};]
]
[.\node{D\\D\\D};
[.\node{F\\F};
[.\node{G};]
]
]
]
]
\end{tikzpicture}
\end{document}
growth parent anchor=north
? See "Custom Growth Functions" in the PGF manual.