# Alignment problem, stacking

Hello, everyone!

Numberphile has this great video on Euler's constant, and I would like to replicate one of the ways to get e.

So far I managed to come this far, but I don't know how to create the arrow and infinity under the n.

PS. I only have the base package of LaTeX.

• I think the correct way is \lim\limits_{n \to \infty}, not just n \to \infty (all in math mode, of course) – user31729 Dec 30 '16 at 18:03
• @ChristianHupfer - You beat me by a few seconds to this comment. :-) – Mico Dec 30 '16 at 18:04
• Thank you very much Christian and Mico! I am quite new to LaTeX :-) – JC123 Dec 30 '16 at 18:05
• @Mico, well, finally I beat you in ... something. I bet, Steven will come up with some stacking ;-) – user31729 Dec 30 '16 at 18:05
• @ChristianHupfer Yes. It is just that the fraction shown is also in \displaystyle, so I figured that was the mode. – Steven B. Segletes Dec 30 '16 at 18:10

The correct way for typing would be \lim_{n\to\infty} in displaystyle mode or \lim\limits_{n\to\infty} if not in displaystyle mode (the \limits command does no harm in displaystyle mode, however)

Please note the difference for the fraction as well, if not shown in displaystyle.

\documentclass{article}

\begin{document}

$\lim\limits_{n\to\infty} \left( 1 + \frac{1}{n}\right)^n = e$

$\lim_{n\to\infty} \left( 1 + \frac{1}{n}\right)^n = e$

\end{document}


• I've omitted the case for non-displaystyle... that does not look nice for \lim in my point of view – user31729 Dec 30 '16 at 18:20

This seems like short hand notation for limits. Here's one options using a text-style fraction without a rule (thanks to \genfrac):

\documentclass{article}

\usepackage{amsmath}

\newcommand{\shlim}[2]{\genfrac{}{}{0pt}{1}{#1}{\rightarrow #2}}

\begin{document}

$\shlim{n}{\infty} \bigl( 1 + \tfrac{1}{n} \bigr)^n$

\end{document}


Using \lim_{n \rightarrow \infty} seems more widely accepted though.