[Tex/LaTex] multi character subscript in a superscript

subscriptssuperscripts

How to put a subscript in a superscript Shows hows to write simple subscript to a superscript like this \sum_{w=0}^{w_i}f(x) and that works.

What I need is a complex subscript. Like \sum_{w=0}^{w_max}f(x) which will only subscript the m in the max.

Then I tried the obvious fix of nested curly braces, \sum_{w=0}^{w_{max}}f(x) but that fails to render anything. The whole expression disappears.

I'm trying it on mediawiki math markup (which uses LaTeX as the engine).

Is there any way to achieve this?

Found some more info.

The issue seems to be with using MathML. On MediaWikis if you go to Preferences->Appearance and pick PNG as the backend instead of MathML, then it shows up properly. Unfortunately in a not so smooth not-antialiased PNG picture.

Sigur actually answered my question! sum_{w=0}^{w_{\max}}fx seems to fix it! Notice the added slash \.

Best Answer

If you don't want "max" to appear in italic, simply enclose it in \text{}

\documentclass[preview]{standalone}
\usepackage{mathtools}

\begin{document}

    \begin{equation*}
        \sum_{w=0}^{w_{\text{max}}}f(x) 
    \end{equation*}

\end{document}

enter image description here