borisveytsman / acmart

ACM consolidated LaTeX styles
567 stars 249 forks source link

ACM-Reference-Format for biblatex inserts "edition" when unneeded #359

Open ghost opened 4 years ago

ghost commented 4 years ago

Running the usual pdflatex+biber loop on

\documentclass[natbib=false]{acmart}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Graetzer-UniversalAlgebra,
  author = {George A. Grätzer},
  title = {Universal Algebra},
  year = 1979,
  edition=2,
  publisher={Springer}
}
@book{Graetzer-UniversalAlgebraNew,
  author = {George A. Grätzer},
  title = {Universal Algebra},
  year = 2008,
  edition="Second edition with updates",
  publisher={Springer},
  isbn={978-0-387-77486-2}
}
\end{filecontents}
\usepackage[backend=biber,bibstyle=ACM-Reference-Format]{biblatex} %%% bad edition formatting
%\usepackage[backend=biber]{biblatex}%%% edition ok
\addbibresource{\jobname.bib}
\begin{document}
\cite{Graetzer-UniversalAlgebra,Graetzer-UniversalAlgebraNew}
\printbibliography
\end{document}

produces

[1, 2]
REFERENCES
[1] George A. Grätzer. 1979. Universal Algebra. (2nd edition). Springer.
[2] George A. Grätzer. 2008. Universal Algebra. (Second edition with updates edition). Springer. isbn: 978-0-387-77486-2.

Note the duplication of the word "edition" for [2]. This should not happen, and it doesn't happen for the default bibstyle (commented out):

[1, 2]
REFERENCES
[1] George A. Grätzer. Universal Algebra. 2nd ed. Springer, 1979.
[2] George A. Grätzer. Universal Algebra. Second edition with updates. Springer, 2008. isbn: 978-0-387-77486-2.
fsaad commented 4 years ago

The citation above seems like a tricky edge case for bibtex. Specifying edition="Second edition with updates" is not valid in bibtex, per Sec 3.2 Fields of the bibtex manual:

edition: The edition of a book—for example, “Second”. This should be an ordinal, and should have the first letter capitalized, as shown here; the standard styles convert to lower case when necessary.

However, it is valid biblatex, per Sec 2.2.2 Data Fields of the biblatex manual:

edition field (integer or literal) The edition of a printed publication. This must be an integer, not an ordinal. Don’t say edition={First} or edition={1st} but edition={1}. The bibliography style converts this to a language dependent ordinal. It is also possible to give the edition as a literal string, for example “Third, revised and expanded edition”.