0

I am using the RevTex 4.2 template from Overleaf, found here. https://www.overleaf.com/latex/templates/revtex-4-dot-2-template-and-sample/yydsrzvrqrzs

When I try and do a Word Count, I get an error message saying "Could not identify document class"

Here is the (unedited) documentclass declaration.

\documentclass[%
reprint,
%superscriptaddress,
%groupedaddress,
%unsortedaddress,
%runinaddress,
%frontmatterverbose, 
%preprint,
%preprintnumbers,
%nofootinbib,
%nobibnotes,
%bibnotes,
 amsmath,amssymb,
 aps,
%pra,
%prb,
%rmp,
%prstab,
%prstper,
%floatfix,
]{revtex4-2}

This error occurs with the basic template files, even before I changed anything. Any ideas?

chasmani
  • 101
  • I wonder if the newlines are confusing Overleaf. Could you try \documentclass[reprint,amsmath,amssymb,aps]{revtex4-2}? – Teepeemm Aug 27 '19 at 16:09
  • As Teepeemm mentioned, this is the same problem as in https://tex.stackexchange.com/q/160724/21344 (though it is texcount not Overleaf getting confused :-). If you can condense the document class and options into one line, it will solve the problem. – Paul Gessler Aug 27 '19 at 16:15
  • Thanks @Teepeemm, I tried that but still get the error. I also tried \documentclass{revtex4-2}, but still get the same error. Maybe there is a problem somewhere else – chasmani Aug 27 '19 at 16:58
  • @chasmani did you recompile the project after making that change? Because I tested with the template files, condensing the document class down to one line, and the error goes away for me. In any event, the word count is still reported correctly despite the error message that texcount emits. If you still have problems, please write us at support@overleaf.com with your project’s URL. There may be something else with your project that’s causing this, and project-specific issues are better handled through our support channel. (I’m on support staff at Overleaf.) – Paul Gessler Aug 27 '19 at 17:26
  • @PaulGessler thankyou. Yeah you're right I was able to make the error go away on the template project, but it still won't work on my own project. I'll email support, thank you – chasmani Aug 28 '19 at 09:10

0 Answers0