0

What is wrong with my code? It doesn't compile!

I use Zotero to gather my references. I exported the references from Zotero as biblatex file, and I used this code and It doesn't compile!

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

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

\begin{document}

\printbibliography

\end{document}

It tells me: "empty bibliography", and the bib file is not empty.

A witch
  • 101
  • 1
    Welcome to TeX.SE. Have you heard about an external program called biber? – Mico Mar 28 '24 at 23:31
  • 3
    You have no citations so the bibliography would be empty (https://tex.stackexchange.com/q/17128/106162) even after running biber which is necessary. The bib file is just a source for references, they're not automatically added to any bibliography, you most likely want \nocite{*} for that (https://tex.stackexchange.com/a/17132/106162) – Dai Bowen Mar 29 '24 at 00:56

1 Answers1

3

Welcome, you could use biber:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage[style=authoryear, backend=biber]{biblatex} \addbibresource{bibliography.bib} %your bibliography name \usepackage{csquotes}

\begin{document}

Test test \cite{ref-key}

\printbibliography %Your bibliography

\end{document}

then run

pdflatex <your file>
biber    <your file>
pdflatex <your file>
pdflatex <your file>

on you folder

Paul A
  • 1,055
  • 4
  • 14