2

I'm very new to LaTeX and especially to forest. I need to create the tree in the picture, which I did with xyling, in forest or TikZ. I can't solve the problem with any of these. My problem is how to create crossing branches. Has anyone any tips?

enter image description here

1
  • 1
    Welcome to TeX.se. For future questions it would be helpful to provide a compilable minimal document showing what you've tried so far rather than just posting an image. For example, you could have posted your version of the tree in the picture with the NP node dominated by VP, which although not what you want, would give people something to work with.
    – Alan Munn
    Apr 5, 2020 at 16:19

1 Answer 1

4

This is quite easy to do with forest. You can use no edge to remove the edge from a node, and then manually draw the crossing branch.

Disclaimer: As a syntactician I don't endorse the following tree. :)

\documentclass{article}
\usepackage[linguistics]{forest}
\begin{document}
\begin{forest}where n children=0{tier=word}{} 
[S,name=S 
    [NP [D [die] ] [N [Mutter] ]]
    [VP 
        [V [singt]]
        [NP [D [die] ] [N [Kinder] ]]
        [NP,name=NP,no edge [D [jeden]] [N [Abend]]]
        [PP
            [P [in] ]
            [NP [D [den] ] [N [Schlaf] ]]
        ]
        ]
]
\draw (S.south) -- (NP.north west); % or use (NP.north) 
\end{forest}

\end{document}

output of code

2
  • Thank you very much!!! I'm sorry I didn't post my work to make things easier, I really didn't think about it. I don't like the syntax of this tree either, but my professor wants them done this way... Apr 6, 2020 at 0:20
  • 1
    @MartinaSapienza If this answer solved your problem, it's helpful to others to "Accept" it by clicking on the green checkmark icon beside it.
    – Alan Munn
    Apr 6, 2020 at 14:25

You must log in to answer this question.

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