I can easily do trees with horizontal (square) edges in tikz-qtree
(see MWE). The forest
package is however a far superior alternative for my purposes. However, every attempt to do either horizontal or vertical trees with square edges in forest is either ignored, or leads to compilation failure (for example inserting the \tikzset
line into the forest tree). Is this possible?
A helping hand would be very much appreciated here.
\documentclass[10pt,twoside,a4paper]{memoir}
\usepackage{graphicx}
\usepackage{forest}
\usepackage{tikz-qtree}
\begin{document}
\begin{tikzpicture}
\tikzset{edge from parent/.style={draw,edge from parent path={(\tikzparentnode.south)-- +(0,-8pt)-| (\tikzchildnode)}}}
\Tree [.ZZ
[.Bax
[.X
[.Y [.A ] [.B ] ]
[.Z [.C ] [.D ] ] ]
[.F
[.M [.E ] [.F ] ]
[.G [.G ] [.H ] ] ] ]
[.A
[.B
[.S [.I P R T V U ] [.J ] ]
[.I [.K ] [.L ] ] ]
[.M
[.L [.M ] [.N ] ]
[.A [.O ] [.P ] ] ] ] ] ]
\end{tikzpicture}
\begin{forest}
[ZZ
[Bax
[X
[Y [A ] [B ] ]
[Z [C ] [D ] ] ]
[F
[M [E ] [F ] ]
[G [G ] [H ] ] ] ]
[A
[B
[S [I [P][R][T][V][U]] [J ] ]
[I [K ] [L ] ] ]
[M
[L [M ] [.N ] ]
[A [O ] [P ] ] ] ] ] ]
\end{forest}
\end{document}
forest
you might want to accept the new answer over the existing accepted answer. – Alan Munn Jul 5 '17 at 23:07