How do I align summation signs instead of their subscripts?
I would avoid so long subscripts, breaking them into two lines.
You can get the alignment with the help of eqparbox
; the first argument to \mathbox
is a unique identifier, which must be different for every usage.
I'd also use alignat
, in order to avoid excessive space between the equation and the related condition.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{eqparbox}
\newcommand{\mathbox}[3][\mathop]{%
#1{\eqmakebox[#2]{$\displaystyle#3$}}%
}
\begin{document}
\begin{alignat}{2}
\mathbox{A}{\sum_{\substack{j\in\mathcal{V}' \\ (i,j)\in\mathcal{A}}}}x_{ij}^E
&\le 1,
&\qquad& \forall i \in \mathcal{R}',\\
\mathbox{A}{\sum_{\substack{i\in\mathcal{N}_E\setminus\mathcal{N}_{342} \\ (i,j)\in\mathcal{A}}}} x_{ij}^E
&= 0
&\qquad& j \in \mathcal{R}_s',
\end{alignat}
\end{document}
You can use \smashopeorator[l]{...}
from mathtools
for this.
Here I've aligned on the sums, the \le,=
and the consitions, using alignat
for better spacing.
Note also that I use \setminus
not \backslash
. \setminus
has proper status (don't remember if it is a binary operation), whereas \backslash
is a normal symbol (aka no automatic spacing).
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,mathtools}
\begin{document}
\begin{alignat}{3}
&\smashoperator[l]{\sum_{j \in \mathcal{V}': (i,j) \in \mathcal{A}}}
x_{ij}^E &\le 1, &\qquad& \forall i \in \mathcal{R}',\\
&\smashoperator[l]{\sum_{i \in \mathcal{N}_E \setminus
\mathcal{N}_{342}: (i,j) \in \mathcal{A}}}
x_{ij}^E &= 0 && j \in \mathcal{R}_s',
\end{alignat}
\end{document}