[biblio] Bug in acm.bst

Peter Selinger selinger at mathstat.dal.ca
Fri Oct 10 02:37:22 CEST 2014


Hello,

there's a bug in the ACM bibliography style acm.bst. (Admittedly, this
bibliography style is outdated anyway, having last been modified in
1988. And probably it is not very heavily used). 

The style inserts a comma before "and" in a list of authors, even if
there are only two authors. Example:

\bibitem{Blueprint2013}
{\sc Meter, R.~V., and Horsman, C.}
\newblock A blueprint for building a quantum computer.
\newblock {\em Communications of the ACM 56}, 10 (October 2013), 84--93.

It would be correct to insert such a comma if there are 3 or more
authors (as abbrv.bst does), but not when there are two.

The attached patch fixes this bug. Please apply! Thanks, -- Peter
-------------- next part --------------
diff --git a/acm.bst b/acm.bst
index 5e52a0d..1217eec 100644
--- a/acm.bst
+++ b/acm.bst
@@ -197,9 +197,13 @@ FUNCTION {format.names}
       nameptr #1 >
         { namesleft #1 >
             { ", " * t * }
-            { t "others" =
-                { ", et~al." * }
-                { ", and " * t * }
+            { numnames #2 >
+                { "," * }
+                'skip$
+              if$
+              t "others" =
+                { " et~al." * }
+                { " and " * t * }
               if$
             }
           if$


More information about the biblio mailing list