DOI in IEEEtran bibliography

I've created a patch to IEEEtranN.bst that does the trick, including the "bonus" features.


I use this approach to hyperlink the article title:

First, copy IEEEtran.bst to IEEEtranDOI.bst.

In the ENTRY field around line 250, add a line like this:

  dayfiled
+ doi
  edition

In the FUNCTION {format.article.title} field around line 1400, add a line like this:

  "title" bibinfo.check
+ doi empty$ {} { "\href{https://doi.org/" doi * "}{" * swap$ * "}" * } if$
  duplicate$ empty$ 'skip$

Then use \usepackage{hyperref} and \bibliographystyle{IEEEtranDOI} and it should work. Use \usepackage[hidelinks]{hyperref} if you like hyperlinks invisible.

This is a patch I created for today's IEEEtran.bst using diff -c IEEEtran.bst IEEEtranDOI.bst:

*** IEEEtran.bst        2015-08-26 16:56:09.000000000 -0400
--- IEEEtranDOI.bst     2016-01-20 14:17:48.216975400 -0500
***************
*** 262,267 ****
--- 262,268 ----
      chapter
      day
      dayfiled
+     doi
      edition
      editor
      howpublished
***************
*** 1419,1424 ****
--- 1420,1426 ----
      }
    if$
    "title" bibinfo.check
+   doi empty$ {} { "\href{https://doi.org/" doi * "}{" * swap$ * "}" * } if$
    duplicate$ empty$ 'skip$
      { quote.close 'this.status.quote :=
        is.last.char.not.punct

And here's an MWE to test your IEEEtranDOI.bst:

\documentclass{IEEEtran}
\usepackage{hyperref}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @article{Example,
        author = {Author, The},
        doi = {10.1000/182},
        journal = {Awesome Journal},
        title = {{This is the title, click to go to doi}},
        year = {2016},
    }
\end{filecontents}
\begin{document}
    \nocite{*}
    \bibliographystyle{IEEEtranDOI}
    \bibliography{\jobname}
\end{document}