revtex4.2 在 miktex 中断(缺少 \begin{document})

revtex4.2 在 miktex 中断(缺少 \begin{document})

TeX 专家。

下面是我在编译过程中看到的错误的 MWE,我认为该错误与 revtex 有关:

\documentclass{revtex4-2}
\pdfoutput=1

\begin{document}

\title{the title}
\author{the author}
\affiliation{his/her affiliation}
\date{\today}

\begin{abstract}
This is the abstract.
\end{abstract}

\maketitle

\section{Introduction}
testing 1-2-3

\end{document}

控制台上的(缩短的)输出是:


This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.11) (preloaded format=pdflatex 2020.12.8)  9 DEC 2020 09:54
entering extended mode
**./test.tex
(test.tex
LaTeX2e <2020-10-01> patch level 2
L3 programming layer <2020-12-03> xparse <2020-03-03>
("C:\Users\myusername\AppData\Roaming\MiKTeX\2.9\tex/latex/revtex\revtex4-2.c
ls"
Document Class: revtex4-2 2019/01/18/14:29:48 4.2c (https://journals.aps.org/re
vtex/ 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.2c)
: Modified by Mark Doyle
 .
ltxutil[2019/01/18/14:29:48 4.2c utilities package (portions licensed from W. E
. Baxter web at superscript.com)]
.
.
.
! Extra \endgroup.
\document ->\endgroup 
                      \document@inithook \true@sw {}\UseOneTimeHook {begindo...
l.7 \begin{document}
                    
? 
Class revtex4-2 Info: Unrecognized LaTeX tabular. Please update this document c
lass! (Proceeding with fingers crossed.) on input line 7.
Class revtex4-2 Info: cite was not loaded (OK!) on input line 7.
Class revtex4-2 Info: mcite was not loaded (OK!) on input line 7.
Class revtex4-2 Info: multicol was not loaded (OK!) on input line 7.

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.7 \begin{document}
                    
?

我应该补充一点,同样的代码在 overleaf 上运行正常,也就是说没有这些错误。如果我使用 article 类而不是 revtex(并注释掉从属关系),那么它也可以正常工作。

非常感谢您的帮助。

相关内容