LaTeX forum ⇒ LaTeX Beginner's GuideVertically aligning limits of consecutive math operators

Questions and answers about the LaTeX Beginner's Guide
Reader

Vertically aligning limits of consecutive math operators

Postby Reader » Wed Oct 06, 2021 5:04 pm

Near the end of Chapter 9, Writing Math Formulas, it's mentioned that with the mathtools package we can align limits of consecutive math operators vertically.

Do you have an example how to do that?

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Stefan Kottwitz
Site Admin
Posts: 10068
Joined: Mon Mar 10, 2008 9:44 pm

Vertically aligning limits of consecutive math operators

Postby Stefan Kottwitz » Wed Oct 20, 2021 11:55 pm

Here is an example taken from the LaTeX Cookbook, Chapter 10, Advanced Mathematics:

\documentclass[border=10pt,preview]{standalone}
\usepackage{dsfont}
\begin{document}
\[
  \lim_{n\to\infty} \sup_{x\in\mathds{R}} f_n(x^2)
  < n \Big(\sum_{x\in\mathds{R}, n\in\mathds{N}}
  \big| f_n(x^2) \big| \Big)
\]
\end{document}


We get:

inequality.png
inequality.png (14.04 KiB) Viewed 4664 times


Now we load the mathtools package, use the \adjustlimits command right before the \lim operator, insert \smashoperator to remove that big white space before \sum, and change x^2 to \cramped{x^2} to slightly lower the exponent, at both places:

\documentclass[border=10pt,preview]{standalone}
\usepackage{dsfont}
\usepackage{mathtools}
\begin{document}
\[
  \adjustlimits\lim_{n\to\infty} \sup_{x\in\mathds{R}}
    f_n(\cramped{x^2})
    < n \Big( \smashoperator{\sum_{x\in\mathds{R},
    n\in\mathds{N}}}
    \big\lvert f_n(\cramped{x^2}) \big\rvert \Big)
\]
\end{document}


We get:

finetuned.png
finetuned.png (12.5 KiB) Viewed 4664 times


You can see that the limits onm the left side have been adjusted vertically, and some more mentioned finetuning. The mathtools manual gives further information.

Stefan


Last bumped by Anonymous on Wed Oct 20, 2021 11:55 pm.
LaTeX.org admin


Return to “LaTeX Beginner's Guide”

Who is online

Users browsing this forum: No registered users and 2 guests