如何堆叠多个下支架?

如何堆叠多个下支架?

我如何在 LaTeX 中重现如下图所示的线条?

布拉克

在这幅图中,常见的字符用一条线连接起来。

我尝试过使用 \overbrace 和 \underbrace,但是我无法自己成功重现它(我从未使用过 Tikz)。

答案1

像这样吗?

\documentclass{article}
\usepackage{tikz}
%So we can use south later
\usetikzlibrary{positioning}
\newcommand{\Nice}[2]{\tikz[remember picture, inner sep=0pt, baseline, anchor=base]\node(#1){#2};}
\begin{document}
Et \Nice{l1}{l}es \Nice{f1}{f}ruits \Nice{p1}{p}as\Nice{s1}{s}eront \Nice{l2}{l}a \Nice{p2}{p}romes\Nice{s2}{s}e des \Nice{f2}{f}\Nice{l3}{l}eurs
\begin{tikzpicture}[remember picture, overlay]
%Adjust the distance changing 1ex if you want a different spacing
\draw (l1.south) -- ++ (south:1ex) -| (l2.south);
\draw (l1.south) -- ++ (south:1ex) -| (l3.south);
\draw (f1.south) -- ++ (south:2ex) -| (f2.south);
\draw (p1.south) -- ++ (south:3ex) -| (p2.south);
\draw (s1.south) -- ++ (south:4ex) -| (s2.south);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容