使用 ClearSans 和 XeLatex 时出现 MikTex 问题

使用 ClearSans 和 XeLatex 时出现 MikTex 问题

我在尝试使用 ClearSans 字体和 XeLaTeX 编译文档时遇到了一些麻烦。我正在运行最新的 MikTex 副本,所有软件包都已于昨天更新。以下是我将参考的最小非工作示例:

\documentclass[a4paper]{article}

\RequirePackage{fontspec}
\usepackage[sfdefault]{ClearSans}

\begin{document}
Hello, World!
\end{document}

使用 XeLaTeX 编译此会出现以下错误:

D:\test\> xelatex test.tex
This is XeTeX, Version 3.14159265-2.6-0.999991 (MiKTeX 2.9.6960 64-bit)
entering extended mode
(test.tex
LaTeX2e <2018-12-01>
("C:\Program Files\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex/latex/base\size10.clo"))
(C:\Users\User\AppData\Roaming\MiKTeX\2.9\tex/latex/fontspec\fontspec.sty
(C:\Users\User\AppData\Roaming\MiKTeX\2.9\tex/latex/l3packages/xparse\xparse.
sty (C:\Users\User\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\expl3.sty
(C:\Users\User\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\expl3-code.tex)
(C:\Users\User\AppData\Roaming\MiKTeX\2.9\tex/latex/l3kernel\l3xdvipdfmx.def)
))
(C:\Users\User\AppData\Roaming\MiKTeX\2.9\tex/latex/fontspec\fontspec-xetex.s
ty ("C:\Program Files\MiKTeX 2.9\tex/latex/base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/base\tuenc.def"))
(C:\Users\User\AppData\Roaming\MiKTeX\2.9\tex/latex/fontspec\fontspec.cfg)))
(C:\Users\User\AppData\Roaming\MiKTeX\2.9\tex/latex/clearsans\ClearSans.sty
("C:\Program Files\MiKTeX 2.9\tex/generic/ifxetex\ifxetex.sty")
("C:\Program Files\MiKTeX 2.9\tex/generic/oberdiek\ifluatex.sty")
("C:\Program Files\MiKTeX 2.9\tex/latex/xkeyval\xkeyval.sty"
("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkeyval.tex"
("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\xkvutils.tex"
("C:\Program Files\MiKTeX 2.9\tex/generic/xkeyval\keyval.tex"))))
("C:\Program Files\MiKTeX 2.9\tex/latex/base\textcomp.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1enc.def"))
! Undefined control sequence.
\__fontspec_init_ttc:n #1->\str_if_eq:eeT
                                          {\str_lower_case:f {\l__fontspec_e...
l.58       {ClearSans}

?

我根本不知道是什么原因造成的,希望有人能给我指点迷津。所以,问题是:

为什么这不起作用/我做错了什么?

顺便说一句,pdflatexfontspec依赖项被注释掉时,这可以很好地编译,但请记住上面只是一个最小的例子,我确实需要让它工作起来xelatex

相关内容