# How to make a nice fraction in subscript?

I wrote

$$M_{\frac{1}{2}}= ...$$


but it doesn't look very nice. fraction is too small and and "tight", and when I add \dfrac that is too big. Any solution for this ?

• Hope you don't mind my edit, "subscript" seemed a more appropriate word than "index". – Torbjørn T. May 22 '17 at 13:30
• There is \nicefrac in the units package... – user121799 May 22 '17 at 13:31
• @marmot i tried that but then it looks like 1/2 and I don't want that – Bonnie May 22 '17 at 13:40
• you haven't provided a full example so can not see what it looks like for you but if using the default fonts at the default size I would use M_{\frac{1}{2}} or (depending on the meaning) M_{0.5} – David Carlisle May 22 '17 at 13:45
• I prefer $M_{1/2}$. – JPi May 22 '17 at 14:25

Don't forget nicefrac. And, as erik notes, \sfrac of the xfrac package. Finally, I added a \scriptscriptstyle\frac{}{}.

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{nicefrac,xfrac}
\begin{document}
\begin{align*}
M_{\nicefrac{1}{2}}&= \text{ nicefrac}\\
M_{\sfrac{1}{2}}&= \text{ sfrac}\\
M_{\scriptscriptstyle\frac{1}{2}}&= \text{ \texttt{scriptscriptstyle frac}}
\end{align*}
\end{document}


• Or \sfrac{1}{2} from the xfrac package. – erik May 22 '17 at 14:56
• The kerning looks off in the sfrac example. I'm puzzled. – ShreevatsaR May 22 '17 at 18:22

You have several options:

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{textcomp}
\begin{document}

\begin{align*}
M_\text{\textonehalf}&= ... \text{ The smallest}\\
M_{\frac{1}{2}}&= ... \text{ Normal \texttt{frac}} \\
M_{\tfrac{1}{2}}&= ... \text{ In-between, \texttt{tfrac}}\\
M_{\dfrac{1}{2}}&= ... \text{ Displaystyle \texttt{dfrac}} \\
M_{1/2}&= ... \text{ Inline}
\end{align*}

\end{document}