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.
\listfilescommand. 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 https://tex.stackexchange.com/a/565864/256551 is the reason I ask about this version. – Miriam Briskman Nov 14 '21 at 14:59MiKTeXconsole, and go to theUpdatestab on the left-hand side, do you seerevtexas one of the available updates (after you click onCheck for updates? You may need to scroll a bit to find it if it is there.) If yes, confirm that the version ofrevtexunder theAvailablecolumn is4.2e, and proceed with the installation by clicking onUpdate Now[You may uncheck other packages from being installed.] Let me know if this is not the case, as we can alternatively do a manual install. – Miriam Briskman Nov 15 '21 at 01:51revtexinside the Console by clicking on thePackagestab on the left side. On that page, enterrevtexinto the search (filter) bar, and click on the small funnel icon to see the results forrevtex. Afterward, right-clickrevtexand choose "Package Information". You will then see the version of the currently-installedrevtexpackage. Is that version number4.2eor4.2b, as you saw earlier during compilation? – Miriam Briskman Nov 15 '21 at 16:184.2eis installed inside your user's account. Could you, please, also re-open theMiKTeXconsole, but this time by right-clicking and choosingRun as administrator``, and check the version ofrevtexthere too? As @UlrikeFischer explained,MiKTeXinstalls packages separately for each user, but some packages are installed for all the users. As such, we need to ensure that the version ofrevtexis4.2e``` in that general installation or, if not, update it. Let me know what you see. – Miriam Briskman Nov 15 '21 at 22:31Hellowith your preamble. I got an error about not having theslashboxpackage. It turns out that theslashboxpackage has been superseded by the diagmac2 package. So I commented out the\usepackage{slashbox}line and added\usepackage{diagmac2}and I got no errors. – Máté Wierdl Nov 17 '21 at 12:48https://drive.google.com/file/d/1JTrhPZpZUXssA24g_49pMOTQTSb4dFPz/view
– Azmadi M Nov 17 '21 at 18:42\listfilescommand shows that4.2bis the version, while theMiKTeXConsole shows it's4.2e. ThepdfLaTeXcompiler in the video you took uses libraries atC:\Users\madie\AppData\Local\Programs\MiKTeX\. However, inside theMiKTeXConsole underSettings>Directories, whatPathis displayed forInstall,User? This question's intention is to rule out the case of multiple installs ofMiKTeX. – Miriam Briskman Nov 17 '21 at 19:05TeXdocument, and make the body be as short as\begin{document} Foo \end{document}, does the compilation of that new document produce the sameExtra \endgrouperror? Try the method at https://tex.stackexchange.com/a/354/256551 to change orientation. I too see therevtex4package as uncategorized on my device as you do, so most likely it is not related to the error. – Miriam Briskman Nov 17 '21 at 19:30Class revtex4-2 Warning: Repair the float package.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
– Azmadi M Nov 17 '21 at 19:42revtexlibrary (revtex4-2.cls) at the locationC:\Users\madie\Dropbox/PC/Downloads/FYP/TO BE PUBLISHED/ConfTemplate-20211114T010429X-001was used during compilation. However, therevtexlibrary that should be used must be the one atC:\Users\madie\AppData\Local\Programs\MiKTeX\tex/latex/revtex\. As such, can you (temporarily) move theFYPfolder fromDownloadsto a different folder, and then re-compile the doc? What does the console show? – Miriam Briskman Nov 17 '21 at 21:06C:\Users\madie\Dropbox/PC/Downloads/FYP/TO BE PUBLISHED/ConfTemplate-20211114T010429X-001folder is where you are trying to run the document from, could you remove therevtex4-2.clsfiles from this folder away to a different temporary folder? If your current folder containsrevtex4-2.cls, it will be used instead of the updatedMiKTeXversion ofrevtex. Perhaps, this "local" copy ofrevtex4-2.clsis the reason for the error, which also explains the different error messages across the different folders. – Miriam Briskman Nov 17 '21 at 21:13\begin{document}. – Máté Wierdl Nov 18 '21 at 02:21TeXusers who encounter a similar issue. Good luck! – Miriam Briskman Nov 18 '21 at 06:29