# Undefined control sequence. \begin{document} when compiling via Xelatex

This question has been asked several times before, but I think every individual's experience is a bit different. I have tried 3 latex templates, all of them giving the same error. Just for a reproducible example, you can play with this one from Claud D.Park.

Error while compiling using Xelatex is the same, pdf appears to be generated but has an unexpected number sequence on the top.

I have also changed the encoding to UTF-8 as suggested by others via this.

I think it's something small, but I am unable to figure it out. Log is also attached.

! Undefined control sequence. __um_set_big_operator:nnn ...r_gset_active_eq:nN {#3}__um_tmpa: __um_set_... l.73 \begin{document} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), typeI' and the correct spelling (e.g., I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.

! Undefined control sequence. __um_set_big_operator:nnn ...r_gset_active_eq:nN {#3}__um_tmpa: __um_set_... l.73 \begin{document}

Full Log : http://www.filedropper.com/cv_3

Thanks!

• Just a guess, but this looks like like an incompatibility between versions of fontspec and expl3. What TeX distribution are you using, and is it completely up to date? If you're using Linux I recommend installing TeXLive directly without using the Linux package manager. This will allow you to keep the distribution updated much more easily. – Alan Munn Mar 28 '16 at 14:08
• Hi Alan, thanks for the followup. Its TeXstudio 2.10.2 (hg 5506:2a97a460a6ee) on Mac OS X El Captain v 10.11.2. I reckon its upto date. – Sukhdeep Singh Mar 28 '16 at 14:28
• Ok. But TeXStudio is the editor, not the distribution. Since I'm assuming you have installed MacTeX, then in the TeX folder in Applications there should be a TeXLive Utility. Use this to update your distribution. – Alan Munn Mar 28 '16 at 14:32
• Thank you Alan, that was it. Please move your comment to an answer, so I can accept it. I replaced the current TexLive utility with the new beta version supported for El Captain available here. github.com/amaxwell/tlutility/releases – Sukhdeep Singh Mar 28 '16 at 14:42

## 1 Answer

The error you are getting is indicative of an incompatibility between fontspec and the expl3 packages, which can be caused by your TeX distribution not being fully up-to-date.

See this answer for details on how to do that:

But looking more carefully at the log file, there are other issues that you should deal with. The log shows that you have loaded the inputenc` package, which should not be loaded if you are using XeLaTeX. See:

Finally, I notice that you have installed BasicTeX (a small subset of the full MacTeX distribution). Although this saves space in the initial download, as a beginner, I think you would be better off with the full distribution, since this will reduce dramatically the headaches associated with missing packages.