138

I would like to put some text in math mode below a mathematical operator (or a symbol), similar to \substack in \sum, as the red text below the \max operator in the following image

example subscript

How to do this?

4 Answers 4

103

You should place the expression in the subscript, as shown below. Most LaTeX books explain this. E.g.

\documentclass{article}

\begin{document}
\begin{itemize}
    \item \textbf{Display mode}:
        \[\max_{1 \leq i \leq N}\]
    \item \textbf{Inline mode}: version without \verb!\limits! would look like \(\max_{1 \leq i \leq N}\), version with \verb!\limits! would look like\(\max\limits_{1 \leq i \leq N}\) inside a text.
\end{itemize}
\end{document}

output of code

Note how \limits command force the subscript under operator in inline mode (if you think you need \limits, think again — maybe the defaults look better after all! cf. this answer here on TeX.se).

If you find that the subscripted expression is too long and introduces excessive whitespace, you could use \smashoperator macro from the mathtools package, as in this post.

1
  • 1
    ah thanks, I thought it was limited to \sum command only. Silly me.
    – Yumyai
    Mar 11, 2011 at 10:07
106

Solved this for Inline mode by using $\underset{1 \leq j \leq n}{\max}$, however this approach requires the amsmath package.

3
  • 10
    This is particularly useful when using user defined operators. $\operatorname{Res}\limits_{z=z_{0}}$ will not give you the desired result, whilst $\underset_{z=z_{0}}{\operatorname{Res}}$ will. Oct 23, 2014 at 17:56
  • 2
    This is also useful when you want to put a subscript under something LaTeX doesn't think is a math operator (like that's a meaningful distinction), and therefore prevents the use of \limits. Nov 14, 2014 at 14:45
  • 11
    @AlfredoHernández I think \operatorname* is the way to go for \limits-compatible custom math operators. Feb 21, 2016 at 20:01
13

I would solve it like this:

\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}  
\[
    \max\limits_{1\leq j\leq n}
\]  
\end{document}
1
  • 10
    In display math, there's no need to use \limits. Mar 11, 2011 at 9:07
1

As someone suggest above. We should use \underset command:

\underset{1\leqslant j\leqslant n}{max}.

\underset{\substack{\rho\to 0\\ n\to\infty}}{l.i.m.} 

(for my question above).

1
  • 2
    I try to format code in your answer, however it suggest strange solution with wrong typography. Also is not clear what you mean with "(for my question above)." so I suggest to delete it.
    – Zarko
    May 14, 2021 at 3:02

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.