TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


\setmathfont{Cambria Math}

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}

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

share|improve this question
we can also notice the distance between the V and a letters in V_{a_i} – pluton May 2 '12 at 23:10
up vote 7 down vote accepted

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.

share|improve this answer
You should be able to compile XeTeX yourself, but for how to do that better ask a separate question. – Caramdir May 2 '12 at 21:31
@niels: First update your MiKTeX installation (current MiKTeX is 2.9.4503 with XeTeX 0.9997.4) and try out. – Speravir May 2 '12 at 22:40
@Speravir: TL 2011 has 0.9997.5 and it doesn't work there. – Caramdir May 2 '12 at 23:58
@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
@Khaled Hosny: just tried, now hats look smaller and neater than with the older version :-) – niels May 3 '12 at 7:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.