# Align subscripts vertically

I would like to align the subscripts in an expression such as this one:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\sup_{f\in\mathcal H}\lim_{\epsilon\downarrow 0}\sup_{g\in\mathcal H,0<\|g\|<\epsilon} \text{something}$$
\end{document}


This is how it looks like:

and I'd like the \epsilon \downarrow 0 to be on the same line as the other two subscripts.

-
Very much related: Supremum of the infimum (possible duplicate). – Hendrik Vogt Mar 27 '13 at 13:41

The mathtools package provides a trick for this:

\documentclass{article}
\begin{document}
$\adjustlimits\sup_{f\in\mathcal{H}}\lim_{\epsilon\downarrow 0}\sup_{g\in\mathcal{H},0<\|g\|<\epsilon} \text{something}$
\end{document}


The \adjustlimits command should precede a pair of operators where you want the subscripts to be aligned.

Alternatively, you can define a new operator to be used in cases like these:

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\plim}{lim\vphantom{p}}

\begin{document}
$\sup_{f\in\mathcal{H}}\plim_{\epsilon\downarrow 0}\sup_{g\in\mathcal{H}, 0<\|g\|<\epsilon} \text{something}$
\end{document}


About avoiding $$ in LaTeX, please see Why is $…$ preferable to $$?

Also it's preferable to write \mathcal{H} with braces, to make clearer what symbol is involved.

-
Thanks a lot! for the $$', it was just for the MWE :-) – tibL Mar 19 '13 at 19:40 I set \arraystretch outside of the environment, so it will affect everything, but I understand it can also be set inside the environment for local effect. \documentclass{article} \usepackage{scalerel} \usepackage{amsmath} \begin{document} Was:$$\sup_{f\in\mathcal H}\lim_{\epsilon\downarrow 0}\sup_{g\in\mathcal
H,0<\|g\|<\epsilon} \text{something}

Is:
\renewcommand\arraystretch{0.6}
\setlength\arraycolsep{0.3ex}
$\begin{array}{cccl} \sup & \lim & \sup & \text{something}\\ \scriptstyle f\in\mathcal H & \scriptstyle \epsilon\downarrow 0 & \scriptstyle g\in\mathcal H, 0<\|g\|<\epsilon & \\ \end{array}$

\end{document}


-
Are you really sure? – egreg Mar 19 '13 at 11:23
@egreg p.185 LaTeX User Guide & Reference Manual: "The following style parameters can be changed anywhere outside an array... They can also be changed locally within an item, but the scope of the change should be explicitly delimited by braces or an environment... \arraystretch`" – Steven B. Segletes Mar 19 '13 at 11:27
@egreg: Thank you for teaching me something today. I appreciate it. – Steven B. Segletes Mar 19 '13 at 12:11