这个帖子提供了一种将方程式与右侧对齐的解决方案。显然,当方程式很长时,它不起作用。假设给定宽度,我应该如何修改以下方程式以实现与旧帖子中类似的对齐?
\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{amsmath}
\begin{document}
\begin{flalign}
& p^{'w}_{koi0} = \theta_{koi}
& \forall k \in \mathcal{K}; o \in \mathcal{O}; i \in \mathcal{I}_k \label{eqTP0}\\
& p^{'w}_{koie} = p^w_{koi(e-1)} -
\sum_{\substack{t \in \mathcal{T} \\ t \ge AV_{ko}}}
\sum_{\substack{c \in \mathcal{C} \\ \sum_{b \in \mathcal{B}_c} G_{kb} > 0}}
z^1_{koi(e-1)tc} -
\zeta_{koi(e-1)} +
\sum_{\substack{i' \in \mathcal{I}_k\\ i' = i+1}}
\zeta_{koi'(e-1)} & \nonumber \\
& & \forall k \in \mathcal{K}; o \in \mathcal{O}; i \in \mathcal{I}_k; e \in \mathcal{E}_k; e > 0 \label{eqTP1}\\
& \zeta_{koie} \leq p^w_{koie} -
\sum_{\substack{t \in \mathcal{T} \\ t \ge AV_{ko}}}
\sum_{\substack{c \in \mathcal{C} \\ \sum_{b \in \mathcal{B}_c} G_{kb} > 0}}
z^1_{koietc}
& \forall k \in \mathcal{K}; o \in \mathcal{O}; i \in \mathcal{I}_k; e \in \mathcal{E}_k; e > 0 \label{eqTP2}
\end{flalign}
\end{document}
我当前的代码产生以下结果:
答案1
你可以用负空间隐藏宽度
\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{amsmath}
\begin{document}
\begin{flalign}
& p'^{w}_{koi0} = \theta_{koi}
& \forall k \in \mathcal{K}; o \in \mathcal{O}; i \in \mathcal{I}_k \label{eqTP0}\\[4pt]
& p'^{w}_{koie} = p^w_{koi(e-1)} -
\sum_{\substack{t \in \mathcal{T} \\ t \ge AV_{ko}}}
\sum_{\substack{c \in \mathcal{C} \\ \sum_{b \in \mathcal{B}_c} G_{kb} > 0}}
z^1_{koi(e-1)tc} -
\zeta_{koi(e-1)} +
\sum_{\substack{i' \in \mathcal{I}_k\\ i' = i+1}}
\zeta_{koi'(e-1)}\hspace{-\textwidth} & \nonumber \\
& & \forall k \in \mathcal{K}; o \in \mathcal{O}; i \in \mathcal{I}_k; e \in \mathcal{E}_k; e > 0 \label{eqTP1}\\[4pt]
& \zeta_{koie} \leq p^w_{koie} -
\sum_{\substack{t \in \mathcal{T} \\ t \ge AV_{ko}}}
\sum_{\substack{c \in \mathcal{C} \\ \sum_{b \in \mathcal{B}_c} G_{kb} > 0}}
z^1_{koietc}
& \forall k \in \mathcal{K}; o \in \mathcal{O}; i \in \mathcal{I}_k; e \in \mathcal{E}_k; e > 0 \label{eqTP2}
\end{flalign}
\end{document}
我也避免使用双上标素数,p'^{w}
而不是p^{'w}