答案1
在我们的例子中,您可以使用\tikzmark
两个参数:
\tikzmark{<reference name>}{<actual text>}
稍后,我们可以在文档内部绘制常规箭头,\tikzpicture
并使用一些选项在文档顶部绘制。
输出
代码
\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{soul}
\usepackage{tikz}
\usetikzlibrary{calc, arrows.meta}
\newcommand\tikzmark[2]{
\tikz[remember picture,baseline=(#1.base)] \node (#1) {#2};}
\begin{document}\noindent
[CP [C \textbf{é} [C’[TP [ T {que} [T’ [vP {XP} [v [v’[VP V XP]]]]]]]
\newline
\vspace{\baselineskip}
\noindent
[CP \tikzmark{a}{\textbf{XP}} [\tikzmark{c}{C} é [C’[TP [ T {que} [T’ [vP \tikzmark{b}{\textbf{\st{XP}}} [v [v’[VP V XP]]]]]]]
\begin{tikzpicture}[overlay,remember picture]
\path (c.south) edge[thick, bend right,-{Latex}] (b);
\path (b.north) edge[thick, bend right,-{Latex}] (a);
\end{tikzpicture}
\end{document}