如何在某些文本上方指定圆括号?

如何在某些文本上方指定圆括号?

如何绘制水平圆括号多于一些文字?如何在某些文本下方指定圆括号?在下面文本中解释如何操作。

答案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.}}$

相关内容