TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I one of my headerfiles, I used the command \setmathfont[]{XITS Math}, once I tried to compile the document as always with xelatex, I get the following error:

! Undefined control sequence.
l.87 \setmathsfont
                  []{XITS Math}

Also, for some reason, XeLaTeX seems to hang when I comment out that line.

This may or may not be relevant:

$ xelatex --version
XeTeX 3.1415926-2.4-0.9998 (TeX Live 2012/Debian)
kpathsea version 6.1.0
Copyright 2012 SIL International and Jonathan Kew.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 49.1 [with modifications for XeTeX]
Compiled with zlib version 1.2.7; using 1.2.7
Compiled with FreeType2 version 2.4.9; using 2.4.9
Compiled with fontconfig version 2.9.0; using 2.9.0
Compiled with libpng version 1.2.49; using 1.2.49
Compiled with poppler version 0.18.4
share|improve this question
up vote 5 down vote accepted

you have a typo, you wrote \setmathfont ... but the logfile clearly shows that you typed \setmathsfont mark the extra "s".

share|improve this answer

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.