0

I'm following the tutorial on overleaf to create a bibliography, yet I keep getting the error "Empty bibliography on input line...". Here's my code.

\documentclass[a4paper]{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{sample.bib}

%%% Title Data
\title{Seminar} 
\author{}
\date{November 28, 2019}

\begin{document}
\maketitle
{\centering
  \LARGE\textbf{Nonshellable Triangulation of 3-balls}\par
}  

\printbibliography

\end{document}

And the content of the .bib file:

@article{einstein,
    author = "Albert Einstein",
    title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
    [{On} the electrodynamics of moving bodies]",
    journal = "Annalen der Physik",
    volume = "322",
    number = "10",
    pages = "891--921",
    year = "1905",
    DOI = "http://dx.doi.org/10.1002/andp.19053221004",
    keywords = "physics"
}

Also a screenshot of the window on overleaf I'm working on.

enter image description here

What am I doing wrong?

ensbana
  • 113
  • 1
    Welcome to TeX.SE. Two questions: Does your document contain \cite commands? And, assuming the answer to the first question is "yes", did you run biber followed by another round of LaTeX? – Mico Dec 10 '19 at 12:08
  • Actually i didn't use \cite in my draft! I didn't know that would cause the above problem. Thanks for pointing it out. – ensbana Dec 10 '19 at 12:24
  • So you thought that the bibliography contains the items listed in the bib file, @ensbana? No, it contains the items you have cited. That is good to know, also so you don't unnecessarily removes and readds items in the bib file if you change your mind about using them. There you can have anything you might want to cite, and you can use the same for several documents. – pst Dec 10 '19 at 13:01
  • 1
    To have the full bibliography (even uncited references) add \nocite{*}. – Bernard Dec 10 '19 at 13:08
  • Do things work if you have a \cite or \nocite{*}? In that case would you be OK with closing this question as a duplicate of https://tex.stackexchange.com/q/17128/35864. – moewe Dec 10 '19 at 17:28
  • Yes of course! I don't mind. Thanks everyone for the comments. – ensbana Dec 10 '19 at 19:22

0 Answers0