fontspec 包导致错误

fontspec 包导致错误

由于某种原因,包含 fontspec 包导致 XeLaTeX 无法正确编译。

以下是 MWE(受 Rob Hyndman 启发):

\documentclass{article}
\usepackage{lipsum,fontspec}

\begin{document}
\section{Introduction}
 \lipsum[1]

\section{Main}
 \lipsum[1]

\end{document}

如果我删除 fontspec 包,一切都会正常工作。使用它,我会收到很多错误,并且生成的 PDF 顶部有以下文本:

require(’luaotfload-main’) local v oid = luaotfload.main()
require(”fontspec”)
EU2

FileList文件中的内容.log为:

 article.cls    2014/09/29 v1.4h Standard LaTeX document class
 size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
 lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
fontspec.sty    2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTeX
  expl3.sty    2012/04/23 v3570 L3 Experimental code bundle wrapper
l3names.sty    2012/03/04 v3494 L3 Experimental namespace for primitives
l3bootstrap.sty    2011/12/29 v3110 L3 Experimental bootstrap code
   etex.sty    2016/01/11 v2.6 eTeX basic definition package (PEB,DPC)
  color.sty    2016/01/03 v1.1b Standard LaTeX Color (DPC)
  color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
xetex.def    2015/09/11 v4.06 LaTeX color/graphics driver for XeTeX (TeX  Live/RRM/JK)    
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
 graphics.sty    2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR)
   trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
l3basics.sty    2012/03/04 v3491 L3 Experimental basic definitions
l3expan.sty    2012/02/26 v3460 L3 Experimental argument expansion
   l3tl.sty    2012/03/04 v3490 L3 Experimental token lists
  l3seq.sty    2012/03/04 v3490 L3 Experimental sequences and stacks
  l3int.sty    2012/03/04 v3490 L3 Experimental integers
l3quark.sty    2012/02/12 v3384 L3 Experimental quarks
  l3prg.sty    2012/03/04 v3490 L3 Experimental control structures
l3clist.sty    2012/03/04 v3490 L3 Experimental comma separated lists
l3token.sty    2012/03/04 v3491 L3 Experimental token manipulation
 l3prop.sty    2012/03/04 v3490 L3 Experimental property lists
  l3msg.sty    2012/04/23 v3568 L3 Experimental messages
 l3file.sty    2012/03/09 v3520 L3 Experimental file and I/O operations
 l3skip.sty    2012/03/05 v3499 L3 Experimental dimensions and skips
 l3keys.sty    2012/03/03 v3487 L3 Experimental key-value interfaces
   l3fp.sty    2012/03/04 v3490 L3 Experimental floating-point operations
  l3box.sty    2012/03/04 v3490 L3 Experimental boxes
l3coffins.sty    2012/03/03 v3482 L3 Experimental coffin code layer
l3color.sty    2011/09/07 v2776 L3 Experimental colour support
l3luatex.sty    2012/02/09 v3355 L3 Experimental LuaTeX-specific functions
 xparse.sty    2012/04/23 v3570 L3 Experimental document command parser
luaotfload.sty    2015/12/09 v2.6 OpenType layout system
fontspec-luatex.sty    2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTeX

fontenc.sty
 eu2enc.def    2010/05/27 v0.1h Experimental Unicode font encodings
 eu2lmr.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   other characters in Unicode lower plane
  eu2lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern
  graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
  fontspec.cfg
  t3cmr.fd    2001/12/31 TIPA font definitions

答案1

已解决:根据 egreg 对涉及l3packages和其他人的过时软件包的评论,我在软件包管理器中卸载了这些软件包,然后从 MikTeX 文件夹中删除了这些软件包的子文件夹。重新编译现在可以生成完美的 PDF(即使使用\setmainfont{Georgia})。

谢谢大家!

相关内容