I downloaded the files (main.tex and sample.bib) from Overleaf in one same folder as an example for bibliography management.
Here the main.tex file:
\documentclass[letterpaper,10pt]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{biblatex} %Imports biblatex package
\addbibresource{sample.bib} %Import the bibliography file
\begin{document}
Let's cite! The Einstein's journal paper \cite{einstein} and the Dirac's book \cite{dirac} are physics related items.
\printbibliography %Prints bibliography
\end{document}
Here the sample.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"
}
@book{dirac,
title={The Principles of Quantum Mechanics},
author={Paul Adrien Maurice Dirac},
isbn={9780198520115},
series={International series of monographs on physics},
year={1981},
publisher={Clarendon Press},
keywords = {physics}
}
@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The \LaTeX\ Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts",
keywords = "latex"
}
@online{knuthwebsite,
author = "Donald Knuth",
title = "Knuth: Computers and Typesetting",
url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
keywords = "latex,knuth"
}
@inbook{knuth-fa,
author = "Donald E. Knuth",
title = "Fundamental Algorithms",
publisher = "Addison-Wesley",
year = "1973",
chapter = "1.2",
keywords = "knuth,programming"
}
@book{knuth-acp,
author = "Donald E. Knuth",
publisher = "Addison-Wesley",
title = "The Art of Computer Programming",
series = "Four volumes",
year = "1968",
note = "Seven volumes planned",
keywords = "knuth,programming"
}
@article{ctan,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
keywords = "latex"
}
It does indeed compile with neat bibliography at the end as follows (on the website of overleaf through the browser):
However when I compile the file locally on my machine (with pdflatex command in Terminal), the bibliography does not appear and the citations seem broken.
Here the end of the main.log file
\openout3 = `main.bcf'.
Package biblatex Info: Trying to load bibliographic data...
Package biblatex Info: ... file 'main.bbl' not found.
No file main.bbl.
Package biblatex Info: Reference section=0 on input line 9.
Package biblatex Info: Reference segment=0 on input line 9.
LaTeX Warning: Citation 'einstein' on page 1 undefined on input line 10.
LaTeX Warning: Citation 'dirac' on page 1 undefined on input line 10.
LaTeX Warning: Empty bibliography on input line 12.
[1
{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./main.aux)
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) main
(biblatex) and rerun LaTeX afterwards.
Package logreq Info: Writing requests to 'main.run.xml'.
\openout1 = `main.run.xml'.
I also copied sample.bib into a second file sample.bbl but nothing changed
EDIT
Thanks to the comments below I run the command biber main which created a main.bbl file which content is as follows:
% $ biblatex auxiliary file $
% $ biblatex bbl format version 3.0 $
% Do not modify the above lines!
%
% This is an auxiliary file used by the 'biblatex' package.
% This file may safely be deleted. It will be recreated by
% biber as required.
%
\begingroup
\makeatletter
\@ifundefined{ver@biblatex.sty}
{\@latex@error
{Missing 'biblatex' package}
{The bibliography requires the 'biblatex' package.}
\aftergroup\endinput}
{}
\endgroup
\refsection{0}
\datalist[entry]{nty/global//global/global}
\entry{dirac}{book}{}
\name{author}{1}{}{%
{{hash=59342ede3a101402b34939644b51ad06}{%
family={Dirac},
familyi={D\bibinitperiod},
given={Paul\bibnamedelimb Adrien\bibnamedelima Maurice},
giveni={P\bibinitperiod\bibinitdelim A\bibinitperiod\bibinitdelim M\bibinitperiod}}}%
}
\list{publisher}{1}{%
{Clarendon Press}%
}
\strng{namehash}{59342ede3a101402b34939644b51ad06}
\strng{fullhash}{59342ede3a101402b34939644b51ad06}
\strng{bibnamehash}{59342ede3a101402b34939644b51ad06}
\strng{authorbibnamehash}{59342ede3a101402b34939644b51ad06}
\strng{authornamehash}{59342ede3a101402b34939644b51ad06}
\strng{authorfullhash}{59342ede3a101402b34939644b51ad06}
\field{sortinit}{D}
\field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
\field{labelnamesource}{author}
\field{labeltitlesource}{title}
\field{isbn}{9780198520115}
\field{series}{International series of monographs on physics}
\field{title}{The Principles of Quantum Mechanics}
\field{year}{1981}
\keyw{physics}
\endentry
\entry{einstein}{article}{}
\name{author}{1}{}{%
{{hash=3ebf53e52a3ce84f0ffb8553200a6a63}{%
family={Einstein},
familyi={E\bibinitperiod},
given={Albert},
giveni={A\bibinitperiod}}}%
}
\strng{namehash}{3ebf53e52a3ce84f0ffb8553200a6a63}
\strng{fullhash}{3ebf53e52a3ce84f0ffb8553200a6a63}
\strng{bibnamehash}{3ebf53e52a3ce84f0ffb8553200a6a63}
\strng{authorbibnamehash}{3ebf53e52a3ce84f0ffb8553200a6a63}
\strng{authornamehash}{3ebf53e52a3ce84f0ffb8553200a6a63}
\strng{authorfullhash}{3ebf53e52a3ce84f0ffb8553200a6a63}
\field{sortinit}{E}
\field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
\field{labelnamesource}{author}
\field{labeltitlesource}{title}
\field{journaltitle}{Annalen der Physik}
\field{number}{10}
\field{title}{{Zur Elektrodynamik bewegter K{ö}rper}. ({German}) [{On} the electrodynamics of moving bodies]}
\field{volume}{322}
\field{year}{1905}
\field{pages}{891\bibrangedash 921}
\range{pages}{31}
\verb{doi}
\verb http://dx.doi.org/10.1002/andp.19053221004
\endverb
\keyw{physics}
\endentry
\enddatalist
\endrefsection
\endinput


.texfile. How could I do it in terminal? – ecjb May 08 '20 at 11:09biber main– Johannes_B May 08 '20 at 11:10biber mainin the terminal. It did generated amain.bbl. I copied the content in the edit of the question. What should I do next to have the bibliography in themain.texfile? – ecjb May 08 '20 at 11:20