TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a way to show \sum limits partially in inline mode and partially in display mode? i.e., I want to write

\sum_{n=-\infty}^{+\infty} [...]

but this way the lower limit is too wide, and I don't like it. So I was hoping to write something like this:

\sum_{-\infty}^{+\infty}\nolimits_{n} [...]

to write the index n on the right side of the sum symbol, while the limits of the summation remain above and below.

Of course it doesn't work, LaTeX is pissed because there is a double subscript. Anyone knows if it's possible to do what I want to?

share|improve this question

migrated from stackoverflow.com Jan 5 '13 at 12:45

This question came from our site for professional and enthusiast programmers.

up vote 27 down vote accepted

In this instance a better approach would be to use mathtools's \mathclap, which provides a centred overlap in math mode. The centred overlap implies a zero-width box containing stuff that overlaps on the left and right:

enter image description here

\usepackage{mathtools}% http://ctan.org/pkg/mathtools
  A &= \sum_{n=-\infty}^{+\infty} f(x) \\
  B &= \smashoperator[r]{\sum_{n=-\infty}^{+\infty}} f(x) \\
  C &= \sum_{\mathclap{n=-\infty}}^{+\infty} f(x) \\
  D &= \sum_{\substack{n={}\\-\infty}}^{+\infty} f(x) \\
  E &= \sum_{-\infty}^{\infty}\mathop{}_{\mkern-5mu n} f(x)

Sure mathtools also loads amsmath, but both these provide excellent tools in terms of typesetting mathematical content (and otherwise).

To add multiple things under a math operator (like \sum), see How do you put multiple things under a limit?, which suggests \substack (as I've done in the last horrible visual).

share|improve this answer
If you asked me, I vote for option no. 2. – yo' Jan 5 '13 at 13:13
@Werner: perfect! Thank you :) – Ganondolf Jan 6 '13 at 7:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.