Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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! ! !
Command name `\font_set:Nnn' already defined! 

Any hint to solve it? Thanks.

share|improve this question
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

2 Answers 2

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
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.
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class

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)
xunicode.sty    2010/11/06 v0.96 provides access to latin accents and many othe
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
    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
  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
  l3file.sty    2010/03/21 v1853 L3 Experimental file loading
    l3fp.sty    2011/03/06 v2178 L3 Experimental floating-point operations
l3luatex.sty    2010/07/18 v1985 L3 Experimental LuaTeX functions
  l3font.sty    2011/03/03 v2175 L3 Experimental Font Loading
    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
fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX
  eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings
  eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
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
   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.
share|improve this answer

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
share|improve this answer
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

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.

Would you like to answer one of these unanswered questions instead?