My tex file is running without any issue. But when I try to incorporate bibliography, the references are not getting generated. I've added the citation to bib file using JabRef and also defined the citation style correctly. I'm using revtex 4.2 for typing my article.
[Tex/LaTex] Revtex 4.2 Bibliography not working
bibtexpdftexrevtex
Best Answer
Do make sure that your tex file doesn't include any whitespace characters in the file name.
If the name of the tex file is
1st draft updated.tex
, LaTeX creates an associated aux file named1st draft updated.aux
. Among the pieces of information written to the aux file are the name(s) of the bib file(s), the bibliography style that's supposed to be employed, and the arguments of\cite
-like instructions. BibTeX peruses the aux file, not the tex file, in order to find out what it's supposed to do. As you've (re)discovered, BibTeX cannot handle whitespace characters in file names.Summing up: The issue you've encountered is not related to either the
revtex4-2
document class or theapsrev4-2
bibliography style. To "fix" the problem, simply change the name of the tex file from1st draft updated.tex
to1stdraftupdated.tex
(or some other name that doesn't contain space characters) and perform a full recompile cycle: LaTeX, BibTeX, and LaTeX twice more.The name of the file that the contains the following code is
test.tex
-- note the absence of whitespace.