placing subscript under \max in \frac

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
\max_i\frac{1}{\max_i}
\end{align}

\end{document}


results in i beeing placed as intended outside \frac, but not beeing placed under the max operator inside the fraction. How can this be fixed?

• Welcome to TeX.SX! Your document does not compile. It misses either amsmath or mathtools package – user31729 Mar 11 '15 at 10:28
• Added amsmath package. Thanks for the hint. – Twonky Mar 11 '15 at 10:43

I found a solution using

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\frac{1}{\max\limits_i}
\end{align}
\end{document}

• Alternately, one could use \frac{1}{\displaystyle\max_i}. The issue is that inside a \frac, things are not, by default \displaystyle (equation style) but instead \textstyle (inline style). One must explicitly tell the \frac argument to present itself in \displaystyle. – Steven B. Segletes Mar 11 '15 at 10:38
• You can make your post display as text by indenting it 4 characters, or alternately by highlighting it in the edit box and clicking the {} symbol above the box. As SoundsOfSilence noted, you should provide complete working code. I have edited your answer to do so. – Steven B. Segletes Mar 11 '15 at 10:41
• Whoever downvoted this answer, please give the first-time poster some slack, as it is clear that Twonky is posting in good faith. Be a coach, not a law-enforcement officer. – Steven B. Segletes Mar 11 '15 at 10:47