# Unicode-math undefined control sequence [closed]

I'm trying to get unicode-math to work. I'm not 100% what I should be doing here, but here is a minimum working example

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{xits-math.otf}
\begin{document}
blah
\end{document}


If I try to run

xelatex min.tex


I get the following error:

Undefined control sequence.
l.75 ...const:Nn  \c_um_math_alphabet_name_latin_tl
{Latin,~lowercase}


I've traced the error to unicode-math.sty which has line 75 as

\tl_const:Nn \c_um_math_alphabet_name_latin_tl {Latin,~lowercase}


I'm sure I'm compling or otherwise doing something wrong here.

Edit: Looking closely I see some warnings

LaTeX Warning: You have requested, on input line 30, version
2010/10/25' of package fontspec,
but only version
2008/08/09 v1.18 Advanced font selection for XeLaTeX'
is available.

LaTeX Warning: You have requested, on input line 27, version
2011/07/01' of package expl3,
but only version
2009/08/12 v1458 L3 Experimental code bundle wrapper'
is available.


 I don't get any error. Try adding \listfiles and showing what results: it's probably an issue due to old versions of some packages. – egreg Mar 6 '12 at 10:03 @egreg: I'm not sure what \listfiles does? But I've updated the question with some warnings – Qwirk Mar 6 '12 at 10:08 What system are you on? Can you do kpsewhich fontspec.sty from the directory of your tex file? That should test if your TeX distribution has noticed the new version of fontspec. – Andrew Stacey Mar 6 '12 at 10:10 @Qwirk Yes, you have old versions of some package around. – egreg Mar 6 '12 at 10:16 @Andrew: /usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.sty (this is on Ubuntu). Actually - I think I realise my problem I have been putting the newer version is /tex/latex instead of /tex/xelatex/ – Qwirk Mar 6 '12 at 10:22