![分组方程的嵌套对齐](https://linux22.com/image/379446/%E5%88%86%E7%BB%84%E6%96%B9%E7%A8%8B%E7%9A%84%E5%B5%8C%E5%A5%97%E5%AF%B9%E9%BD%90.png)
我希望方程的集合作为一个整体对齐,但其中的子组给出描述。以下是两次尝试,每次都恰好满足了其中一项要求:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Comments are centred on groups, but equations are not globally horizontally
aligned:
\begin{subequations}
\begin{alignat}{2}
\begin{aligned}
f(xy) &= f(x)f(y)\\
f(1) &= 1
\end{aligned} &\qquad{\text{(Algebra map)}}\\
\begin{aligned}
\Delta f (x) &= (f\otimes f) (\Delta x)\\
\epsilon f(x) &= \epsilon x
\end{aligned} & \qquad{\text{(Coalgebra map)}}\\
\begin{aligned}
f(Sx) &= Sf(x)
\end{aligned} & \qquad{\text{(Antipode compatibility)}}
\end{alignat}
\end{subequations}
Equalities are horizontally aligned, but comments are not vertically aligned to
the centre of the group they describe, nor are horizontally left-justified with each other:
\begin{subequations}
\begin{align}
f(xy) &= f(x)f(y)\\
f(1) &= 1\qquad\qquad{\text{(Algebra map)}}\\
\Delta f (x) &= f\otimes f (\Delta x)\\
\epsilon f(x) &= \epsilon x\qquad\qquad{\text{(Coalgebra map)}}\\
f(Sx) &= Sf(x) \qquad{\text{(Antipode compatibility)}}
\end{align}
\end{subequations}
\end{document}
这里的使用\qquad
是相当临时的,但在第二个例子中提供了一定程度的分离。
答案1
像这样?
使用的是来自包的align
环境:split
amsmath
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations}
\begin{align}
\begin{split}
f(xy) &= f(x)f(y)\\
f(1) &= 1
\end{split} && \text{(Algebra map)} \\[\jot]
\begin{split}
\Delta f (x) &= (f\otimes f) (\Delta x) \\
\epsilon f(x) &= \epsilon x
\end{split} && \text{(Coalgebra map)} \\[\jot]
f(Sx) &= Sf(x)&& \text{(Antipode compatibility)}
\end{align}
\end{subequations}
\end{document}
编辑: 现在,三组条件按垂直大小分开,\jot
如建议的那样胶在下面的评论中。