[Tex/LaTex] “Undefined control sequence” error with fontspec

errorsfontspecxetex

As a result of the most recent TeXLive update, an XeTeX document I'm working on no longer compiles. I've narrowed down the problem to the "Color" declaration of a font I define. Here is a minimal working example:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Color=000088]{Hoefler Text}
\begin{document}
This is a minimal working example.
\end{document}

This fails to compile with the following log:

This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012)
restricted \write18 enabled.
entering extended mode
(./mwe.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, 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, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
piedmontese, polish, portuguese, romanian, romansh, russian, sanskrit, serbian
, serbianc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, u
ppersorbian, welsh, loaded.
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2012/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3names.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty))
(/usr/local/texlive/2012/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3basics.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3expan.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3tl.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3seq.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3int.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3quark.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3prg.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3clist.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3token.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3prop.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3msg.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3file.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3skip.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3keys.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3fp.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3box.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3coffins.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3color.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3luatex.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3kernel/l3candidates.sty)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/usr/local/texlive/2012/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/fixltx2e.sty)
*************************************************
* LaTeX warning: "xparse/redefine-command"
* 
* Redefining document command \oldstylenums with arg. spec. 'm' on line 128.
*************************************************
) (/usr/local/texlive/2012/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/local/texlive/2012/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/local/texlive/2012/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/tipa/t3enc.def
(/usr/local/texlive/2012/texmf-dist/tex/latex/euenc/eu1lmss.fd))
(/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2012/texmf-dist/tex/xelatex/xetex-def/xetex.def))))
(/usr/local/texlive/2012/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
! Undefined control sequence.
<argument> \tl_length:n 
{000088}==6
l.4 ...olor=000088,Mapping=tex-text]{Hoefler Text}

?

It compiles fine if I omit the colour specification:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Hoefler Text}
\begin{document}
This is a minimal working example.
\end{document}

Here is the relevant bit of the .log file with the \listfiles command:

*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)
fontspec.sty    2013/02/25 v2.3 Font selection for XeLaTeX and LuaLaTeX
expl3.sty    2013/03/12 v4467 L3 Experimental code bundle wrapper
l3names.sty    2012/12/07 v4346 L3 Namespace for primitives
l3bootstrap.sty    2013/01/08 v4420 L3 Experimental bootstrap code
etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty    2013/01/10 v4428 L3 Basic definitions
l3expan.sty    2013/02/03 v4458 L3 Argument expansion
l3tl.sty    2013/01/08 v4415 L3 Token lists
l3seq.sty    2013/01/12 v4434 L3 Sequences and stacks
l3int.sty    2013/01/13 v4444 L3 Integers
l3quark.sty    2012/11/04 v4268 L3 Quarks
l3prg.sty    2013/02/13 v4459 L3 Control structures
l3clist.sty    2013/01/08 v4414 L3 Comma separated lists
l3token.sty    2013/01/10 v4428 L3 Experimental token manipulation
l3prop.sty    2013/01/09 v4423 L3 Property lists
l3msg.sty    2013/01/08 v4412 L3 Messages
l3file.sty    2013/01/14 v4446 L3 File and I/O operations
l3skip.sty    2013/01/13 v4444 L3 Dimensions and skips
l3keys.sty    2013/02/24 v4461 L3 Experimental key-value interfaces
l3fp.sty    2013/01/19 v4449 L3 Floating points
l3box.sty    2013/01/08 v4411 L3 Experimental boxes
l3coffins.sty    2012/09/09 v4212 L3 Coffin code layer
l3color.sty    2012/08/29 v4156 L3 Experimental color support
l3luatex.sty    2012/08/03 v4049 L3 Experimental LuaTeX-specific functions
l3candidates.sty    2013/03/09 v4466 L3 Experimental additions to l3kernel
ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
xparse.sty    2013/03/12 v4467 L3 Experimental document command parser
fontspec-patches.sty    2013/02/25 v2.3 Font selection for XeLaTeX and LuaLaTeX

fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX
fontspec-xetex.sty    2013/02/25 v2.3 Font selection for XeLaTeX and LuaLaTeX
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
xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many oth
er characters in Unicode lower plane
eu1lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
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    2013/02/04 v0.95 LaTeX color/graphics driver for XeTeX (RRM/JK)

fontspec.cfg
t3cmr.fd    2001/12/31 TIPA font definitions

Any help would be inmensely appreciated!

Best Answer

Imho it is a (small) bug in fontspec: \tl_length:n has been removed from the l3kernel but is still used by fontspec. This here should work as workaround until the bug is corrected:

\documentclass{article}
\usepackage{fontspec}
\ExplSyntaxOn
\let\tl_length:n\tl_count:n
\ExplSyntaxOff
\setmainfont[Color=000088]{Arial}
\begin{document}
This is a minimal working example.
\end{document}