如何绘制水平圆括号多于一些文字?如何在某些文本下方指定圆括号?在下面文本中解释如何操作。
答案1
这abraces
包裹包选项下使用或overload
时提供此功能:\overbrace[L1R]
\underbrace[l1r]
\documentclass{article}
\usepackage[overload]{abraces}% http://ctan.org/pkg/abraces
\begin{document}
$\overbrace[L1R]{\textrm{The quick brown fox jumped over the lazy dog}}$ \par \medskip
$\underbrace[l1r]{\textrm{The quick brown fox jumped over the lazy dog}}$ \par
\end{document}
原始答案:
\overbrace
这是形式的修改版本\overfence
,它可以提供您想要的内容。
\documentclass{article}
\usepackage{mathtools}% http://ctan.org/pkg/mathtools
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
% \overfence definition
\let\overfence\overbrace % \overfence is similar to \overbrace
\let\downfencefill\downbracefill % match components of \overbrace
\patchcmd{\overfence}{\downbracefill}{\downfencefill}{}{}% patch \overfence...
\patchcmd{\downfencefill}{\braceru \bracelu}{}{}{}%... and \downfencefill
% \underfence definition
\let\underfence\underbrace % \underfence is similar to \underbrace
\let\upfencefill\upbracefill % match components of \underbrace
\patchcmd{\underfence}{\upbracefill}{\upfencefill}{}{}% patch \underfence...
\patchcmd{\upfencefill}{\bracerd \braceld}{}{}{}%... and \upfencefill
\begin{document}
$\overbracket{\textrm{The quick brown fox jumped over the lazy dog}}$ \par
$\overbrace{\textrm{The quick brown fox jumped over the lazy dog}}$ \par
$\overfence{\textrm{The quick brown fox jumped over the lazy dog}}$ \par \medskip
$\underbracket{\textrm{The quick brown fox jumped over the lazy dog}}$ \par
$\underbrace{\textrm{The quick brown fox jumped over the lazy dog}}$ \par
$\underfence{\textrm{The quick brown fox jumped over the lazy dog}}$
\end{document}
事实上,由于\overfence
重复了 的行为\overbrace
,你甚至可以向其中添加内容,因为它被排版为\mathop
。\limits
例如:
$\overfence{\textrm{The quick brown fox jumped over the lazy dog}}^{\mbox{\scriptsize Because the dog is really lazy.}}$