0

When deleting, respectively commenting out a citation, the bibliography doesn't remove the now deleted/unavailable citation reference inside the Bibliography.

Am I doing something wrong? Is this a bug? Something else?

E.g.: Version after commenting out the first citation version after commenting out the first citation

\documentclass{article}

\usepackage{biblatex} \addbibresource{sources.bib}

\begin{document} Here comes a citation \cite{merriam2022}. % comment this line out after successful compilation

Here comes a citation \cite{wikipedia2022}.

Here comes no citation.

\printbibliography \end{document}

Bibliography reference file sources.bib containing following

@online{merriam2022,
  title={Merriam-Webster},
  publisher={Merriam-Webster},
  year={2022},
  urldate={2022-07-06},
  url={https://www.merriam-webster.com/dictionary/fun},
}

@online{wikipedia2022, title={Wikipedia}, year={2022}, urldate={2022-07-06}, url={https://en.wikipedia.org/wiki/Free_software}, }

alex
  • 985

1 Answers1

1

This is expected if you only rerun (Lua)LaTeX.

You also need to rerun Biber so that you end up running at least

  • (Lua)LaTeX
  • Biber
  • (Lua)LaTeX

on your document. This is always required when you add and remove (and possibly even when you reorder) citations. You may also have to rerun this cycle when you change certain bibliography options/settings (especially when they affect sorting).

In this instance there should be a warning about this in the .log file along the lines of

LaTeX Warning: There were undefined references.

Package biblatex Warning: Please (re)run Biber on the file: (biblatex) <filename> (biblatex) and rerun LaTeX afterwards.

because biblatex can detect if you added/removed citations. But it is not guaranteed that you get such a warning in all cases, especially when the rerun is required due to changed bibliography settings. That's why it is always a good idea to periodically rerun Biber on your document. And why you should always rerun Biber when you prepare the final version of your document.

You need to rerun Biber because the entries that end up in your bibliography list are mainly controlled by Biber and only in a secondary fashion by the LaTeX side of biblatex. You can learn more about what Biber does in Question mark or bold citation key instead of citation number (the role of BibTeX and Biber is pretty much analogous, even though they can do slightly different things).

moewe
  • 175,683