# Subscript of math operator not appearing properly in fraction

Here is the code I have:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
\lambda=\frac{\operatornamewithlimits{\max}_{\theta \in \Omega_0}L(\theta)}{\operatornamewithlimits{\max}_{\theta \in \Omega}L(\theta)}
\end{equation*}

\end{document}


And this is what I get:

The subscript appears in the fraction after "max" instead of below "max". I've tried to put the expression with the subscript outside the fraction and the subscript appears bellow "max". Why does that happens? How can I get this:

You can get this by putting \limits after \max and dropping the \operatornamewithlimits. But you really shouldn't. This is done on purpose so that your fractions don't get too large, and, imho, the result with \limits looks weird.

Nevertheless, this is how you could get it:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
\lambda=\frac{\max\limits_{\theta \in \Omega_0}L(\theta)}{\max\limits_{\theta \in \Omega}L(\theta)}
\end{equation*}

\end{document}


• Thank you for the advice! Dec 5, 2020 at 20:10