1

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

2
  • 1
    It would be great if you could show us what you have tried. Posting a minimal working example that indicates what you are trying to do makes it easier for people to understand what you want. It also makes it easier for people to help you, since they have some code to start from, and hence much more likely that some one will try to help you.
    – user30471
    Oct 6 '17 at 9:00
  • Seems to not quite be a MWE as there are other pieces of code needed to get this piece of code functioning in the bst file.
    – Stephen
    Mar 12 '20 at 1:26
2

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$
}
0

Recently. I got the helpful hints thanks to the ticket #394811. However, I had to modify the existing statements to append a DOI (Digital Object Identifier) in the reference section of the T-CE journal (Transactions on Consumer Electronics). So, I modified the below statements as follows.

  name.doi.prefix ", " *
  "doi: \href{http://dx.doi.org/" * doi * "}{\doi{" * doi * "}}" *
  name.doi.postfix ". " *

The content of the " FUNCTION {format.doi}" is as folows.

%% DOI
%% added by GQMJr
%% Modified by Geunsik Lim on Apr-05-2020 for T-CE.
FUNCTION {format.doi}
{ doi empty$
    { "" }
    { this.to.prev.status
      this.status.std
      cap.yes 'status.cap :=
      name.doi.prefix ", " *
      "doi: \href{http://dx.doi.org/" * doi * "}{\doi{" * doi * "}}" *
      name.doi.postfix ". " *
      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$
}

And then, The DOI is successfully generated. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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