Can you please help me identify what is wrong with my coding? I've searched online for solutions but I couldn't find a working one. Before, I used article
for my \documentclass
to complete my thesis. Now, they required me to use revtex4-2
as the \documentclass
. So, I modified some of the lines from the coding but it keeps on giving me errors probably because some of the packages don't work in the revtex4-2
class but I couldn't figure out what.
Here is my preamble for the coding:
\documentclass[%
aip,
% jmp,
% bmf,
% sd,
% rsi,
cp, % Conference Proceedings
amsmath,amssymb,%nobibnotes,
% preprint,%
reprint,%
%author-year,%
%author-numerical,%
]{revtex4-2}
\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
%\usepackage[mathlines]{lineno}% Enable numbering of text and display math
%\linenumbers\relax % Commence numbering lines
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%% Loads a Times-like font. You can also load
%% {newtxtext,newtxtmath}, but not {times},
%% {txfonts} nor {mathtpm} as these packages
%% are obsolete and have been known to cause problems.
\usepackage{mathptmx}
\usepackage{paralist}
\usepackage{natbib}
\usepackage[figuresright]{rotating}
\usepackage{lscape}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{calc}
\usepackage{slashbox}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{color}
\usepackage[hmarginratio=2:3]{geometry}
\usepackage{epstopdf}
\usepackage{afterpage}
\usepackage{changepage}
\usepackage[table]{xcolor}
\usepackage{makecell}
\usepackage{mathtools}
\usepackage{algorithmic}
\usepackage[section]{algorithm}
\usepackage{float}
\usepackage{placeins}
\usepackage{afterpage}
\usepackage{url}
\allowdisplaybreaks
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\newcommand{\dv}{\mid}
\newcommand{\ndv}{\nmid}
\citestyle{apa}
\renewcommand{\baselinestretch}{1.5}
\begin{document}
Here's the error notification:
! Extra \endgroup.
\document -> \endgroup
\document@inithook \true@sw {}\UseOneTimeHook {begindo...
Sorry if my information isn't enough because I'm still new here. I don't know what else to provide you with. Thank you so much in advance for your help.
\listfiles
command. When compiling the document, it will display the versions of all the used packages, along with the version of the document class. In that console output, what version is mentioned forrevtex4-2.cls
? Is it anything other than 4.2e? On my device, it saysrevtex4-2.cls 2020/10/03 4.2e (https://journals.aps.org/revtex/ for documentation)
. The answer at tex.stackexchange.com/a/565864/256551 is the reason I ask about this version.