將一棵 {forest} 樹放入 {philex} 環境中

將一棵 {forest} 樹放入 {philex} 環境中

我使用該forest套件來繪製語言樹,並使用該linguex套件來建立數字範例。但當我把兩者結合起來時,似乎出現了問題。樹與範例的編號不對齊(XP 應與 (1) 對齊)。

\documentclass{article}
\usepackage{forest}
\usepackage{linguex}

\begin{document}

\ex. \begin{forest}
       [XP [X] [compl ] ]
     \end{forest}

\end{document}

如果我使用philex包包而不是linguex,結果是完全相同的。所以問題似乎出在forest包裝上。有人知道如何解決這個問題嗎?

答案1

如果您希望樹以第一項的基線為根,則手冊中的第 2.4.1 節forest

\documentclass{article}
\usepackage{forest}
\usepackage{linguex}

\begin{document}

\ex. \begin{forest} baseline
       [XP [X] [compl ] ]
     \end{forest}

\end{document}

在此輸入影像描述

相關內容