I am trying to get the subscript in both summations in the following equation centered under the summation symbol:
\displaystyle \Phi(H) = \min { \sum_{\substack{i \in S \\ j \notin S}} w_{ij} \over {\sum_{\substack{i \in S}} \pi_i} }
I have reached the above syntax result, which compiles without error but doesn't output what I am looking for, by following the links below:
Sums in math mode: how to display index under the sigma sign?
Separate long math text under sum symbol into different lines?
\limits
doesn't seem to work, i.e the expression:
\[ \displaystyle \Phi(H) = \min { \sum_{\limits{\substack{i \in S \\ j \notin S}}} w_{ij} \over {\sum_{\limits{i \in S}} \pi_i} } \]
gives the following error message: Limit controls must follow a math operator
If possible, I would like this to work for both inline and displayed formulas
$$
or\over
in latex, both are tex primitives which are somewhat hard to disable but should never be used in latex documents.\limits
has to follow an operator so\sum\limits_{...}