I am using apacite
, natbib
and hyperref
to reference my article in APA style on TexWorks using BibTex. I would like for the DOIs in my bibliography to link to their DOI URLs.
Using the package doi
converts them to links, but every link in my bibliography now shows up as, e.g.
Author. (year). Title.Journal. Vol (Issue).pages. doi:
doi:10.2214/ajr.12.9928
The entry in my .bib file contains
doi = {10.2214/ajr.12.9928},
How do I remove the extra 'doi:'?
Best Answer
There are several ways to deal with this.
Tell the
doi
package to drop its "doi:" prefix, which is saved in\doitext
.Tell
apacite
to drop its "doi:" prefix, which is saved in\doiprefix
.Build your own
\doi
command without prefix and don't load thedoi
package. Since you are loadinghyperref
I recommend to follow the slightly more complicated approach by Michael Ummels in Getting those %#!^& signs in the footnote!. That will allow you to use 'dangerous' characters in the DOI without having to worry about most of them (as opposed to the more straightforward\newcommand{\doi}[1]{\href{https://doi.org/#1}{#1}}
, which would break if the DOI contained#
or%
.).