字体规格出现“未定义的控制序列”错误

字体规格出现“未定义的控制序列”错误

由于最近的 TeXLive 更新,我正在处理的 XeTeX 文档不再编译。我已将问题缩小到我定义的字体的“颜色”声明。这是一个最小的工作示例:

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

编译失败,日志如下:

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}

?

如果我省略颜色规范,它可以很好地编译:

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

.log以下是该文件与命令的相关部分\listfiles

*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

如能得到任何帮助我将非常感激!

答案1

我认为这是 fontspec 中的一个(小)错误:\tl_length:n已从 l3kernel 中删除,但仍被 fontspec 使用。在错误得到纠正之前,这应该可以作为解决方法:

\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}

相关内容