Inside an align environment I have a \lim with two variables which should be displayed in two lines:

f & = \lim _ {a \rightarrow -\infty \linebreak b \rightarrow \infty} ... \\

Currently there is no line break where I want to have one; it's displayed in one line. How can I force a line break there? \linebreak is ignored and \\ breaks the align environment.


Use substack to specify the two variables.

As egreg pointed out you can also use subarry and the last two solutions provided use this. The last one also account for the fact that the a and b don't take up the same amount of space, and create a box the width of an x and centers the a and b within that amount of space.

enter image description here

Also, in this case it is better to use \to instead of \rightarrow as that better represents the mathematical sense here.


 \lim _{\substack{a \to -\infty \\ b \to \infty}} =
 \lim _{\begin{subarray}{l} a \to -\infty \\ b \to \infty \end{subarray}} =
 \lim _{\begin{subarray}{l} \AlignChar{a}  \to -\infty \\ \AlignChar{b} \to \infty \end{subarray}}

As per egreg's comments, you could also write:


which would make that macro easier to read, but my personal preference is to use \ensuremath as that to me explicitly captures the fact that it can be used in mode. In this case, the reason that $...$ is ok is that \makebox enters text mode so you can use $..$ or \ensuremath inside it.

  • Or, maybe better, \lim _{\begin{subarray}{l} a \to -\infty \\ \hphantom{a}\to \infty \end{subarray}} – egreg Oct 7 '11 at 21:27
  • @Peter: Are you missing a "b" before the second "\rightarrow"? (see also Werner's answer...) – Mico Oct 7 '11 at 23:10
  • @Mico: Thanks. Have corrected it, and also took that opportunity to enhance the solution. – Peter Grill Oct 7 '11 at 23:41
  • Why \ensuremath? Wouldn't $\scriptstyle#1$ be easier to read? – egreg Oct 8 '11 at 10:07
  • @egreg: Thanks for pointing that out. Have added it to the solution. – Peter Grill Oct 8 '11 at 15:01

Here is a, perhaps less attractive, alternative to stacking limits to operators by using \mathop:

\usepackage{amsmath}% http://ctan.org/pkg/amsmath
f & = \mathop{\lim_{a\rightarrow-\infty}}_{b\rightarrow\infty}
  • thank you, maybe i need this at other points, here i'll use the stacking ;) – Florian Oct 7 '11 at 18:59
  • @Werner: Are you missing a "b" before the second "\rightarrow"? (Same issue as in Peter's answer...) – Mico Oct 7 '11 at 23:11
  • @Mico: Is it that obvious that I copied the MWE from Peter? :) – Werner Oct 7 '11 at 23:13
  • 3
    @Werner - A separate matter: I really admire your habit, in your answers, of providing each package's source URL as a comment. Great help for beginning LaTeXers, for sure! – Mico Oct 7 '11 at 23:19
  • 1
    A hah, now we know where you get your solutions. :-) :-) – Peter Grill Oct 7 '11 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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