我正在尝试为我的论文编译一个 tex 文件,但一直收到一个持续性错误:
[LaTeX] finished with exit code 1
/usr/share/texmf/tex/latex/ms/ragged2e.sty:144:Undefined control sequence \if@raggedtwoe@footmisc
日志文件中的确切文本是:
(/usr/share/texmf/tex/latex/ms/ragged2e.sty
Package: ragged2e 2009/05/21 v2.1 ragged2e Package (MS)
(/usr/share/texmf/tex/latex/ms/everysel.sty
Package: everysel 2011/10/28 v1.2 EverySelectfont Package (MS)
ABD: EverySelectfont initializing macros
LaTeX Info: Redefining \selectfont on input line 126.
)
! Undefined control sequence.
<argument> \@EverySelectfont@Init
l.144 \if@raggedtwoe@footmisc
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.
这似乎是我在尝试编译文档时遇到的唯一错误。在构建序列崩溃后,我被转移到有问题的文件中有问题的行(与 tex 一样),我可以看到该文件ragged2e.sty
确实包含一个逻辑控制命令:
\if@raggedtwoe@footmisc
\RequirePackage{footmisc}[2002/08/28]
\fi
我已确保 footmisc 包已安装在我的机器上(确实如此),并且我的主文件包含该命令\usepackage{footmisc}
(确实如此)。我的理解是,这与之后使用时\RequirePackage
基本相同(这里就是这种情况)。\usepackage
\documentclass
我怀疑我只是没有使用正确版本的 footmisc,因为我最近使用 对所有 texlive 组件进行了完整更新YaST
。根据YaST
我安装的此软件包的版本,如下所示:
2012.67.5.5bsvn23330-5.5.2
如果这是原因,那么我应该以 root 身份登录并简单地编辑所要求的软件包版本(位[2002/08/28]
)吗?我对必须编辑 LaTeX 源代码没有好感!:-S
重新安装所有 tex-live 发行版后,我重新编译了我的论文,但出现了同样的错误。今天早上运行的日志文件的完整输出如下所示:
*****
***** LaTeX output:
***** cd "/home/dave/Documents/latex/thesis"
***** latex -interaction=nonstopmode main.tex
*****
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/TeX Live for SUSE Linux)
restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2011-07-01, ngerman-x-2011-07-01, 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, lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nyn
orsk, polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbia
nc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorb
ian, welsh, loaded.
(./settings.tex (/usr/share/texmf/tex/latex/koma-script/scrbook.cls
Document Class: scrbook 2012/03/08 v3.10a KOMA-Script document class (book)
(/usr/share/texmf/tex/latex/koma-script/scrkbase.sty
(/usr/share/texmf/tex/latex/koma-script/scrbase.sty
(/usr/share/texmf/tex/latex/graphics/keyval.sty)
(/usr/share/texmf/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2011/03/09 v3.09 KOMA-Script package (loading files)
Copyright (C) Markus Kohm
))) (/usr/share/texmf/tex/latex/koma-script/tocbasic.sty)
(/usr/share/texmf/tex/latex/koma-script/scrsize11pt.clo)
(/usr/share/texmf/tex/latex/koma-script/typearea.sty
Package typearea, 2012/03/08 v3.10a KOMA-Script package (type area)
Copyright (C) Frank Neukam, 1992-1994
Copyright (C) Markus Kohm, 1994-
)) (./warwickthesis.sty
*************************************************************
** Warwick Thesis Style File Sept 1996
*************************************************************
) (/usr/share/texmf/tex/latex/setspace/setspace.sty)
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/share/texmf/tex/latex/latexconfig/graphics.cfg)
(/usr/share/texmf/tex/latex/graphics/dvips.def)))
(/usr/share/texmf/tex/latex/natbib/natbib.sty)
(/usr/share/texmf/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/tools/longtable.sty)
(/usr/share/texmf/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf/tex/latex/amsmath/amstext.sty
(/usr/share/texmf/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf/tex/latex/amsfonts/amssymb.sty
(/usr/share/texmf/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texmf/tex/latex/base/textcomp.sty
(/usr/share/texmf/tex/latex/base/ts1enc.def))
(/usr/share/texmf/tex/latex/graphics/color.sty
(/usr/share/texmf/tex/latex/latexconfig/color.cfg)
(/usr/share/texmf/tex/latex/graphics/dvipsnam.def))
(/usr/share/texmf/tex/latex/subfig/subfig.sty
(/usr/share/texmf/tex/latex/caption/caption.sty
(/usr/share/texmf/tex/latex/caption/caption3.sty)
(/usr/share/texmf/tex/latex/caption/ltcaption.sty)))
(/usr/share/texmf/tex/generic/ulem/ulem.sty)
(/usr/share/texmf/tex/latex/paralist/paralist.sty)
(/usr/share/texmf/tex/latex/mdwtools/mdwlist.sty)
(/usr/share/texmf/tex/latex/footmisc/footmisc.sty)
(/usr/share/texmf/tex/latex/marginnote/marginnote.sty)
(/usr/share/texmf/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texmf/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texmf/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texmf/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf/tex/latex/latexconfig/hyperref.cfg)
(/usr/share/texmf/tex/latex/url/url.sty))
Package hyperref Message: Driver (default): hdvips.
(/usr/share/texmf/tex/latex/hyperref/hdvips.def
(/usr/share/texmf/tex/latex/hyperref/pdfmark.def
(/usr/share/texmf/tex/latex/oberdiek/rerunfilecheck.sty)))
(/usr/share/texmf/tex/latex/breakurl/breakurl.sty
(/usr/share/texmf/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf/tex/generic/xkeyval/xkeyval.tex)))
(/usr/share/texmf/tex/latex/units/units.sty
(/usr/share/texmf/tex/latex/base/ifthen.sty)
(/usr/share/texmf/tex/latex/units/nicefrac.sty))
(/usr/share/texmf/tex/latex/tools/array.sty)
(/usr/share/texmf/tex/latex/booktabs/booktabs.sty)
(/usr/share/texmf/tex/latex/mhchem/mhchem.sty
(/usr/share/texmf/tex/latex/tools/calc.sty)
(/usr/share/texmf/tex/latex/oberdiek/twoopt.sty))
(/usr/share/texmf/tex/latex/sidecap/sidecap.sty)
(/usr/share/texmf/tex/latex/geometry/geometry.sty)) (./main.aux)
(/usr/share/texmf/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf/tex/latex/hyperref/nameref.sty
(/usr/share/texmf/tex/generic/oberdiek/gettitlestring.sty)) (./main.out)
(./main.out) (/usr/share/texmf/tex/latex/ms/ragged2e.sty
(/usr/share/texmf/tex/latex/ms/everysel.sty
ABD: EverySelectfont initializing macros)
! Undefined control sequence.
<argument> \@EverySelectfont@Init
l.144 \if@raggedtwoe@footmisc
)
*geometry* driver: auto-detecting
*geometry* detected driver: dvips
<./pics/crest_fullcolour.eps> (/usr/share/texmf/tex/latex/amsfonts/umsa.fd)
(/usr/share/texmf/tex/latex/amsfonts/umsb.fd)
<./pics/the_warwick_uni_blue.eps> [1] [2] (./main.toc
(/usr/share/texmf/tex/latex/base/t1cmss.fd)) [1] [2] (./parts/declaration.tex
[3]
Overfull \hbox (3.03625pt too wide) in paragraph at lines 54--55
[]\T1/cmr/m/it/10.95 Ignition cal-cu-la-tions us-ing a re-duced coupled-mode el
ectron-ion en-ergy ex-change model\T1/cmr/m/n/10.95 ,
Overfull \vbox (5.29999pt too high) has occurred while \output is active
[4])
Overfull \vbox (1.39674pt too high) has occurred while \output is active
[5] [6] (./parts/shouts.tex
Underfull \vbox (badness 3199) has occurred while \output is active [7])
Overfull \vbox (1.39674pt too high) has occurred while \output is active
[8] (./parts/abstract.tex) [9] [10] (./parts/symbols.tex [11])
Overfull \vbox (1.39674pt too high) has occurred while \output is active
[12] (./parts/introduction.tex
Chapter 1.
<./pics/phase_space.eps> [1]
Overfull \vbox (1.39674pt too high) has occurred while \output is active
[2]) (./parts/appendix.tex) (./main.bbl [3]
Package natbib Warning: Empty `thebibliography' environment on input line 6.
)
Package caption Warning: Unused \captionsetup[subfigure] on input line 52.
See the caption package documentation for explanation.
[4] (./main.aux) )
(see the transcript file for additional information)
Output written on main.dvi (18 pages, 43140 bytes).
Transcript written on main.log.
答案1
来自我评论的答案:
包裹
footmisc
:\RequirePackage{footmisc}[2002/08/28]
位于第 145 行,但错误出现在第 144 行,即前一行!另外,请勿更改所需日期。此日期的目的是,软件包必须具有此版本或更新版本。使用旧版本可能意味着所需的功能或错误修复不可用,并将以不为人知的方式破坏代码。删除日期不会更新软件包。顺便说一句,footmisc 的当前版本是 2011/06/06 v5.5b。包裹
everysel
:该文件的摘录
.log
显示,未定义的命令是\@EverySelectfont@Init
,而不是\if@raggedtwoe@footmisc
。命令名称表明,问题与 有关\RequirePackage{everysel}
。该软件包的最新版本是 2011/10/28 v1.2。因此,我建议您先试用此版本,以检查问题是否已修复。问题仍然难以重现。我尝试了控制台日志中给出的软件包,但无法重现问题。控制台日志显示
ragged2e
已由 加载sidecap
。\AtBeginDocument
您可以ragged2e
在开始时尝试显式加载。
ragged2e
根据 Dave Chapman 的说法,提前加载 sidecap
似乎确实解决了这个问题评论。