我想将以下使用尾随括号排版方程的方式扩展为多组方程。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
This works
\begin{equation}
\left. \begin{split}
a&= b \\
c&= d
\end{split}\qquad\right\}\label{eq1} \\
\end{equation}
Here the alignment is off
\begin{align}
\left. \begin{aligned}
a&= b \\
c&= d
\end{aligned}\qquad\right\}\label{eq1} \\
\left. \begin{aligned}
aaaaaaaaaaaaaaaa&= b \\
c&= ddddddddddddddddddddddddddddddddddd
\end{aligned}\qquad\right\}\label{eq1}
\end{align}
\end{document}
我该如何修复它以使后两组对齐?
答案1
您的 MWE 会生成有关split
重复标签的警告。如果初始示例没有生成不相关的错误,则在回答时会有所帮助(因为它可以更轻松地检查是否没有引入错误)
一种方法(不像您希望的那样自动化)是将第二组中的大型条目插入到第一组中:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
This works
\begin{equation}
\left. \begin{aligned}
a&= b \\
c&= d
\end{aligned}\qquad\right\}\label{eq0} \\
\end{equation}
Here the alignment is off
\begin{align}
\left. \begin{aligned}
\phantom{aaaaaaaaaaaaaaaa}\llap{$\displaystyle a$}&= \rlap{$\displaystyle b$}\phantom{ddddddddddddddddddddddddddddddddddd} \\
c&= d
\end{aligned}\qquad\right\}\label{eq1} \\
\left. \begin{aligned}
aaaaaaaaaaaaaaaa&= b \\
c&= ddddddddddddddddddddddddddddddddddd
\end{aligned}\qquad\right\}\label{eq2}
\end{align}
\end{document}
答案2
减少了一次幻像使用,但仍然没有实现自动化,并使用rcases
来自mathtools
包裹。
\documentclass{article}
\usepackage{amsmath,mathtools}
\begin{document}
\begin{align}
\begin{rcases}
\begin{aligned}
a&=b\\
c&=d\phantom{dddddddddddddddddd}
\end{aligned}
\end{rcases}\\
\begin{rcases}
\begin{aligned}
aaaaaaaaaaaa&=b\\
c&=ddddddddddddddddddd
\end{aligned}
\end{rcases}
\end{align}
\end{document}