# Arrow is too long when \vec followed by subscript or superscript after using unicode-math package

The code is below

\documentclass[12pt]{article}
\usepackage{unicode-math}
\setmathfont{XITS Math}
\begin{document}
\large
$\vec{a}^{12345}$
\end{document}


Then the arrow of \vec is too long and penetrate the superscript 12. I just want the the arrow of \vec is above a, not whole of a^{12345} And I use xelatex to run the code.

However, if I replace $\vec{a}^{12345}$ with $\vec{ab}^{12345}$, then it looks quite good. The arrow of \vec is just above ab, it do not stretch and penetrate 12.

Can anyone tell me how to fix the problem?

-
Just mentioning that compiling with lualatex gives the desired result. –  Torbjørn T. Apr 8 '12 at 11:50

It seems like single-character arguments to \vec are handled differently. In that sense, supplying a fake two-element argument solves your problem:
\$\vec{a{}}^{12345}