TeX Live (和 MiKTeX) + Windows 7 + Texmaker 的 expl3.sty 问题

TeX Live (和 MiKTeX) + Windows 7 + Texmaker 的 expl3.sty 问题

我最近更新了 MiKTeX,但我无法再通过 Texmaker 简单多语言 tex 编译 xelatex 例如

\documentclass{article}
\usepackage{xltxtra}
\usepackage{xgreek}
\setmainfont[Mapping=tex-text]{Times New Roman}
\begin{document} 
Hello world Χαίρε κόσμε 
\end{document}

获取有关 expl3.sty 的错误

我在很多地方阅读了很多解决方案,说实话我有点困惑。我删除了 MiKTeX 并安装了 TeX Live,但问题仍然存在。

我的日志文件的错误部分是:

(c:/texlive/2011/texmf-dist/tex/latex/l3kernel/l3names.sty
(c:/texlive/2011/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty
Package: l3bootstrap 2011/09/10 v2798 L3 Experimental bootstrap code)
Package: l3names 2011/09/07 v2776 L3 Experimental namespace for primitives)

! Undefined control sequence.
<argument> \filename 

l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<write> ...e \@cls@pkg \space provides `\filename 
                                              '\@gobble \on@line .^^J
l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


LaTeX Warning: You have requested package `expl3',
           but the package provides `'.

随后又有 6 条“!未定义的控制序列。”完整消息结尾如下:

! LaTeX Error: File `l3intexpr.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 

l.83 \RequirePackage
                { 
*** (cannot \read from terminal in nonstop modes)

Texmaker 对 expl3.sty 包中的错误消息进行分类。


谢谢你的帮助。不幸的是问题仍然存在...

MikTex 显示“无可用更新” l3kernel 文件夹中只有一个 expl3.sty 文件。我无法直接从 TexLive Manager 找到它(只是作为 l3kernel 包中的文件名)

完整的日志文件是:

This is XeTeX, Version 3.1415926-2.3-0.9997.5 (Web2C 2011) (format=xelatex 2011.9.21)  
22 SEP 2011 11:30
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, an
cientgreek, ibycus, ukenglish, usenglishmax, monogreek, greek, loaded.
(c:/texlive/2011/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(c:/texlive/2011/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(c:/texlive/2011/texmf-dist/tex/latex/xltxtra/xltxtra.sty
Package: xltxtra 2010/09/20 v0.5e Improvements for the "XeLaTeX" format

(c:/texlive/2011/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(c:/texlive/2011/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
(c:/texlive/2011/texmf-dist/tex/latex/fontspec/fontspec.sty
Package: fontspec 2011/09/18 v2.2a Advanced font selection for XeLaTeX/LuaLaTeX

 (./expl3.sty
(c:/texlive/2011/texmf-dist/tex/latex/l3kernel/l3names.sty
(c:/texlive/2011/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty
Package: l3bootstrap 2011/09/10 v2798 L3 Experimental bootstrap code
)
Package: l3names 2011/09/07 v2776 L3 Experimental namespace for primitives
)
! Undefined control sequence.
<argument> \filename 

l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<write> ...e \@cls@pkg \space provides `\filename 
                                              '\@gobble \on@line .^^J
l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


LaTeX Warning: You have requested package `expl3',
           but the package provides `'.

! Undefined control sequence.
<argument> \filedate 
                  v\fileversion  \filedescription 
l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \filedate  v\fileversion 
                                 \filedescription 
l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> ...te  v\fileversion  \filedescription 

l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<write> Package: \@gtempa \space \filedate 
                                        v\fileversion  \filedescription 
l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<write> ...gtempa \space \filedate  v\fileversion 
                                               \filedescription 
l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<write> ...edate  v\fileversion  \filedescription 

l.55 ...\filedate}{\fileversion}{\filedescription}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Package:   v 
(c:/texlive/2011/texmf-dist/tex/latex/etex-pkg/etex.sty
Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)
\et@xins=\count88
)
(c:/texlive/2011/texmf-dist/tex/latex/l3kernel/l3basics.sty
Package: l3basics 2011/09/12 v2817 L3 Experimental basic definitions
)
(c:/texlive/2011/texmf-dist/tex/latex/l3kernel/l3expan.sty
Package: l3expan 2011/09/12 v2812 L3 Experimental argument expansion
)
(c:/texlive/2011/texmf-dist/tex/latex/l3kernel/l3tl.sty
Package: l3tl 2011/09/12 v2812 L3 Experimental token lists
)

! LaTeX Error: File `l3intexpr.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 

l.83 \RequirePackage
                { 
*** (cannot \read from terminal in nonstop modes)


Here is how much of TeX's memory you used:
 1610 strings out of 495646
 24751 string characters out of 3186730
 60250 words of memory out of 3000000
 4819 multiletter control sequences out of 15000+200000
 3640 words of font info for 14 fonts, out of 3000000 for 9000
 36 hyphenation exceptions out of 8191
 37i,0n,27p,339b,36s stack positions out of 5000i,500n,10000p,200000b,50000s
 No pages of output.

答案1

答案就在日志行中

 (./expl3.sty

这表明expl3正在从当前的文件夹,而不是 TeX Live 文件夹(这解释了为什么这个问题在 MiKTeX 和 TeX Live 中很常见)。expl3从包含您的文件的文件夹中删除该文件.tex,问题就会消失。您可能还需要删除任何其他“位置奇怪”的.sty文件。

答案2

为我解决问题的方法是运行 MiKTeX/Maintenance/Update作为用户 (不是以管理员身份)。我发现有一个过时的 l3kernel 需要删除(尽管该包已在管理界面中删除)。

解释如下:http://sourceforge.net/p/miktex/bugs/2111/

相关内容