这是指以下复杂的解决方案由@David Carlisle\underbrace
申请多行表达式:
- 我怎么还能
\underbrace
在单行表达式上使用?我从\underbrace
建议的解决方案的常见用法中得到的只是
- 如何获得仅跨越表达式下的括号二括号尖端位于第二行括号部分下方的行?我得到的只是
- 除了尽可能避免使用这种符号外,对多行“\underbrace”最灵活的方法是什么?
这里(为了方便)是 David Carlisle 的代码,其中添加了有问题的方程式:
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\underbracex#1#2{\mathop{\vtop{\m@th\ialign{##\crcr
$\hfil\displaystyle{#2}\hfil$\crcr
\noalign{\kern3\p@\nointerlineskip}%
#1\crcr\noalign{\kern3\p@}}}}\limits}
\def\underbracea{\underbracex\upbracefilla}
\def\upbracefilla{$\m@th \setbox\z@\hbox{$\braceld$}%
\bracelu\leaders\vrule \@height\ht\z@ \@depth\z@\hfill
\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@
$}
\def\underbraceb{\underbracex\upbracefillb}
\def\upbracefillb{$\m@th \setbox\z@\hbox{$\braceld$}%
\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@
\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\bracerd
\braceld\leaders\vrule \@height\ht\z@ \@depth\z@\hfill
\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@
$}
\def\underbracec{\underbracex\upbracefillc}
\def\upbracefillc{$\m@th \setbox\z@\hbox{$\braceld$}%
\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@
\leaders\vrule \@height\ht\z@ \@depth\z@\hfill
\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@
$}
\def\underbraced{\underbracex\upbracefill}
\def\upbracefill{$\m@th \setbox\z@\hbox{$\braceld$}%
\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@
\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru$}
\makeatother
\begin{document}
\begin{align}
\underbrace{a+b}_{=c} \\
\underbracea{d + e} \\
\underbraced{f+g}_{=h}
\end{align}
\begin{align*}
A ={}& B + \underbracea{C + D + E} \\
&\underbraceb{{} + F + G}_{=:M} \\
&\underbracec{{}+ H + I} \\
&\underbraced{{} + J + K} + L
\end{align*}
\end{document}
答案1
旧答案中有一个错误:最后一个子句应该是变体,d
但它没有最后一个字母,因此重新定义了标准\upbrace
宏,只制作了半个括号,这不是我们的本意。下面已修复。
这里我添加了另一个变体,它是“尖刺”和延伸的支架右半部分bd
的组合。b
d
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\underbracex#1#2{\mathop{\vtop{\m@th\ialign{##\crcr
$\hfil\displaystyle{#2}\hfil$\crcr
\noalign{\kern3\p@\nointerlineskip}%
#1\crcr\noalign{\kern3\p@}}}}\limits}
\def\underbracea{\underbracex\upbracefilla}
\def\upbracefilla{$\m@th \setbox\z@\hbox{$\braceld$}%
\bracelu\leaders\vrule \@height\ht\z@ \@depth\z@\hfill
\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@
$}
\def\underbraceb{\underbracex\upbracefillb}
\def\upbracefillb{$\m@th \setbox\z@\hbox{$\braceld$}%
\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@
\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\bracerd
\braceld\leaders\vrule \@height\ht\z@ \@depth\z@\hfill
\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@
$}
\def\underbracec{\underbracex\upbracefillc}
\def\upbracefillc{$\m@th \setbox\z@\hbox{$\braceld$}%
\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@
\leaders\vrule \@height\ht\z@ \@depth\z@\hfill
\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@
$}
\def\underbraced{\underbracex\upbracefilld}
\def\upbracefilld{$\m@th \setbox\z@\hbox{$\braceld$}%
\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@
\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru$}
\def\underbracebd{\underbracex\upbracefillbd}
\def\upbracefillbd{$\m@th \setbox\z@\hbox{$\braceld$}%
\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@\vrule \@width\p@\kern\p@
\bracerd\braceld
\leaders\vrule \@height\ht\z@ \@depth\z@\hfill\braceru$}
\makeatother
\begin{document}
\begin{align}
\underbrace{a+b}_{=c} \\
\underbracea{d + e} \\
\underbracebd{f+g}_{=h}
\end{align}
\begin{align*}
A ={}& B + \underbracea{C + D + E} \\
&\underbraceb{{} + F + G}_{=:M} \\
&\underbracec{{}+ H + I} \\
&\underbraced{{} + J + K} + L
\end{align*}
\end{document}