I'm using unicode-math
(with XeLaTeX) to set my text and math fonts. However, using Garamond-math
as a math font, I see the \prime
symbol is too close to the letter:
I am trying to redefine the \prime
command, and if possible I would like to remap '
in math mode so that it gives the correct spacing. However, the "usual" solution to redefine \prime
, that is (MWE)
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Garamond-Math.otf}[StylisticSet={5,7,9}]
\let\originalprime\prime
\def\prime{\mkern3mu\originalprime\mkern-3}
\begin{document}
$f'(x)$
\end{document}
but this solution does not seem to work in this context. I also tried
\usepackage{newunicodechar}
\AtBeginDocument{\newunicodechar{′}{\mkern3mu\prime\mkern-3u}}
but again it had no effect.