I cannot seem to be able to create a prime (') in any custom font. This, for example
\documentclass{article}
\usepackage{unicode-math, polyglossia}
\setmainfont{Times New Roman}
\setmathfont[range=\mathit/{latin,Latin}]{timesi.ttf}
\begin{document}
Hello, I want A-prime:
$$A^\prime.$$
\end{document}
gives "Undefined control sequence [ $$A^\prime]"
error. I've tried A'
, A\prime
, A^\prime
, none works. Without the \setmathfont command, xelatex works fine, outputting the expected A' in the standard CM font. I found this: What is the right way to input prime with Unicode-math (LuaTeX backend) from 3 years ago, but they are concerned about the correct placement of prime, whereas for my example xelatex won't even recognise such command exists. I'd sure be grateful for any pointers.
unicode-math
bug\setmathfont{TeX Gyre Termes Math}
, or\setmathfont{texgyretermes-math.otf}
if you haven't installed it on your system