如何在语言示例中的单词之间画箭头?

如何在语言示例中的单词之间画箭头?

这就是我想要的:我希望显示句子“约翰爱他的母亲。”,并带有从“他的”到“约翰”的箭头。我查看了gb4e,但我发现文档令人困惑,我无法让它发挥作用。

答案1

使用 TikZ

\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikzstyle{every picture}+=[remember picture]
\tikzstyle{na} = [shape=rectangle,inner sep=0pt,text depth=0pt]
\tikz\node[na](word1){John}; loves \tikz\node[na](word2){his}; mother.
\begin{tikzpicture}[overlay]
  \path[->,red,thick](word2) edge [out=90, in=90] (word1);
\end{tikzpicture}
\end{document}

输出

我不知道你想要什么类型的箭=)

相关内容