[Tex/LaTex] Hyperlink in DOI in IEEEtran Bibliography

bibliographiesdoihyperrefieee-styleieeetran

Previously, including a DOI in a IEEEtran-styled bibliography has been discussed on TexExchange under the title DOI in IEEEtran bibliography and a solution has been provided in form of a patch [1]. However, the solution does not feature a hyperlink for the DOI. One of the particular benefits of using a DOI is the universal and unique URL that links to the respective archive: http://dx.doi.org/ + «DOI»

How can I make the DOI "clickable", i.e. provide a seamless (hyperref) hyperlink that will open a webbrowser when I click on the DOI?

[1] https://gist.github.com/ezod/3373556

Best Answer

The patch provides a function for inserting the DOI:

%% DOI

FUNCTION {format.doi}
{ doi empty$
    { "" }
    { this.to.prev.status
      this.status.std
      cap.yes 'status.cap :=
      name.doi.prefix " " *
      "\doi{" * doi * "}" *
      punct.no 'this.status.punct :=
      punct.period 'prev.status.punct :=
      space.normal 'this.status.space :=
      space.normal 'prev.status.space :=
      quote.no 'this.status.quote :=
    }
  if$
}

Replace the line which inserts the DOI

"\doi{" * doi * "}" *

by

"\href{http://dx.doi.org/\doi{" * doi * "}}{\doi{" * doi * "}}" *

to yield the augmented DOI that includes a hyperlink.

That is, the function is replaced with the code %% DOI

FUNCTION {format.doi}
{ doi empty$
    { "" }
    { this.to.prev.status
      this.status.std
      cap.yes 'status.cap :=
      name.doi.prefix " " *
      "\href{http://dx.doi.org/\doi{" * doi * "}}{\doi{" * doi * "}}" *
      punct.no 'this.status.punct :=
      punct.period 'prev.status.punct :=
      space.normal 'this.status.space :=
      space.normal 'prev.status.space :=
      quote.no 'this.status.quote :=
    }
  if$
}
Related Question