[Tex/LaTex] Problem with ACM bibliography style

acmacmartbibliographies

I am writing a paper for an ACM journal. The problem is when I use the following commands:

\bibliographystyle{ACM-Reference-Format} 
\bibliography{references}

the references appear without number. And when I replace “ACM-Reference-Format” with “acm” in the “\bibliographystyle” command, the references with URL loose their URLs. I'm wondering if anyone knows how I can solve this problem. My goal is to have a numbered reference list in which URLs do not disappear. I am working in Overleaf environment and use Mendeley to import my references to the Overleaf. Any advice is appreciated.

Best Answer

(too long for a comment, hence posted as an answer)

I'm assuming you use the acmart document class. If that's the case, the ACM-Reference-Format bibliography style should have no problems typesetting the numbers of bibliographic entries or their URL strings -- assuming the URL strings are stored in a field called url.

enter image description here

The much older acm bibliography style does not recognize the url field and hence simply ignores its contents.

\RequirePackage{filecontents}
\begin{filecontents*}{mybib.bib}
@misc{w:19,
   author  = "Woody",
   title   = "Problem with {ACM} bibliography style",
   year    = 2019,
   url     = "https://tex.stackexchange.com/questions/474684/problem-with-acm-bibliography-style",
}
\end{filecontents*}

\documentclass{acmart}
\bibliographystyle{ACM-Reference-Format}

\begin{document}
\cite{w:19}
\bibliography{mybib}
\end{document}

If you do not use the acmart document class but still wish to use the ACM-Reference-Format bibliography style, be sure to (a) load the natbib package with the option numbers and (b) either the xurl or the url package, the latter preferably with the options hyphens and spaces.