10

I wrote

\begin{equation}
M_{\frac{1}{2}}= ...
\end{equation}

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 ?

6
  • 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
  • 3
    I prefer $M_{1/2}$. – JPi May 22 '17 at 14:25
13

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}

enter image description here

2
  • 1
    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
17

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}

[1]: https://i.stack.imgur.com/6LY

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.