Error when using biblatex with ACM-reference-format
Asked Answered
H

1

14

I am using the ACM-Reference-Format. I need to sort the reference based on the order they appear in the paper, so I tried to use biblatex package like below:

\usepackage[sorting=none]{biblatex}
\bibliographystyle{ACM-Reference-Format}

But then I got the following error:

enter image description here

Is there anything I am missing? Thanks!

Hasen answered 23/1, 2018 at 22:12 Comment(0)
P
22

By default the acm classes turn on natbib which is not comptabile with biblatex. Fortunately there is an option to turn this off. You can then use biblatex as follows, including your sorting=none option:

\documentclass[sigconf,natbib=false]{acmart}

\usepackage[style=ACM-Reference-Format,backend=bibtex,sorting=none]{biblatex}
\addbibresource{sample-bibliography.bib}

and put

\printbibliography

at the point in the document when you want the document printed.

Doing this to sample-sigconf.tex and adding a \nocite{*} results in a bibliography starting as follows, with Lamport as the first reference instead of articles with authors beginning with A.

Sample output

Here is a minimal document demonstrating this:

\documentclass[sigconf,natbib=false]{acmart}

\usepackage[style=ACM-Reference-Format,backend=bibtex,sorting=none]{biblatex}
\addbibresource{sample-bibliography.bib}
\begin{document}
\title{Contribution title}
\author{A. N. Author}
\maketitle

\textcite{Kosiur01} and \textcite{Cohen07}

\printbibliography

\end{document}

where sample-bibliography.bib contains

@Article{Cohen07,
  author        = "Sarah Cohen and Werner Nutt and Yehoshua Sagic",
  title         = "Deciding equivalances among conjunctive aggregate queries",
  journal       = JACM,
  articleno     = "5",
  numpages      = "50",
  volume        = "54",
  number        = "2",
  month         = apr,
  year          = "2007",
  doi           = "10.1145/1219092.1219093",
  url           = "http://doi.acm.org/10.1145/1219092.1219093",
  acmid         = "1219093",
  note          = "",
}

@Book{Kosiur01,
  author =       "David Kosiur",
  title =        "Understanding Policy-Based Networking",
  publisher =    "Wiley",
  year =         "2001",
  address =      "New York, NY",
  edition =      "2nd.",
  editor =       "",
  volume =       "",
  number =       "",
  series =       "",
  month =        "",
  note =         "",
}

giving after pdflatex, bibtex, pdflatex, pdflatex:

Sample output

Removing the sorting=none option results in the opposite order in the bibliography.

Switching to the default backend biber instead of bibtex will give you access to more features of biblatex.

Pilferage answered 24/1, 2018 at 9:15 Comment(13)
I tried the above, but keep getting ACM-Reference-Format not found error ...saying l.13046 \RequireBibligographyStyle{\blx@bbxfile} and I do have my ACM-Reference-Format.bst in the folder. Is this approaching conflicting with this bst? or did I miss anything?Hasen
I have this: \documentclass[sigplan,10pt,review, natbib=false]{acmart}\settopmatter{printccs=false,printacmref=false,printfolios=true}Hasen
The files you need are ACM-Reference-Format.bbx, ACM-Reference-Format.cbx and ACM-Reference-Format.dbx. They are all part of the standard acm distribution. The .bst file is for standard bibtex; biblatex uses these other files.Pilferage
added those files. Then I got new errors: File ended while scanning use of \@writefil <inserted text> \par l.80 \begin{document} ? Any ideas?Hasen
You may need to clean out any temporary files you have lying around first. Otherwise we need to see more code to help debug. I'll add a minimal document to my answer so you can see what works.Pilferage
worked after clean the temp file (copy *.tex to a new file). Thank you very much!Hasen
@AndrewSwann where can I download these files?Unthankful
@HendyIrawan The standard site is acm.org/publications/authors/submissionsPilferage
Are the lower-case r and f in the answer typos? The discussion above and my experience (TexLive, Linux) indicates that they must be upper-case?Oller
@Oller The code works originally as posted - the case seems to be irrelevant. However, I will update to match the file names in the latest version.Pilferage
I guess filesystem case-sensitivity is behind this, then. MacOS and Windows usually don't have case-sensitive file names. Can confirm that file on my system has a title-case name.Oller
@Oller That sounds like a correct analysis. The edited version should now work regardless of OS.Pilferage
Since March 2022, it seems we should use style=acmnemeric or style=acmauthoryear.Oller

© 2022 - 2024 — McMap. All rights reserved.