[Tex/LaTex] Using Cambria Math in XeLaTeX

accentsmath-modexetex

Take a look at the following images,

XeLaTeX typeset formula:

enter image description here

Word generated formula:

enter image description here

Note specifically the difference of the \hat implementations at g_i and g_i^2 in XeLaTeX. In Word the two implementations are the same. Also note that the hats in XeLaTeX are both larger than Word's.

A minimum working example is the following:

\documentclass{book}

\usepackage{unicode-math}
\setmathfont{Cambria Math}

\begin{document}
\[
V_{a_i}\left(\bar{x}_i,\hat{\theta},t\right) = -\frac{\hat{g}_i}{\hat{g}_i^2+\delta_{g_i}}V_{b_i}
\]
\end{document}

Why is this happening? Is there a way to make things better in XeLaTex?

Best Answer

This is a bug in XeTeX. It should be fixed by now, but the fix has not made its way into TeX Live (I don't know about MikTeX). Tex Live 2012 should have updated XeTeX binaries when it is released.

In the meantime, it works fine with LuaTeX.

Related Question