TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The IEEE Citation Reference specifies that a DOI should be provided for electronic articles without page numbers. However, IEEEtran.bst appears to provide no such functionality. What is the best way to get DOI numbers in the bibliography?

Bonus if the solution also

  • optionally makes display of DOI conditional on a lack of page numbers for conference proceedings only; and/or
  • hyperlinks the DOI (e.g. through the doi or uri packages).

I'll accept a solution that involves editing IEEEtran.bst—this is the approach I'm working on now—but would prefer one that doesn't, if possible.

share|improve this question
    
Have you asked Michael Shell (author of IEEEtran) about this? – Joseph Wright Aug 16 '12 at 17:40
    
@JosephWright I sent him an email concurrently with this question, and I'll report what I hear back. – ezod Aug 16 '12 at 17:53
    
And so you heard nothing back? – Clément Jan 13 '15 at 17:44
1  
He reported in August 2012 that DOI functionality is on the to-do list, and that there is more than just DOI to consider (e.g. ArXiv), so it is more involved than just a quick patch. – ezod Jan 14 '15 at 19:57
up vote 4 down vote accepted

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

share|improve this answer
1  
I think the better way would be to create a new bst file like IEEEtranNDoi.bst and provide a MWE which shows how to use it ... – Kurt Aug 17 '12 at 1:47
    
Applying the patch generates the new bst file. I could provide that, although for the moment I am more interested in comments on the changes. The usage should be (and in this case, is) transparent to the user as compared to the current version of IEEEtranN.bst. – ezod Aug 17 '12 at 3:18

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{http://dx.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{http://dx.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}
share|improve this answer
    
Don't patch the existing IEEEtran.bst because IEEE doesn't like DOIs in the references and they remove it manually. Make an independent one – percusse Jan 21 at 16:09
    
That's why I wrote "copy IEEEtran.bst to IEEEtranDOI.bst" and used \bibliographystyle{IEEEtranDOI} (twice). You will certainly not deny that it is very useful to have that kind of functionality at least in the pre-submission, probably also in the peer-review stage. – bers Jan 21 at 16:11
    
I never assume anything about academicians. – percusse Jan 21 at 16:39
    
I didn't say you told to do so. It's a generic comment. – percusse Jan 21 at 16:42
    
Some comments are completely unnecessary and/or out of place. (This is a generic comment.) – bers Jan 21 at 16:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.