I am trying to align several limit expressions at varying x-values. It seems that align treats the "limit" portion together with its subscript as an entire object, then aligns these limits, which produces expressions aligned at "x" rather than "lim":

```
\documentclass[reqno,12pt]{article}
\usepackage{amsmath,amssymb,amsthm}
\addtolength{\jot}{3em}
\begin{document}
\begin{flalign*}
&\lim_{x \to -2} x =&\\
&\lim_{x \to -1} x =&\\
&\lim_{\phantom{-}x \to 0} x =&\\
&\lim_{\phantom{-}x \to 1} x =&\\
&\lim_{\phantom{-}x \to 2} x =&\\
&\lim_{\phantom{-}x \to \infty} x =&\\
&\lim_{x \to -\infty} x =&
\end{flalign*}
\end{document}
```

I've tried to place the align marker in other places, and also fudge it using phantoms, (which isn't nice but much better than without). Is there a way around this so that each expression aligns at "l" in "lim"?

## Best Answer

Many thanks for posting a full MWE.

Rather than redefine

`\lim`

directly to handle your special alignment objective, it is preferable to define a new command called, say,`\mylim`

. Modifying directly the ways that LaTeX use to place the argument of a "math operator" such as`\lim`

may end up breaking all kinds of things...The

`\mylim`

macro defined below takes two arguments: the item that the limit is taken over, and the subscript argument of`\lim`

. Note that the arguments are encased in curly braces -- no subscript symbol is used. In the example code below, the outer`array`

environment and the vertical bar are used merely to illustrate that "lim" and the subscript argument are both aligned flush-left.Addendumto address the OP's follow-up question: If the objective is to make LaTeX ignore -- for the purpose of horizontal alignment, that is -- whatever may be in the subscript below "lim", while still centering that material below "lim", you could make use of the comment provided by @daleif and employ the`\smashoperator`

macro of the mathtools package:If you have a lot of these expressions and wish to economize on typing (and reduce the number of typos...), you could define a shortcut macro, e.g.,

and then type

`\nlim{x\to-2} f(x)`

. Note that if the material in the subscript is sufficiently wide, it will "protrude" into the space to the leftandto right of "lim". I think two-sided protrusion is what you're after. However, if you want the subscript material to protrude only on the left but not on the right, use the option`[l]`

, i.e., writeA comment on the

aestheticsproduced by`\mylim`

and`\nlim`

: If you're going to make the effort to align various rows on the string "lim", you shouldn't risk marring the overall look by letting lim's subscript material protrude to the left of the string. In my opinion, then, you should go with`\mylim`

rather than with`\nlim`

to achieve your alignment objective.