# Using Cambria Math in XeLaTeX

Take a look at the following images,

XeLaTeX typeset formula:

Word generated formula:

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?

-
we can also notice the distance between the V and a letters in V_{a_i} –  pluton May 2 '12 at 23:10

@niels: you may want to get the new unicode-math from github, as it takes advantage of new features in XeTeX 0.9998 (plus other fixes). –  Khaled Hosny May 3 '12 at 7:07