I am using the revtex4-2
class file for the first time to compile my .tex
file. However, I am getting the following compilation error:
! Undefined control sequence.
<argument> \AddToHook
{begindocument/before}{\document@inithook }
l.211 }
Here is a minimal working example.
\documentclass[aps,prl]{revtex4-2}
\begin{document}
This is APS RevTex 4.2 document class.
\end{document}
I have previously used revtex4-0
as well as revtex4-1
without any issue. I have recently installed revtex4.2e
in my system. However, I am unable to figure out the problem I am facing with this latest RevTeX class.
Below is the log file.
This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2019.1.4) 19 DEC 2020 19:38
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**main
(./main.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 78 languages loaded.
(./revtex4-2.cls
Document Class: revtex4-2 2020/10/03 4.2e (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.2e): Modified by Mark Doyle and Phelype Oleinik
.
ltxutil[2020/10/03 4.2e utilities package (portions licensed from W. E. Baxter
web at superscript.com)]
! Undefined control sequence.
<argument> \AddToHook
{begindocument/before}{\document@inithook }
l.211 }
? x
Here is how much of TeX's memory you used:
78 strings out of 493918
768 string characters out of 6150564
52172 words of memory out of 5000000
3498 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
1144 hyphenation exceptions out of 8191
14i,0n,10p,147b,10s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.
\AddToHook
inrevtex4-2
are guarded by conditionals that check if LaTeX is new enough... There is something really strange in your document. Your example compiles fine for me both in a recent and in an old system. Can you please show the.log
file?