# How to add text under symbol in equation ?

I was trying to make something like this

(something similar to \substack in \sum) in equation. How to do this ?

-
add comment

## 3 Answers

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

\documentclass{article}

\begin{document}

Display mode: $\max_{1 \leq j \leq n}$

Inline mode: $\max_{1 \leq j \leq n}$, $\max\limits_{1 \leq j \leq n}$.

\end{document}


Note how I used \limits to force the subscript under the operator in inline mode (if you think you need \limits, think again — maybe the defaults look better after all!).

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

-
ah thanks, I thought it was limited to \sum command only. Silly me. –  Yumyai Mar 11 '11 at 10:07
add comment

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

-
add comment

I would solve it like this:

\documentclass{scrartcl}
\usepackage{amsmath}
\begin{document}
$\max\limits_{1\leq j\leq n}$
\end{document}

-
In display math, there's no need to use \limits. –  Hendrik Vogt Mar 11 '11 at 9:07
@Hendrik Vogt: That's good to know. –  meep.meep Mar 11 '11 at 9:12
add comment