[Tex/LaTex] How to get bibliography with DOI instead of URL in elsarticle

bibliographiesdoielsarticle

I'm using

\documentclass[final,3p,twocolumn,number, sort&compress]{elsarticle}

\bibliographystyle{elsarticle-harv}

\begin{document}

Text citing an article \cite{Andersen20132}.

\bibliography{references}

\end{document}    

My bibtex-file references.bib contains this entry:

@Article{Andersen20132,
  Title                    = {Long term forecasting of hourly electricity consumption in local areas in Denmark },
  Author                   = {F.M. Andersen and H.V. Larsen and R.B. Gaardestrup},
  Journal                  = {Applied Energy },
  Year                     = {2013},
  Number                   = {0},
  Pages                    = {147 - 162},
  Volume                   = {110},
  Doi                      = {http://dx.doi.org/10.1016/j.apenergy.2013.04.046},
  ISSN                     = {0306-2619},
  Keywords                 = {Long term electricity consumption},
  Owner                    = {aki},
  Timestamp                = {2014.05.07},
  Url                      = {http://www.sciencedirect.com/science/article/pii/S0306261913003413}
}

Elsevier recommends to use DOI in bibliography entries. However, URL is printed instead of DOI.

How can I change this?

Best Answer

The elsarticle-harv.bst style file does not provide any support for DOIs.

What you can do is to use the url field to set the DOI

Url                      = {http://dx.doi.org/10.1016/j.apenergy.2013.04.046}

and put this line in the preamble:

\def\urlprefix{DOI }

MWE

\begin{filecontents*}{references.bib}
@Article{Andersen20132,
  Title                    = {Long term forecasting of hourly electricity consumption in local areas in Denmark },
  Author                   = {F.M. Andersen and H.V. Larsen and R.B. Gaardestrup},
  Journal                  = {Applied Energy },
  Year                     = {2013},
  Number                   = {0},
  Pages                    = {147 - 162},
  Volume                   = {110},
  ISSN                     = {0306-2619},
  Keywords                 = {Long term electricity consumption},
  Owner                    = {aki},
  Timestamp                = {2014.05.07},
  Url                      = {http://dx.doi.org/10.1016/j.apenergy.2013.04.046}
}
\end{filecontents*}

\documentclass[final,3p,twocolumn,number, sort&compress]{elsarticle}

\usepackage{url} % just for breaking urls

\def\urlprefix{DOI }

\begin{document}

Text citing an article \cite{Andersen20132}.

\bibliographystyle{elsarticle-harv}
\raggedright
\bibliography{references}

\end{document} 

Output

enter image description here

Related Question