2

is it possible to modify the abbrvnat.bst style from the natbib package so it underlines automatically the doi number in the generated bibliography?

user2536125
  • 1,165

1 Answers1

3

The abbrvnat bibliography style uses \doi for formatting the contents of doi fields. It is possible to write a custom definition for \doi. The example below also loads ulem which defines \uline for underlining text. The command works in some situations where \underline fails.

Output of the example code

\documentclass{article}
\usepackage{natbib}
\usepackage[normalem]{ulem}% \uline
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Rutledge19082014,
author = {Rutledge, Robb B. and Skandali, Nikolina and Dayan, Peter and
  Dolan, Raymond J.},
title = {A computational and neural model of momentary subjective well-being},
volume = {111},
number = {33},
pages = {12252--12257},
year = {2014},
doi = {10.1073/pnas.1407535111}, 
journal = {Proceedings of the National Academy of Sciences},
}
\end{filecontents}
\newcommand{\doi}[1]{doi: \uline{#1}}

\begin{document}
\bibliographystyle{abbrvnat}
\nocite{*}
\bibliography{\jobname}
\end{document}
mvkorpel
  • 1,598