I have read quite a lot of other questinons of this type, and no help at all.
I'm using WIN10 PRO as OS
text editor: VScode version 1.48.2
LaTeX Distribution: MikTex
Recipe used in vscode: latexmk (it is told that it runs biber for me)
I need to print the bibliography, I have the .bib file in the root folder (the same as .tex file).
I use the biblatex package with biber backend, here is my preamble:
\documentclass[12pt]{article}
\usepackage[spanish]{babel}
\usepackage{fancyhdr}
\usepackage{fancyref}
\usepackage{graphicx}
\usepackage{color}
\usepackage[backend=biber]{biblatex}
\usepackage{csquotes}
\addbibresource{bibliography.bib}
The problem comes when I try to \printbibliography
, it compiles successfully but with no references shown, and in the problems panel it says:
Empty bibliography.
LaTeX [401,1]
401 is the number of the line where the problem occurs.
The .bib file is:
@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}
}
@online{knuthwebsite,
author = "Donald Knuth",
title = "Knuth: Computers and Typesetting",
url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
addendum = "(accessed: 01.09.2016)",
keywords = "latex,knuth"
}
@inbook{knuth-fa,
author = "Donald E. Knuth",
title = "Fundamental Algorithms",
publisher = "Addison-Wesley",
year = "1973",
chapter = "1.2",
keywords = "knuth,programming"
}
As I'm using vscode with latex-workshop extension, it has a LaTeX compiler console where it tells everything that is happening, these are the last 6 lines from the message from the LaTeX compiler:
Latexmk: Found input bbl file 'DanielCorrea11_ExperimentoBACTERIAS.bbl'
Latexmk: Log file says output to 'DanielCorrea11_ExperimentoBACTERIAS.pdf'
Latexmk: Found biber source file(s) [DanielCorrea11_ExperimentoBACTERIAS.bcf]
=== TeX engine is 'pdfTeX'
Biber warning: [519] Utils.pm:304> WARN - The file 'DanielCorrea11_ExperimentoBACTERIAS.bcf' does not contain any citations!
Latexmk: All targets (c:/Users/danco/Documents/TeX_Dev/Biologia/ExperimentBACTERIA/DanielCorrea11_ExperimentoBACTERIAS.pdf) are up-to-date
As you can see, in the log message it shows a Biber warning
saying that a .bcf file does not contain any citations (I don't know what is a .bcf file, sorry)
I don't know if it is a biber problem or what could make this happen, I've tried to do what people suggest in other TeX stackexchange questions, some of the ones I've read are:
XeLaTeX and Biber do not Produce a *.bbl File
Question mark or bold citation key instead of citation number
Biblatex with Biber: Configuring my editor to avoid undefined citations
I would really appreciate your help, it is for an academic article.
Best Answer
biblatex
(and also classical BibTeX) will only add those references from your.bib
file to the bibliography that were cited in the document. The idea being that you can use the same big.bib
file for all your documents and decide which sources are relevant and need to be added to the bibliography of each particular document individually.That means you need at least one
\...cite...
like command in your document to see any bibliography output. This is what the Biber warningtries to tell you: Biber could run on your file and everything seems to be set up correctly, but you simply haven't asked to cite anything.
Add a
\autocite{einstein}
somewhere to cite theeinstein
entry.If you want to add an entry to the bibliography without citing it explicitly use
\nocite{<key>}
, i.e.\nocite{dirac}
. If you want to add all entries from your.bib
file, use\nocite{*}
.