修复“align”中的标签缩进

修复“align”中的标签缩进

我有以下方程式(见下面的乳胶):

在此处输入图片描述

我的问题是标签 (1) 位于两行之间,而我希望它与第二行对齐。有办法解决这个问题吗?提前谢谢!

乳胶:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\begin{align}
&\begin{aligned}
   \sum_{t = 0}^T&{(t + d_{i, m_i}) \cdot s_{i, m_i, t}} \leq \sum_{t = 0}^T{t \cdot s_{j, m_j, t}}, \forall (i, j) \in A,\\
   &\forall m_i \in M_i, \forall m_j \in M_j
\end{aligned}\\
&\text{Test to see that aligned with start of 1st equation}
\end{align}
\end{document}

答案1

更新:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
a+b=c
\end{equation}
\begin{align}
& \sum_{t = 0}^T  {(t + d_{i, m_i}) \cdot s_{i, m_i, t}} \leq \sum_{t = 0}^T{t \cdot s_{j, m_j, t}}, \forall (i, j) \in A,  \notag \\
& \phantom{\sum_{t = 0}^T}\forall m_i \in M_i, \forall m_j \in M_j                                                                 \\
& \text{Test to see that aligned with start of 1st equation}
\end{align}
\begin{equation}
a+b=c
\end{equation}
\end{document}

在此处输入图片描述


\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\sum_{t = 0}^T & {(t + d_{i, m_i}) \cdot s_{i, m_i, t}} \leq \sum_{t = 0}^T{t \cdot s_{j, m_j, t}}, \forall (i, j) \in A, \notag \\
               & \forall m_i \in M_i, \forall m_j \in M_j                                                                        \\
               & \text{Test to see that aligned with start of 1st equation}
\end{align}
\end{document}

在此处输入图片描述

答案2

你想要t做手术aligned

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
&\begin{aligned}[t]
   \sum_{t = 0}^T & (t + d_{i, m_i}) \cdot s_{i, m_i, t} \leq 
   \sum_{t = 0}^T t \cdot s_{j, m_j, t} , \forall (i, j) \in A,\\
   &\forall m_i \in M_i, \forall m_j \in M_j
\end{aligned}\\
&\text{Test to see that aligned with start of 1st equation}
\end{align}

\end{document}

在此处输入图片描述

不过,我会转到\forall(i,j)\in A第二行。

相关内容