}
{}
{ label }
+
+STRINGS { doiprefix doiurl }
+INTEGERS { hrefform }
+FUNCTION {init.doi.variables}
+{
+ "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+ "doi:" 'doiprefix := % text prefix printed before DOI ref
+ #2 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
+}
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
FUNCTION {init.state.consts}
{ #0 'before.all :=
if$
}
+FUNCTION {make.href.null}
+{
+ pop$
+}
+
+FUNCTION {make.href.hypertex}
+{
+ "\special {html:<a href=" quote$ *
+ swap$ * quote$ * "> }" * swap$ *
+ "\special {html:</a>}" *
+}
+
+FUNCTION {make.href.hyperref}
+{
+ "\href {" swap$ * "} {\path{" * swap$ * "}}" *
+}
+
+FUNCTION {make.href}
+{ hrefform #2 =
+ 'make.href.hyperref % hrefform = 2
+ { hrefform #1 =
+ 'make.href.hypertex % hrefform = 1
+ 'make.href.null % hrefform = 0 (or anything else)
+ if$
+ }
+ if$
+}
+
FUNCTION {format.doi}
{ doi empty$
{ "" }
- {
- new.block
- "\doi{" doi * "}" *
- }
+ { doiprefix doi * doiurl doi * make.href }
if$
}
FUNCTION {format.note}
write$ newline$
}
EXECUTE {begin.bib}
+EXECUTE {init.doi.variables}
EXECUTE {init.state.consts}
ITERATE {call.type$}
FUNCTION {end.bib}