# xelatex compilation error

I am using xelatex to compile a tex file. However, I got a strange problem, the log says:

``````! This is a LaTeX bug: check coding! ! !
``````

Any hint to solve it? Thanks.

-
Welcome to tex.se! Sorry to hear you have an error but you didn't really give enough information to help us solve it. Take the file you are trying to compile, and delete everything except the part that causes the error. Then post that file so we can try to compile it ourselves. –  Matthew Leingang Mar 15 '11 at 10:21
Please provide a minimal example. –  Andrey Vihrov Mar 15 '11 at 10:22
This is a temporary issue with `fontspec` and `expl3`. I guess I need to do a CTAN release of `expl3` (perhaps this evening, UK time) –  Joseph Wright Mar 15 '11 at 10:36
@Joseph, @Will: You are not allowed to use your superhuman powers of perception without the MWE! Otherwise we will come to expect it always. `:-)` –  Matthew Leingang Mar 15 '11 at 14:11
@Matthew: I have access to Robin Fairbairns 'crystal ball' –  Joseph Wright Mar 15 '11 at 14:14

I had the same problem with MiKTeX. After reinstalling `fontspec` using package manager, the problem went away. Initial `fontspec` version was packaged sometime in 2010. Newly installed one is from 28-2-2011.

You can also update all MiKTeX packages from command line. Go to `MiKTeX\bin` directory and then you can run:

``````mpm --find-updates > packages-to-be-updated.txt
mpm --update-some=packages-to-be-updated.txt
``````
-
MiKTeX versions with problems were basic-miktex-2.9.3972 and miktex-portable-2.9.3927 –  ipavlic Mar 18 '11 at 10:29
This resolved my similar problem with LuaLaTeX and `fontspec`. I did have to run the updater in admin mode to get the updater itself to work. It updated a bunch of packages, including `fontspec`. –  RBerteig Apr 27 '11 at 10:08

Using the minimal example of Alexander, I cannot reproduce this problem. With `\listfiles` in my preamble, my log file is below.

Make sure you have fully updated all of your packages through `tlmgr` (or ‘TeX Live Utility’ on a Mac) or the MiKTeX package manager.

```This is XeTeX, Version 3.1415926-2.2-0.9997.4 (TeX Live 2010)
\write18 enabled.
entering extended mode
(./small.tex
LaTeX2e
Babel  and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,
icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or
iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,
lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol
ish, portuguese, romanian, russian, sanskrit, serbian, slovak, slovenian, spani
sh, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded.
(/usr/local/texlive/2010/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2010/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/xunicode/xunicode.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/xltxtra/xltxtra.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/expl3.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3names.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3basics.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3expan.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3tl.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3int.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3quark.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3seq.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3toks.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3prg.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3clist.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3token.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3prop.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3msg.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3io.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3skip.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3box.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3keyval.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3keys.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3precom.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3xref.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3file.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3fp.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3luatex.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/expl3/l3font.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/tools/calc.sty))
(/usr/local/texlive/2010/texmf-dist/tex/latex/xpackages/xbase/xparse.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/kastrup/binhex.tex)
(/usr/local/texlive/2010/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2010/texmf-dist/tex/generic/xkeyval/keyval.tex)))
(/usr/local/texlive/2010/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/base/fixltx2e.sty))
(/usr/local/texlive/2010/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/local/texlive/2010/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/local/texlive/2010/texmf-dist/tex/latex/fontspec/fontspec.cfg))
(/usr/local/texlive/2010/texmf-dist/tex/latex/realscripts/realscripts.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/metalogo/metalogo.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2010/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2010/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/xetex-def/xetex.def)))))
(/usr/local/texlive/2010/texmf-dist/tex/xelatex/xecyr/xecyr.sty)
(/usr/local/texlive/2010/texmf-dist/tex/generic/babel/babel.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/babel/russianb.ldf
(/usr/local/texlive/2010/texmf-dist/tex/generic/babel/babel.def)

Package babel Warning: No input encoding specified for Russian language on inpu
t line 136.

) (/usr/local/texlive/2010/texmf-dist/tex/generic/babel/english.ldf))
(./small.aux) [1] (./small.aux)

*File List*
article.cls    2007/10/19 v1.4h Standard LaTeX document class
size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
r characters in Unicode lower plane
xltxtra.sty    2010/09/20 v0.5e Improvements for the "XeLaTeX" format
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
fontspec.sty    2011/02/26 v2.1f Advanced font selection for XeLaTeX/LuaLaTeX
expl3.sty    2011/02/17 v2156 L3 Experimental code bundle wrapper
l3names.sty    2011/01/08 v2122 L3 Experimental Naming Scheme for TeX Primitiv
es
etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty    2011/02/26 v2158 L3 Experimental basic definitions
l3expan.sty    2010/09/20 v2037 L3 Experimental Argument Expansion module
l3tl.sty    2011/03/07 v2184 L3 Experimental Token Lists
l3int.sty    2011/03/06 v2178 L3 Experimental Integer module
l3quark.sty    2011/03/03 v2172 L3 Experimental Quark Commands
l3seq.sty    2010/03/29 v1879 L3 Experimental sequences and stacks
l3toks.sty    2010/09/20 v2037 L3 Experimental Token Registers
l3prg.sty    2011/03/06 v2178 L3 Experimental control structures
l3clist.sty    2011/03/06 v2178 L3 Experimental comma separated lists
l3token.sty    2011/02/16 v2151 L3 Experimental token investigation and manipu
lation
l3prop.sty    2010/11/23 v2087 L3 Experimental Property Lists
l3msg.sty    2010/10/02 v2052 L3 Experimental LaTeX Messages module
l3io.sty    2010/10/03 v2063 L3 Experimental i/o module
l3skip.sty    2011/02/15 v2149 L3 Experimental skip registers
l3box.sty    2011/03/06 v2178 L3 Experimental Box module
l3keyval.sty    2010/04/11 v1890 L3 Experimental keyval processing
l3keys.sty    2010/11/11 v2082 L3 Experimental key-value support
l3precom.sty    2010/02/09 v1793 L3 Experimental precompilation module
l3xref.sty    2011/02/16 v2151 L3 Experimental cross referencing
l3fp.sty    2011/03/06 v2178 L3 Experimental floating-point operations
l3luatex.sty    2010/07/18 v1985 L3 Experimental LuaTeX functions
calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
xparse.sty    2011/01/23 v2136 Generic document command parser
xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
fontspec-patches.sty    2011/02/26 v2.1f Advanced font selection for XeLaTeX/Lu
aLaTeX
fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX
fontenc.sty
eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings
eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
fontspec.cfg
realscripts.sty    2010/09/30 v0.3 Access OpenType subscripts and superscripts
metalogo.sty    2010/05/29 v0.12 Extended TeX logo macros
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
xetex.def    2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX (RRM/JK)

xecyr.sty    2008/03/08 v1.0 Definitions for Cyrillic Babel/XeLaTeX compatib
ility
babel.sty    2008/07/06 v3.8l The Babel package
russianb.ldf    2008/03/21 v1.1r Russian support from the babel system
english.ldf    2005/03/30 v3.3o English support from the babel system
***********

)
Output written on small.pdf (1 page).
SyncTeX written on small.synctex.gz
Transcript written on small.log.
```
-

## protected by Martin Scharrer♦Mar 16 '11 at 18:29

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.