I suspect this might be a bug in unicode-math
, but you never know. It appears that loading any non-math font for any purpose at all breaks \widehat
and \widetilde
. Consider, for instance, the MWE below where I load XITS Math as my math font, but try some other fonts for \mathbfup
. That should have absolutely no effect for what happens to my math except when using bold upright math. However, even though the font does not change for the math I type, the \widetilde
and \widehat
become either normal \tilde
and \hat
... or disappear completely, depending on the font I load.
Is this a bug, or am I doing something wrong somewhere?
(As the MWE suggests, I am compiling using LuaLaTeX.)
% !TeX program=luatex
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{XITS Math}
\begin{document}
$\widetilde X\widehat X$
\setmathfont[range=\mathbfup]{Minion Pro Bold}
$\widetilde X\widehat X$
\setmathfont[range=\mathbfup]{Linux Libertine O Bold}
$\widetilde X\widehat X$
\end{document}
EDIT: Compiling using XeLaTeX, I get the following instead. This makes me even more confident that there is a bug somewhere.