1

I've been trying to draw a tree like this:

enter image description here

But I came across the problem that the node names are apparently too long... So the code below doesn't work. (If you replace $\lambda x.\lambda e. \text{eating}(e) \land \text{agent}(e,x) \land \text{theme}(e, \textsc{food}) \land \textsc{benefactive}(e,\text{wife})$ with aaa, it will work.) Is there any way to fix this?

\documentclass[11pt]{article}
\usepackage{linguex}
%\usepackage{cgloss}
\usepackage[linguistics]{forest}
\begin{document}

\ex. \begin{forest} [\textbf{VoiceP} [he] [$\lambda x.\lambda e. \text{eating}(e) \land \text{agent}(e,x) \land \text{theme}(e, \textsc{food}) \land \textsc{benefactive}(e,\text{wife})$ [T\will ] [VP [V\eat ] [DP [D\a ] [NP [N\burger ]]] ] ] ] \end{forest}

\end{document}

(Source of the code above before my modifications: https://amunn.github.io/assets/latex/overleaf-trees.pdf)

Zarko
  • 296,517

1 Answers1

4

Inside forest nodes commas differs node content from eventual local style settings. So in the cases, when node content should contain commas, whole node content had to be encapsulated in curly braces:

\documentclass[11pt]{article}
%\usepackage{linguex}
\usepackage{amsmath}
\usepackage[linguistics]{forest}

\begin{document}

\begin{forest} for tree = { align=center, } [\textbf{VoiceP} [he] [${\lambda x.\lambda e. \text{eating}(e) \land \text{agent}(e,x)}$\ ${\land, \text{theme}(e,\textsc{food}) \textsc{benefactive}(e,\text{wife})}$, draw [T\will ] [VP [V\eat ] [DP [D\a ] [NP [N\burger ] ] ] ] ] ] \end{forest}

\end{document}

enter image description here

Zarko
  • 296,517