]> gitweb.michael.orlitzky.com - mjotex.git/blobdiff - mjo.bst
Whitespace cleanup.
[mjotex.git] / mjo.bst
diff --git a/mjo.bst b/mjo.bst
index e35241dcea13cbf150fe8a9bee1e6e8bff75d844..3bf6e633466ae3a0fe0a34f5a81c9747f34a0c8b 100644 (file)
--- a/mjo.bst
+++ b/mjo.bst
@@ -66,6 +66,13 @@ ENTRY
   }
   {}
   { label }
+
+STRINGS { doiprefix doiurl }
+FUNCTION {init.doi.variables}
+{
+  "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
+  "doi:" 'doiprefix :=      % text prefix printed before DOI ref
+}
 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
 FUNCTION {init.state.consts}
 { #0 'before.all :=
@@ -304,46 +311,6 @@ MACRO {nov} {"Nov."}
 
 MACRO {dec} {"Dec."}
 
-MACRO {acmcs} {"ACM Computing Surveys"}
-
-MACRO {acta} {"Acta Informatica"}
-
-MACRO {cacm} {"Communications of the ACM"}
-
-MACRO {ibmjrd} {"IBM Journal of Research and Development"}
-
-MACRO {ibmsj} {"IBM Systems Journal"}
-
-MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
-
-MACRO {ieeetc} {"IEEE Transactions on Computers"}
-
-MACRO {ieeetcad}
- {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
-
-MACRO {ipl} {"Information Processing Letters"}
-
-MACRO {jacm} {"Journal of the ACM"}
-
-MACRO {jcss} {"Journal of Computer and System Sciences"}
-
-MACRO {scp} {"Science of Computer Programming"}
-
-MACRO {sicomp} {"SIAM Journal on Computing"}
-
-MACRO {tocs} {"ACM Transactions on Computer Systems"}
-
-MACRO {tods} {"ACM Transactions on Database Systems"}
-
-MACRO {tog} {"ACM Transactions on Graphics"}
-
-MACRO {toms} {"ACM Transactions on Mathematical Software"}
-
-MACRO {toois} {"ACM Transactions on Office Information Systems"}
-
-MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
-
-MACRO {tcs} {"Theoretical Computer Science"}
 FUNCTION {bibinfo.check}
 { swap$
   duplicate$ missing$
@@ -482,13 +449,13 @@ FUNCTION {format.issn}
   if$
 }
 
+FUNCTION {make.href}
+{ "\href {" swap$ * "} {\path{" * swap$ * "}}" * }
+
 FUNCTION {format.doi}
 { doi empty$
     { "" }
-    {
-      new.block
-      "\doi{" doi * "}" *
-    }
+    { doiprefix doi * doiurl doi * make.href }
   if$
 }
 FUNCTION {format.note}
@@ -1449,8 +1416,13 @@ FUNCTION {begin.bib}
   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}
 EXECUTE {init.state.consts}
 ITERATE {call.type$}
 FUNCTION {end.bib}