答案1
作为美味午餐后的休闲娱乐 :-)
\documentclass[boeder=5mm,
tikz]{standalone}
\usetikzlibrary{chains,positioning,shapes.multipart}
\begin{tikzpicture}[
node distance = 2mm and 3mm,
start chain = A going right,
MN/.style = {%My Node
shape=rectangle split, rectangle split horizontal,
rectangle split parts=#1,
inner xsep=0pt, minimum height=4ex,
on chain=A
},
]
\node[MN=1,label=above:I] {$\pi_1$};
\node[MN=5,label=above:saw]
{\nodepart{one} (
\nodepart{two} $\pi_1^r$
\nodepart{three} $s_2$
\nodepart{four} $o^{\ell}$
\nodepart{five} )
};
\node[MN=1,label=above:him] {$0$};
\coordinate[below=of A-1] (a);
\draw[thick] (A-1) -- (a) -| (A-2.two south)
(A-2.four south) -- (A-2.four south |- a) -| (A-3);
\draw (A-2.three south) -- ++ (0,-1);
\end{tikzpicture}
\end{document}
答案2
您可以使用tabular
环境和来执行此操作pstricks
。它可以用 进行编译xelatex
,或者如果它使用开关(对于 MiKTeX)或(TeX Live,MacTeX)pdflatex
启动,则使用:--enable-write 18
-shell-escape
\documentclass[10pt]{amsart}
\usepackage{array}
\usepackage{pst-node}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{postscript}
\begin{tabular}{ccc}
I & saw & him \\
\Rnode{P}{$ \pi _1 $} & \Rnode{PO}{$ (\pi _1 ^r s_2 o^\ell) $} & \Rnode{O}{$ o $}
\end{tabular}
\psset{angle=-90, arm=0.6em, nodesep=3pt, }
\ncbar[offsetB =8pt]{P}{PO}\ncbar[offsetB =-8pt]{O}{PO}
\pnode[0,-1](PO){O1}\ncline{PO}{O1}
\end{postscript}
\end{document}