12

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!

Edamame
  • 23,718
  • 73
  • 186
  • 320

1 Answers1

17

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.

Andrew Swann
  • 876
  • 16
  • 25
  • 3
    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? – Edamame Jan 26 '18 at 19:45
  • I have this: \documentclass[sigplan,10pt,review, natbib=false]{acmart}\settopmatter{printccs=false,printacmref=false,printfolios=true} – Edamame Jan 26 '18 at 19:46
  • 3
    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. – Andrew Swann Jan 27 '18 at 14:26
  • added those files. Then I got new errors: File ended while scanning use of \@writefil \par l.80 \begin{document} ? Any ideas? – Edamame Jan 28 '18 at 04:50
  • 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. – Andrew Swann Jan 28 '18 at 11:13
  • worked after clean the temp file (copy *.tex to a new file). Thank you very much! – Edamame Jan 28 '18 at 19:16
  • @AndrewSwann where can I download these files? – Hendy Irawan Dec 01 '18 at 15:08
  • 1
    @HendyIrawan The standard site is https://www.acm.org/publications/authors/submissions – Andrew Swann Dec 01 '18 at 18:37
  • 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? – golvok Dec 22 '18 at 00:14
  • @golvok 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. – Andrew Swann Dec 22 '18 at 11:40
  • 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. – golvok Dec 22 '18 at 16:50
  • @golvok That sounds like a correct analysis. The edited version should now work regardless of OS. – Andrew Swann Dec 23 '18 at 11:41