我最近换了电脑,重新安装了 MikTeX 和 TeXmaker。我在之前的电脑上处理一个 revtex 文档,编译起来没问题,但现在编译时出现错误。
我在完整文档中收到错误“!Extra \endgroup。”,因此我尝试在一个最小的工作示例中重现它:
最小工作示例:
\documentclass[aps,prl,10pt]{revtex4-2} \begin{document} hello \end{document}
但是这次,我收到错误“Class revtex4-2 Info: Unrecognized LaTeX tabular. Please update this document class! (Provide with finger crossing.) on input line 2.”
我尝试重新安装 MikTeX,重新安装 revtex,但错误仍然存在。我检查了一下,我使用的是 revtex 4.2f 版本。这些是我在 MikTeX 中安装的软件包:
日志档案
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (MiKTeX 23.5) (preloaded format=pdflatex 2023.8.16) 16 AUG 2023 16:14
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**./test.tex
(test.tex
LaTeX2e <2023-06-01> patch level 1
L3 programming layer <2023-06-30>
(C:\Users\dimit\AppData\Local\Programs\MiKTeX\tex/latex/revtex\revtex4-2.cls
Document Class: revtex4-2 2022/06/05 4.2f (https://journals.aps.org/revtex/ for
documentation)
Copyright (c) 2019 American Physical Society.
mailto:[email protected]
Licensed under the LPPL:
http://www.ctan.org/tex-archive/macros/latex/base/lppl.txt
Arthur Ogawa <arthur_ogawa at sbcglobal dot net>
Based on work by David Carlisle <david at dcarlisle.demon.co.uk>
Version (4.2d--4.2f): Modified by Mark Doyle and Phelype Oleinik
.
ltxutil[2022/06/05 4.2f utilities package (portions licensed from W. E. Baxter
web at superscript.com)]
LaTeX Info: Redefining \@centercr on input line 356.
Class revtex4-2 Info: Repairing broken LaTeX eqnarray on input line 417.
\eqncolsep=\skip48
Class revtex4-2 Info: Repairing hyperref-unfriendly LaTeX definition of \mpfoot
note on input line 492.
Class revtex4-2 Info: Repairing broken LateX \@sect on input line 814.
\intertabularlinepenalty=\count185
\@tbpen=\count186
\@arstrutbox@hline=\box51
Class revtex4-2 Info: Repairing broken LaTeX \@xbitor on input line 1845.
Class revtex4-2 Info: Making \typeout \long on input line 2110.
ltxfront[2022/06/05 4.2f frontmatter package (AO,DPC,MD)]
\c@affil=\count187
\c@collab=\count188
\absbox=\box52
ltxgrid[2022/06/05 4.2f page grid package (portions licensed from W. E. Baxter
web at superscript.com)]
\c@linecount=\count189
\output@latex=\toks17
\box@size@1=\box53
\box@size@2=\box54
\@protection@box=\box55
\@topmark@saved=\toks18
\footins@saved=\box56
\footins@recovered=\box57
\column@recovered=\box58
\pagesofar=\box59
\footsofar=\box60
\pagegrid@col=\count190
Class revtex4-2 Info: Overriding \@vspace, \@vspacer, \@no@pgbk, \@newline, and
\\ on input line 5676.
\c@part=\count191
\c@section=\count192
\c@subsection=\count193
\c@subsubsection=\count194
\c@paragraph=\count195
\c@subparagraph=\count196
\abovecaptionskip=\skip49
\belowcaptionskip=\skip50
\c@figure=\count197
\fbox@1=\box61
\c@table=\count198
\fbox@2=\box62
\c@video=\count199
\fbox@4=\box63
\@bibdataout=\write3
\widetext@top=\box64
\widetext@bot=\box65
Class revtex4-2 Info: Selecting society aps on input line 7669.
(C:\Users\dimit\AppData\Local\Programs\MiKTeX\tex/latex/revtex\aps4-2.rtx
File: aps4-2 2022/06/05 4.2f (https://journals.aps.org/revtex/ for documentatio
n)
Class revtex4-2 Info: RevTeX society APS selected on input line 40.
)
Class revtex4-2 Info: Selecting journal prl on input line 7671.
Class revtex4-2 Info: APS journal PRL selected on input line 7672.
(C:\Users\dimit\AppData\Local\Programs\MiKTeX\tex/latex/revtex\aps10pt4-2.rtx
File: aps10pt4-2 2022/06/05 4.2f (https://journals.aps.org/revtex/ for document
ation)
Class revtex4-2 Info: RevTeX pointsize 10pt selected on input line 39.
)
(C:\Users\dimit\AppData\Local\Programs\MiKTeX\tex/latex/textcase\textcase.sty
Package: textcase 2023/07/27 v1.04 Text only upper/lower case changing (DPC)
Package textcase Info: Defining Legacy names on input line 20.
)
(C:\Users\dimit\AppData\Local\Programs\MiKTeX\tex/latex/url\url.sty
\Urlmuskip=\muskip16
Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
)
(C:\Users\dimit\AppData\Local\Programs\MiKTeX\tex/latex/natbib\natbib.sty
Package: natbib 2010/09/13 8.31b (PWD, AO)
\bibhang=\skip51
\bibsep=\skip52
LaTeX Info: Redefining \cite on input line 694.
\c@NAT@ctr=\count266
)
Class revtex4-2 Info: Repairing natbib's \BibitemShut on input line 7676.
(C:\Users\dimit\AppData\Local\Programs\MiKTeX\tex/latex/revtex\revsymb4-2.sty
Package: revsymb4-2 2022/06/05 4.2f (https://journals.aps.org/revtex/ for docum
entation)
LaTeX Info: Redefining \REV@mathfrak on input line 128.
))
Class revtex4-2 Info: Unrecognized LaTeX tabular. Please update this document c
lass! (Proceeding with fingers crossed.) on input line 2.
Class revtex4-2 Info: cite was not loaded (OK!) on input line 2.
Class revtex4-2 Info: mcite was not loaded (OK!) on input line 2.
Class revtex4-2 Info: multicol was not loaded (OK!) on input line 2.
(C:\Users\dimit\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-pdf
tex.def
File: l3backend-pdftex.def 2023-04-19 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count267
\l__pdf_internal_box=\box66
) (test.aux)
\openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
\openout3 = `testNotes.bib'.
No file test.bbl.
[1{C:/Users/dimit/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}] (test.aux)
***********
LaTeX2e <2023-06-01> patch level 1
L3 programming layer <2023-06-30>
***********
)
Here is how much of TeX's memory you used:
2497 strings out of 475551
36255 string characters out of 5762554
1916238 words of memory out of 5000000
23779 multiletter control sequences out of 15000+600000
558069 words of font info for 36 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
57i,5n,60p,206b,117s stack positions out of 10000i,1000n,20000p,200000b,200000s
<C:/Users/dimit/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/
cmr10.pfb>
Output written on test.pdf (1 page, 11640 bytes).
PDF statistics:
11 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
答案1
已解决。我在父目录中有旧版本的 revtex 文件(4.2f 之前的版本),我认为这是导致编译错误的原因。