DOI link in IEEEtran
Patching the IEEEtran bibtex style to add DOI links, when the URL entity of a bibitem is absent.
2020-06-25
The following shell command will copy a local IEEEtran.bst, which overrides the system one.
cp `kpsewhich IEEEtran.bst` .
patch << EOF
--- IEEEtran.bst    2000-01-01 01:00:00.000000000 +0000
+++ IEEEtranDOI.bst 2000-01-01 01:00:00.000000000 +0000
@@ -262,6 +262,7 @@
     chapter
     day
     dayfiled
+    doi
     edition
     editor
     howpublished
@@ -1908,7 +1909,20 @@
 FUNCTION {format.url}
 { is.use.url
     { url empty$
-      { "" }
+      { doi empty$
+        { "" }
+        { this.to.prev.status
+          this.status.std
+          cap.yes 'status.cap :=
+          name.url.prefix " " *
+          "\url{https://doi.org/" * 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$
+      }
       { this.to.prev.status
         this.status.std
         cap.yes 'status.cap :=
EOF
The same can also be applied to IEEEtransN.