# Node names are too long for forest

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

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)

• Your code does not compile. What is cgloss? Apr 2 at 22:26
• @SandyG it's discussed here. But I guess for the purpose of this question, it's not important, you can delete the line with cgloss. Apr 2 at 23:28
• It still doesn't compile. Apr 3 at 0:18

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}