2

I have the following qtree, and cannot figure out why the edges to the leaves start as a single edge then split into two. I am trying to make a binary tree with all the leaves aligned to the bottom, which is why I am setting the distance from root.

\begin{figure}
\begin{minipage}{.6\linewidth}
\begin{tikzpicture}
\tikzset{frontier/.style={distance from root=145pt}}
\Tree [.a 
            [.b 
                [.c 
                    [e f ] ] 
                [.d 
                    [g h ] ] ]
            [.i 
                [.j 
                    [.l 
                        [n o ]]
                    [.m 
                        [p q ]]]
                [.k 
                    [r s ]]]]

\end{tikzpicture}
\end{minipage}\hfill

enter image description here

2

like this:

enter image description here

with forest is simple:

\documentclass[margin=3mm]{standalone}
\usepackage{forest}

\begin{document}
\begin{forest}
for tree={parent anchor=south, 
          child anchor=north},
where n children=0{tier=word}{}
  [a
    [b
        [c
            [e] 
            [f]
        ]
        [d
            [g]
            [h]
        ] 
    ] 
    [i
        [j
            [l
                [n]
                [o]
            ]
            [m
                [p]
                [q]
            ]
        ]
        [k
            [r]
            [s]
        ]
    ]
  ]
    \end{forest}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.