2

I have got a very simple and probably also pretty easy to solve problem but since I am new to TEX I do not find the solution myself. I am kind of forced to use the acmart template for a report I am writing, meaning that I have to use \documentclass{acmart}. Of course I need a biblography as well, and I used those in some other short reports as well, but they don't seem to work inside acmart (at least the way I used to use them).

\documentclass[]{acmart}
\usepackage[]{tikz}
\usetikzlibrary{calc}


\title{...}
\subtitle{...}
\author{...}

\begin{document}
\maketitle
... \cite{asdf} ...
\bibliography{biblo}
\biblographystyle{plainnat}
\end{document}

The biblography file I use is called "biblo.bib" and contains only one reference so far:

@online{asdf,
    author = "asdf",
    year = "1970",
    title = "...",
    url = "...",
    month = oct,
    lastaccessed = "July 19, 2017", 
}

However for one the biblography is not printed at the end of my report and also the citation is not resolved. Where am I going wrong?

1
  • 1
    The acmart documentations states: "ACM uses the natbib package [...] you can select one of two predefined citation styles: [...] for example, \citestyle{acmauthoryear}" (p. 22), "If you use natbib, then commands like \citep and \citeauthor are automatically supported." If you want to use numeric style, you should probably use \cite and \citestyle{acmnumeric} instead. If it still does not work, check if you run BibTeX at all. Commented Jul 20, 2017 at 11:28

1 Answer 1

1

You need to define the style of your bibliography with \bibliographystyle{style} where style is a natbib style like for instance plainnat. Working example is then:

\documentclass[]{acmart}
\usepackage[]{tikz}
\usetikzlibrary{calc}
\title{...}
\subtitle{...}
\author{...}

\begin{document}
\maketitle
... \cite{asdf} ...
\bibliography{biblo}
\bibliographystyle{plainnat}
\end{document} 

Output is then: Output is then:

5
  • Thank you very much, but it seems that this does not change anything concerning my problem.
    – WodkaRHR
    Commented Jul 20, 2017 at 10:42
  • This works for me, are you compiling with bibtex?
    – Dolphin
    Commented Jul 20, 2017 at 11:22
  • I am using pdfTex inside TexStudio, and even if I try to compile this very abreviated example i posted (plus your addition) it does not look like what tex.stackexchange makes it look like.
    – WodkaRHR
    Commented Jul 20, 2017 at 11:39
  • Okay nevermind, I do not know why, but biblatex was excluded form my build command. Sorry for the unnecessary fuzz and thank you!
    – WodkaRHR
    Commented Jul 20, 2017 at 11:41
  • On a different note I would recommend switching to latexmk
    – Dolphin
    Commented Jul 20, 2017 at 11:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .