我有以下方程式(见下面的乳胶):
我的问题是标签 (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
第二行。