答案1
答案2
upquote 包将满足您的需求。这里有四种变体。我个人偏爱前两种,但您似乎更喜欢后两种中的一种。
\documentclass{article}
\usepackage{amsmath}
\usepackage{upquote}
\begin{document}
\[
f(x) = x^2 \quad f'(x) = 2x
\]
\[
f(x) = x^2 \quad f^\prime(x) = 2x
\]
\[
f(x) = x^2 \quad f^{\verb!'!}(x) = 2x
\]
\[
f(x) = x^2 \quad f^\text{\textquotesingle}(x) = 2x
\]
\end{document}