我写了$\sqrt{n^{\frac{number of factors of n}{2}}}$
,但“n 的因子数”变成了斜体。有人能帮忙吗?谢谢
答案1
我会避免在公式中使用这样的文字。无论如何,这里有三种实现,按“丑陋-糟糕-良好”的顺序排列。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
A not very nice formula that's rather difficult to read
\[
\sqrt{n^{\frac{\textup{number of factors of $n$}}{2}}}
\]
Let's try to improve it by using a slashed fraction
\[
\sqrt{n^{(\textup{number of factors of $n$})/2}}
\]
but really you should define $d(n), ν(n), τ(n) or σ_0(n)$ to be the number of factors of $n$
and type your formula as
\[
\sqrt{n^{σ_0(n)/2}}=\sqrt[4]{n^{σ_0(n)}}
\]
\end{document}
答案2
答案3
并且没有任何包装:
\documentclass[12pt]{article}
\begin{document}
$\sqrt{n^{\frac{\mbox{\tiny number of factors of } n}{2}}}$
\end{document}
或者
\documentclass[12pt]{article}
\begin{document}
$\sqrt{n^{\frac{\mathrm{number~of~factors~of~}n}{2}}}$
\end{document}