分组方程的嵌套对齐

分组方程的嵌套对齐

我希望方程的集合作为一个整体对齐,但其中的子组给出描述。以下是两次尝试,每次都恰好满足了其中一项要求:

\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环境:splitamsmath

\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如建议的那样在下面的评论中。

相关内容