森林:是什么原因造成了错位?

森林:是什么原因造成了错位?
\RequirePackage{luatex85}
\documentclass[border=1cm]{standalone}
\usepackage{fontspec}
\usepackage[american]{babel}
\usepackage{libertine}
\usepackage[edges]{forest}

\begin{document}
\begin{forest}
forked edges,
[S[subject [pronoun [I]]] [predicate [verb [saw]]] [object [noun [Jane.]]]]
\end{forest}    
\end{document}

在此处输入图片描述

答案1

像这样?

在此处输入图片描述

对于树中节点的对齐,如您所愿,您应该将其告诉forest。请参见下面的 mwe:

\documentclass[border=1cm]{standalone}
\usepackage{fontspec}
\usepackage[american]{babel}
\usepackage{libertine}
\usepackage[edges]{forest}

\begin{document}
\begin{forest}
forked edges,
[S
    [subject
        [pronoun [I]]
    ]
    [predicate,before computing xy={s/.average={s}{siblings}}% <---
        [verb [saw]]
    ] [object
        [noun
            [Jane.]
        ]
    ]
]
\end{forest}
\end{document}

相关内容