我写
\begin{equation}
M_{\frac{1}{2}}= ...
\end{equation}
但看起来不太好看。分数太小而且“紧”,而当我添加时\dfrac
它又太大了。有什么解决办法吗?
答案1
别忘了nicefrac
。而且,正如 Erik 所说,\sfrac
还有xfrac
包。最后,我添加了\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}
答案2
您有多种选择:
\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}