[Tex/LaTex] How to get DOI links in bibliography

bibtexdoihyperrefnatbib

I would like to add to all my bibliography items a DOI (Digital Object Identifier) link or a link to a download location.

How can I do this with the natbib / BibTeX / hyperref combination? Currently I am using the plainnat style, but I'm willing to change that.

Best Answer

Include your DOIs in the BibTeX database under the doi field and include the URLs under the url field; for example:

\begin{filecontents*}{test.bib}
@article{foo2010,
  author = "Foo Bar",
  journal = "J.P.B.",
  year = 2010,
  title = "Where the wild things are.",
  doi = {10.1.1/jpb001},
  url = {http://dx.doi.org/10.1.1/jpb001}
}
\end{filecontents*}

\documentclass{article}
\usepackage{natbib,hyperref}
\begin{document}
test \citet{foo2010}
\bibliographystyle{plainnat}
\bibliography{test}
\end{document}

If you wish to hyperlink the DOI, I believe that loading the doi package will perform this automatically.