更新

更新

更新

我按照 Joseph Wright 的建议,在普通模式和管理员模式下更新 MikTeX,但仍然无法成功编译文档。这是当前的以要点形式记录


原始问题

这个问题很可能是重复的,因为我不明白此处给出的建议问题在这里

我正在尝试使用 XeLaTeX 编译一份文档,但遇到了与所需字体相关的各种困难,经过一番谷歌搜索,我发现这与包的使用有关fontspec

我像链接问题一样整理了一个 MWE,并通过 XeLaTeX 运行它:

测试字体规范.tex

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}
Lorem ipsum...
\end{document} 

TestFontspec.tex 的输出

This is XeTeX, Version 3.1415926-2.3-0.9997.5 (MiKTeX 2.9)
entering extended mode

(F:\programming\r\examples\example52[BuildWickhamBook]\Examples\example1\TestFo
ntspec.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, 
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontspec\fontspec.sty"
(F:\programming\miktex\tex\latex\l3kernel\expl3.sty
(F:\programming\miktex\tex\latex\l3kernel\l3names.sty
(F:\programming\miktex\tex\latex\l3kernel\l3bootstrap.sty))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\misc\etex.sty")
(F:\programming\miktex\tex\latex\l3kernel\l3basics.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3expan.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3tl.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3seq.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3int.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3quark.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3prg.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3clist.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3token.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3prop.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3msg.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3file.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3skip.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3keys.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3fp.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3box.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3coffins.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3color.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3luatex.sty)
(F:\programming\miktex\tex\latex\l3kernel\l3candidates.sty)
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"))
(F:\programming\miktex\tex\latex\l3packages\xparse\xparse.sty)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontspec\fontspec-patches.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\fixltx2e.sty")
*************************************************
* LaTeX warning: "xparse/redefine-command"
* 
* Redefining document command \oldstylenums with arg. spec. 'm' on line 107.
*************************************************
) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontspec\fontspec-xetex.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\euenc\eu1enc.def")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\euenc\eu1lmr.fd"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\xelatex\xunicode\xunicode.sty"
(F:\programming\miktex\tex\latex\tipa\t3enc.def
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\euenc\eu1lmss.fd"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")
("C:\Program Files (x86)\MiKTeX 2.9\tex\xelatex\xetex-def\xetex.def"))))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontspec\fontspec.cfg"
! Undefined control sequence.
<argument> \c_keys_code_root_tl 
                                fontspec/Ligatures/Historical
l.8 ...tureoption{Ligatures}{Historic}{Historical}

? ! Undefined control sequence.
<argument> \c_keys_code_root_tl 
                                fontspec/Ligatures/Historic
l.8 ...tureoption{Ligatures}{Historic}{Historical}

? OK, entering \batchmode

看来我安装的 XeLaTeX 是最新的(链接问题说应该是 v0.9994)。我该如何正确编译这个 MWE?

相关内容