# Typesetting \prime vs '

I'm trying to figure out how to best typeset primed values. It seems that, e.g.

$f'$ and $f\prime$ give off a slightly different result:

I like the right ($a\prime$) version better, but I'm not sure if that's correct.

EDIT after going over my preamble, I found the "culprit" - it was the package unicode-math, which I added to be able to use \Colon. After removing it, my primes rendered exactly like in Mico's answer.

• Unicode-math changes the math font to Latin Modern Math. You can select any other math font whose primes you like better, or even \setmathfont[range=\prime]. – Davislor Jan 28 '19 at 5:15

It seems that, e.g. $f'$ and $f\prime$ give off a slightly different result

First off, the item on the left-hand side of the screenshot you posted does not appear to have been created by either $f'$ and $f\prime$ -- at least not by either TeX or LaTeX. See also the screenshot below and the associated LaTeX code.

The item on the right-hand side could have been created by either $f'$ or $f^{\prime}$, since the two methods are entirely equivalent.

In math mode, x' and x^{\prime} are equivalent. The former is a lot easier to type, though. This becomes especially evident for higher-order derivatives: Speaking for myself, I'd much rather type $f'''$ than $f^{\prime\prime\prime}$.

\documentclass{article}
\begin{document}
$f' \quad f^{\prime} \quad f\prime$
\end{document}

• @IgalTabachnik - That's a rather complex and complicated preamble, by the way. I harbor some doubts that it has to be so complex... – Mico Oct 10 '17 at 7:58
• You may be right :) I'm trimming it a bit as I go. It was originally a preamble used for a Texinfo/LaTeX version of SICP I found github.com/sarabander/sicp-pdf – Igal Tabachnik Oct 10 '17 at 7:59
• @IgalTabachnik I would recommend starting with an empty preamble and building it up as you go. – Teepeemm Oct 10 '17 at 14:28
• @IgalTabachnik - Great news: After you provided the comment that unicode-math was the likely source of the issue, some four hours ago, I contacted the maintainer of the unicode-math package, and he's already provided a bug fix and pushed it out to TeXLive! (Not sure when the fix will show up on MikTeX, in case that's what you're using.) If you update your TeX distribution to version 0.8h of unicode-math, the \prime directive should once again work. Isn't this a great community or what?! (Of course, I still think that writing $y'$ is more convenient than $y^{\prime}$...) – Mico Oct 10 '17 at 23:10
• @Mico that is incredible! Even a better resolution I could have hoped for! I'm using MacTeX, if that matters. Again, thanks so much, this is indeed a great community, and will go to the acknowledgments section :) – Igal Tabachnik Oct 11 '17 at 4:39