Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a question on how is it possible to create a \sum with two lower limits directly positioned right underneath each other. I have tried hard and cant seem to get anywhere with it.

share|improve this question

3 Answers 3

up vote 10 down vote accepted

I like it better when the i and j are aligned:

This is done by \mathrlap and \mathclap (see this TuGboat article). The article describes the use of some new macro's, including:

\def\mathrlap{\mathpalette\mathrlapinternal} 
\def\mathclap{\mathpalette\mathclapinternal}
\def\mathllapinternal#1#2{\llap{$\mathsurround=0pt#1{#2}$}}
\def\mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}

add these to your preamble (or load the mathtools package) and you can do something like this:

\[
\sum\limits_{\substack{\mathllap{1\le} i \mathrlap{\le 10} \\ \mathllap{1 \le} j \mathrlap{\le 5}}}^\infty x^i y^j
\]

which produces, in my opinion, a far superior result:

example

Note that I've added the upper limit \inftyas an example, although I don't see how i and j would be smaller than 10 of 5 and still run up to ininity (ah well, it's just an example).

share|improve this answer
2  
maybe it should also be said that the \mathclap etc... macros (or some slightly improved version of them, according to the doc) are available via the mathtools package? –  jfbu May 1 '11 at 7:53
    
ok yes, I didn't know that myself (I only skimmed the article once), great tip! –  romeovs May 1 '11 at 7:56
\documentclass[12pt]{article}
\usepackage{mathtools}
\begin{document}

\[
  \sum_{\substack{1 \le i \le 10\\ 1 \le j \le 5}}^\infty x^{i} y^{j} \qquad
  \sum_{\mathclap{\substack{1 \le i \le 10\\ 1 \le j \le 5}}}^\infty x^{i} y^{j}
\]  

\end{document}

enter image description here

see also http://www.ctan.org/info/math/voss/mathmode/Mathmode.pdf

share|improve this answer
1  
Thanks a ton. I never knew of this command. Could you please edit your answer to show how to also inlcude the top limit, say "infinity". –  night owl May 1 '11 at 6:00
    
@night owl: it is done as usual, see edit –  Herbert May 1 '11 at 6:30
    
you didn't update the image, so perhaps mention that \infty will indeed appear. –  Bruno Le Floch May 1 '11 at 6:52

Use \substack, as in

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\thispagestyle{empty}

\begin{equation}
  \sum_{\substack{1 \le i \le 10\\ 1 \le j \le 5}} x^{i} y^{j}
\end{equation}

\end{document}

which produces: enter image description here

share|improve this answer
    
Thank You. Looks good. –  night owl May 1 '11 at 6:01

Your Answer

 
discard

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.