使用带有ACM参考格式的biblatex时出错

时间:2018-01-23 22:12:26

标签: latex bibtex bibliography biblatex

我正在使用ACM-Reference-Format。我需要根据它们在论文中出现的顺序对引用进行排序,因此我尝试使用biblatex包,如下所示:

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

但后来我收到了以下错误:

enter image description here

我有什么遗漏的吗?谢谢!

1 个答案:

答案 0 :(得分:3)

默认情况下,acm类启用natbib,这与biblatex不兼容。幸运的是,有一个选项可以关闭它。然后,您可以按如下方式使用biblatex,包括sorting=none选项:

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

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

并放

\printbibliography

当您想要打印文档时,在文档中的位置。

sample-sigconf.tex执行此操作并添加\nocite{*}会导致参考书目从以下开始,将Lamport作为第一个参考,而不是以A开头的作者的文章。

Sample output

这是一个证明这一点的最小文档:

\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}

sample-bibliography.bib包含

@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 =         "",
}

pdflatex, bibtex, pdflatex, pdflatex后给出:

Sample output

删除sorting=none选项导致参考书目中的顺序相反。

切换到默认后端biber而不是bibtex,您可以访问biblatex的更多功能。