LaTeX/Two-lined-subscripts

If you want to write a large sum like$$\sum_{i<j ; m\in\mathbf{Z} ; d\in\mathcal{N}}$$ you may want to break the summand into two lines. The problem with \\ or \newline is that they work only in the paragraph mode.

In latex, we can do that by $$ \mathop{\sum_{i<j ; m\in\mathbf{Z}}}_{d\in\mathcal{N}} $$

Or, to do this in-line instead of displayed,

$\displaystyle \mathop{\sum_{i<j ; m\in\mathbf{Z}}}_{d\in\mathcal{N}} $

Here is another solution.