我必须在对齐环境中使用一大括号。意思是
\begin{align*}
A ={}& B + \underbracemultiline{C + D + E \\
& + F + G \\
& + H + I \\
& + J + K}_{=:M} + L
\end{align*}
结果是(一个很好的版本)
http://www.phoenixes.de/Bsp.png http://www.phoenixes.de/Bsp.png
另一种可能的语法是
\begin{align*}
A ={}& B + \under{brace}{line}{dots}{C + D + E} \\
& \under{dots}{brace}{dots}{+ F + G}_{=:M} \\
& \under{dots}{line}{dots}{+ H + I} \\
& \under{dots}{line}{brace}{+ J + K} + L
\end{align*}
宏
\under{begin}{middle}{end}{What to under"line"}
符合示例的需要。我该怎么做?
谢谢
答案1
\underbrace
由位构成,因此您只需每次使用不同的位复制其定义:
\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$}
\makeatother
\begin{document}
\begin{align*}
A ={}& B + \underbracea{C + D + E} \\
&\underbraceb{{} + F + G}_{=:M} \\
&\underbracec{{}+ H + I} \\
&\underbraced{{} + J + K} + L
\end{align*}
\end{document}