{ 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}
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$
-}
+{ "\href {" swap$ * "} {\path{" * swap$ * "}}" * }
FUNCTION {format.doi}
{ doi empty$
write$ newline$
" \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
write$ newline$
+ "\expandafter\ifx\csname href\endcsname\relax"
+ write$ newline$
+ " \def\href#1#2{#2} \def\path#1{#1}\fi"
+ write$ newline$
}
EXECUTE {begin.bib}
EXECUTE {init.doi.variables}