0

I've written this tree using the Forest package. The output is perfect, but I don't understand why in order to increase the length of the branch connecting r, I had to write [h, l=2] and not [r, l=2]. Thank you in advance

\documentclass[border=0.5cm]{standalone}
\usepackage{forest}
\forestset{
  empty nodes/.style={
    for tree={calign=fixed edge angles},
    delay={
      where content={}{
        shape=coordinate,
        for current and siblings={anchor=north}
      }{}
    }
  },
}
\begin{document}
\begin{forest}
[$\Omega$, empty nodes
[F]
[($\alpha$), l=1.5[G][($\beta$)[B][($\gamma$)[r][h, l=2]]]]]]]
\end{forest}
\end{document}
1
  • 1
    Try with some like [r, l*=2] or [r, l*=2cm]
    – Fran
    Dec 1 '20 at 16:13
3

l=2 really means l=2pt. In effect, l is irrelevant and l sep takes over. To see what it produces, remove empty nodes -- with h, l=2 you get r directly below h, even though they are siblings.

Then empty nodes takes over and applies calign=fixed edge angles, pushing the nodes apart while keeping the ls intact.

So as Fran answered in the comment, l*=2 on r does the trick, as this doubles the original l, pushing r below h.

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.