167

Possible Duplicate:
Separate long math text under sum symbol into different lines?

I want to write expression \sum_{i=0}^n i with i\neq 4 under the summation symbol. How can I write this?

0

1 Answer 1

248

You can use \substack:

If this is desired in inline math you can use \limits to obtain the limits underneath the summation symbol:

However this is not recommended as it may not look good depending on how much adjacent text there is as it will affect interline spacing.

Code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
  \sum_{\substack{i=0 \\ i\neq 4}}^n i
\]

In inline math: $\sum_{\substack{i=0 \\ i\neq 4}}^n i$, or
$\sum\limits_{\substack{i=0 \\ i\neq 4}}^n i$
\end{document}
3
  • 7
    If the \substack content is too wide, you can use \mathclap, as detailed in This answer Commented Nov 27, 2014 at 16:44
  • Will it work for \underset{}{} as well using \text{} inside?
    – Royi
    Commented Mar 23, 2018 at 21:52
  • 1
    @Royi: Probably best to ask a new question with a MWE that reproduces the problem you are having. Commented Mar 24, 2018 at 0:43

Not the answer you're looking for? Browse other questions tagged .