![将方程式与对齐环境内的方程式对齐](https://linux22.com/image/456177/%E5%B0%86%E6%96%B9%E7%A8%8B%E5%BC%8F%E4%B8%8E%E5%AF%B9%E9%BD%90%E7%8E%AF%E5%A2%83%E5%86%85%E7%9A%84%E6%96%B9%E7%A8%8B%E5%BC%8F%E5%AF%B9%E9%BD%90.png)
答案1
(即使等式 (1) 和 (3) 没有按符号对齐=
,但它们是右对齐的。)
以下解决方案重复使用了https://tex.stackexchange.com/a/633624/255231:
{\offinterlineskip
\setbox0=\vbox{\halign{\hfil$\strut#$&${}#$\hfil\cr
\noalign{\penalty0} %first \vsplit here
a&=1\cr %second \vsplit here
b&=2\cr\noalign{\nobreak}
cc&=3\cr %third \vsplit here
ddd&=4\cr}}
\setbox1=\vsplit0 to0pt %insert \splittopskip at the top of \box0
\setbox1=\vsplit0 to12pt %split off first group
\setbox1=\vbox{\unvbox1} %give \box1 its natural height
\setbox2=\vsplit0 to12pt %split off second group
\setbox2=\vbox{\unvbox2} %give \box2 its natural height
\tabskip 0pt plus1fill
\halign to\hsize{\hfil$#$&\hfil(#)\tabskip 0pt\cr
\left.\vcenter{\box1}\right.&1\cr
\left\{\vcenter{\box2}\right.&2\cr
\left.\vcenter{\box0}\right.&3\cr}}