2

I've create this tree in LaTex using the package forest. However, I cannot understand why the command tier doesn't work properly. I should have F, P, D and R align on the same line and M, S and L on a different line, just a bit above the other one. The position of m and n is fine. Could you help me? Thanks

\documentclass[border=0.5cm]{standalone}
\usepackage{forest}
\forestset{
nice 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$, nice empty nodes
[G]
[[[F, tier=word][[P, tier=word][[D, tier=word][[R, tier=word][M, tier=word1[m][n]]]]]][[S, tier=word1][L, tier=word1]]]]]]
\end{forest}
\end{document}

enter image description here

1 Answer 1

2

If I understood you correctly, than you like achieve the following result:

enter image description here

It is obtained by changing declaration of nodes anchors:

\documentclass[border=0.5cm]{standalone}
\usepackage{forest}

\begin{document}
    \begin{forest}
for tree={calign=fixed edge angles,
          anchor=north
          },
delay={where content={}{shape=coordinate}{}},
%  
[$\Omega$
    [G]
    [
        [
            [F, tier=word]
            [
                [P, tier=word]
                    [
                        [D, tier=word]
                        [
                            [R, tier=word]
                                [M, tier=word
                                    [m]
                                    [n]
                                ]
                        ]
                    ]
            ]
        ]
        [
            [S, tier=word]
            [L, tier=word]
        ]
    ]
]
\end{forest}
\end{document}
2
  • That’s perfect!! Thank you very much, you’ve helped me a lot!
    – Andrea C
    Commented Nov 30, 2020 at 19:39
  • @AndreaC, you are welcome!
    – Zarko
    Commented Nov 30, 2020 at 19:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .