[Tex/LaTex] bold math with hat

boldmathunicode-math

I'm struggling with a case of (silently) disappearing hat. It works fine on one computer, but on another I don't see the first accent:

\documentclass[border=3mm,preview]{standalone}

\usepackage[math-style=TeX]{unicode-math}
\setmathfont{xits-math.otf}

\begin{document}
\[
\mathbf{\hat d}, \mathbf{d}, \hat d
\]
\end{document}

enter image description here

I've just upgraded to MacTeX 2017 to see if that would help, but no luck. unicode-math just doesn't seem to like the bold math hat. Is there a good workaround? I should mention that I'm using xetex, and the intended main font would be Source Sans Pro.

Best Answer

I'd like to suggest that you do yourself a big favor and download and install the STIX Two text and math fonts. The STIX Two fonts are much nicer and better designed that either the Stix or the XITS fonts.

The following code runs under both XeLaTeX and LuaLaTeX.

enter image description here

\documentclass[border=3mm,preview]{standalone}
\usepackage[math-style=TeX]{unicode-math}
\setmathfont{STIX Two Math}
\begin{document}
\( \mathrm{d}, d, \hat{d}, \symbf{d}, \hat{\symbf{d}}, \symbf{\hat{d}} \)
\end{document}