I am struggling with LaTeX on Overleaf. I am trying to produce a bibliography and I can, however, only if I select the article class. If I switch to RevTex4-1, it still produces the output I want, but also 14 errors... preventing me to export the project. my code is:
\documentclass{article} %I do not want this one
%\documentclass[preprint,superscriptaddress]{revtex4-2} I want this one, but is does not work!
\usepackage[backend=biber,style=numeric,citestyle=nature]{biblatex}
\addbibresource{BIB_test.bib} %Imports bibliography file
\begin{document}
First cite this guy\cite{hallo}, next this one\cite{world}.
\printbibliography
\end{document}
the bibfile is:
@article{hello,
author = {Cao, G. and McCall, S. and Crow, J. E. and Guertin, R. P.},
journal = {Physical Review Letters},
number = {9},
pages = {1751--1754},
title = {{Observation of a metallic antiferromagnetic phase and metal to nonmetal transition in Ca$_3$Ru$_2$O$_7$}},
volume = {78},
year = {1997}
}
@article{world,
author = {Alexander, C. S. and Cao, G. and Dobrosavljevic, V. and {Mc Call}, S. and Crow, J. E. and Lochner, E. and Guertin, R. P.},
doi = {10.1103/PhysRevB.60.R8422},
journal = {Phys. Rev. B},
number = {12},
pages = {R8422--R8425},
title = {{Destruction of the Mott insulating ground state of Ca$_2$RuO$_4$ by a structural transition}},
volume = {60},
year = {1999}
}
The main error I receive is that I should put \end{document} in the preamble. That cannot be true right?
revtex4-1is marked obsolete, you should probably move torevtex4-2in any case. Also please provide a sample bib file such that others can easily test your code, and please cite the errors you get in overleaf. (you might want to mark your question with theoverleaftag) – daleif Dec 17 '20 at 09:16revtexandbiblatexare incompatible, that's the issue. – yo' Dec 17 '20 at 09:39\bibliographystyle{naturemag}at the end of the code, which does work with Revtex. @yo' Tom, interestingly I had to start a new Overleaf project in order to have it work. My code is equal but starting a new code is a prerequisite. Again thanks for the help! – RFermin Dec 18 '20 at 08:31