0

The following code does not format the citation and reference. The final PDF contains the sentence Let’s cite Mittlebach mittelbach2004. I am using the latest version of MikTeX, which I (re)installed. I included two error messages I get after the code.

\begin{filecontents}{\jobname.bib}
  @book{mittelbach2004,
    title={The \LaTeX Companion},
    author={Mittelbach, Frank and Goossens, Michel},
    year={2004},
    publisher={Addison-Wesley Publishing Company},
    address={Reading (MA):}
  }
\end{filecontents}
%
\documentclass{article}
\usepackage[style=authoryear,backend=biber]{biblatex}
\addbibresource{\jobname.bib}
%
\begin{document}
Let's cite Mittlebach \cite{mittelbach2004}.
\printbibliography
%
\end{document}

Error messages:

LaTeX Warning: Citation 'mittelbach2004' on page 1 undefined on input line 18.

LaTeX Warning: Empty bibliography on input line 19.

Tom Price
  • 374
  • The code produces the expected output for me when compiled with LaTeX, Biber, LaTeX, LaTeX. Did you run Biber on your document? https://tex.stackexchange.com/q/63852/35864 explains what Biber does and why you need to run it (the answer mainly talks about BibTeX, but there is a note explaining that the big picture also applies for Biber.) If you are using an editor to run commands for you, have a look at https://tex.stackexchange.com/q/154751/35864. – moewe Jan 04 '22 at 16:27
  • Unrelated to the problem, but you should generally not include leading or trailing punctuation in fields in the .bib file. Don't say address={Reading (MA):}, say address={Reading (MA)},. The style you are currently using automatically adds a colon after the location/address. If you want to use a style that normally does not add a colon there, it is normally possible to modify it to do so, – moewe Jan 04 '22 at 16:30

0 Answers0