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?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityPossible 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?
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.
\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}
\substack
content is too wide, you can use \mathclap
, as detailed in This answer
Nov 27, 2014 at 16:44