[Tex/LaTex] biblatex style matching stock ACM style

biblatex

Has anyone done a biblatex bibliography style that matches the stock acm.bst as far as formatting? I want biblatex's more sophisticated handling of things like URLs, but the journal I'm submitting to specifies ACM-style formatting.

Best Answer

With Alan Munn's cautionary note in mind, here's something that should get you started. First, an example of traditional BibTeX using acm.bst:

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{Bli74,
  author = {Blinder, Alan S.},
  year = {1974},
  title = {The economics of brushing teeth},
  journal = {Journal of Political Economy},
  volume = {82},
  number = {4},
  pages = {887--891},
}
@book{Kot11,
  author = {Kottwitz, Stefan},
  year = {2011},
  title = {\LaTeX\ Beginner's Guide},
  address = {Birmingham},
  publisher = {Packt Publishing},
}
\end{filecontents}

\begin{document}

\nocite{*}

\bibliographystyle{acm}
\bibliography{\jobname}

\end{document}

enter image description here

And the same example using biblatex and its configuration possibilities. (Note the differences in the .bib file: journal is replaced with journaltitle, address is replaced with location.)

Some additional tweaks are specified here for multiple-author works, but more may be needed for other entry categories; see Guidelines for customizing biblatex styles for further advice.

\documentclass{article}

\usepackage[style=numeric,firstinits=true]{biblatex}% "style=numeric" is default

\DeclareNameAlias{default}{last-first}

\AtBeginBibliography{%
  \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}%
  %% commas between authors
  \renewcommand{\multinamedelim}{\addcomma\space}
  \renewcommand{\finalnamedelim}{\addcomma\addspace\textsc{and}\space}
}

\DefineBibliographyStrings{english}{%
 andothers = {\addcomma\addspace\textsc{et\addabbrvspace al}\adddot},
 and = {\textsc{and}}
}

\renewcommand*{\labelnamepunct}{\space\space}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1}

\renewbibmacro{in:}{%
  \ifentrytype{article}{%
  }{%
    \printtext{\bibstring{in}\intitlepunct}%
  }%
}

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addcomma\space}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\DeclareFieldFormat{pages}{#1}

\renewbibmacro*{publisher+location+date}{%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
  \newunit}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{Bli74,
  author = {Blinder, Alan S.},
  year = {1974},
  title = {The economics of brushing teeth},
  journaltitle = {Journal of Political Economy},
  volume = {82},
  number = {4},
  pages = {887--891},
}
@book{Kot11,
  author = {Kottwitz, Stefan},
  year = {2011},
  title = {\LaTeX\ Beginner's Guide},
  location = {Birmingham},
  publisher = {Packt Publishing},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

enter image description here