I'm using revtex-4-2
to write my manuscript and want to include clickable links (doi) in my bibliography. If I use the doi
package, I get an error (LaTeX Error: Command \doi already defined.
) even though the compilation seems ok. How do I fix this? Here is my MWE (adapted from Overleaf template):
\documentclass[prb,floatfix,reprint]{revtex4-2}
\usepackage{doi}
\begin{document}
\preprint{APS/123-QED}
\title{paper title}
\author{Ann Author}
\altaffiliation[Also at ]{Physics Department, XYZ University.}
\author{Second Author}
\email{[email protected]}
\affiliation{Authors' institution and/or address}
\collaboration{MUSO Collaboration}
\author{Charlie Author}
\homepage{http://www.Second.institution.edu/~Charlie.Author}
\affiliation{Second institution and/or address}
\affiliation{Third institution, the second for Charlie Author}
\author{Delta Author}
\affiliation{Authors' institution and/or address}
\collaboration{CLEO Collaboration}
\begin{abstract}
This is my abstract. This is a useful reference \cite{mylabel}.
\end{abstract}
\keywords{Suggested keywords}
\maketitle
\bibliography{myref}
\end{document}
and bibtex file
@PREAMBLE{
"\providecommand{\noopsort}[1]{}"
# "\providecommand{\singleletter}[1]{#1}%"
}
@article{mylabel,
author = "J. Pleschiutschnig and O. Blaschko and W. Reichardt",
title = "Lattice dynamics of lutetium",
journal = "Phys. Rev. B",
volume = "41",
pages = "975",
year = "1990",
doi = "10.1103/PhysRevB.41.975",
}
\usepackage{doi}
and insert\usepackage{hyperref}
then revtex will insert links to the DOIs, is this sufficient?