1

I am following the guide from Overleaf on how to use the glossaries package. I am trying to work it with RevTex 4.2. Below is my sample script:

\documentclass[%
 reprint,amsmath,amssymb,aps,
]{revtex4-2}

\usepackage{dcolumn} \usepackage{hyperref} \usepackage[utf8]{inputenc} \usepackage{glossaries} \makeglossaries

\newglossaryentry{latex} { name=latex, description={Is a mark up language specially suited for scientific documents} }

\newglossaryentry{maths} { name=mathematics, description={Mathematics is what mathematicians do} }

\newglossaryentry{formula} { name=formula, description={A mathematical expression} }

\newacronym{gcd}{GCD}{Greatest Common Divisor}

\newacronym{lcm}{LCM}{Least Common Multiple}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} \title{Why Acronyms swill not work? } \maketitle

\clearpage

\printglossary[type=\acronymtype]

\printglossary

\end{document}

The output of this file is only the title with no compilation errors. No glossaries or acronyms appearing. I also tried the acronyms package and again without any compilation errors I get blank output.

What is the solution?

Marion
  • 495

1 Answers1

1

Based on this thread: Is revtex documentclass compatible with glossaries package? The problem has something to do with the "reprint" option in the revtex documentclass

\documentclass[ reprint,amsmath,amssymb,aps, ]{revtex4-2}

I manged to work around this issue by setting the option to "preprint". After running tex and the creation of the glossary files the option can be set to "reprint" again and tex runs without a problem.

Cheers,
Carsten

Carsten
  • 11
  • This actually worked for me as well, setting it to preprint and then back to reprint... – kalle Oct 27 '22 at 09:45
  • I'm pretty sure the OP's issue on this question is just the use of glossaries itself. The issue in Is revtex documentclass compatible with glossaries package? is due to twocolumn (reprint applies this) causing an aux file to be created without some of the directives needed to create the glossary. For that question this should work but will need to be done every time you're updating the glossary files. – Dai Bowen Apr 12 '23 at 13:14