Reputation: 21
I am working on a Latex template and I keep getting the following error:
BibTeX: I didn't find a database entry for ""
At first I though something in my bib had an unexpected empty citation, but there is none. I've also tried to rename the bib file, no luck... any ideas? I've look everywhere and I can't find a solution yet. Any help is appreciated.
Upvotes: 2
Views: 8542
Reputation: 1
Sometimes this happens because the new data is not saved in the database. To verify that. Close the database file and reopen it again to see if the data is saved or not.
Upvotes: 0
Reputation: 1
I also encountered this problem in overlaeaf because I have cite empty reference(e.g. cite{}). You can solve this problem by deleting the references in the bib file, then recompiling pdf, and finding the error by looking at the location of the reference.
Upvotes: 0
Reputation: 33
This may be caused by duplication of database files in the command \bibliography{}
.
The bibtex
command will produce the following output
This database file appears more than once: foo.bib
---line 4 of file Untitled2.aux
: \bibdata{foo,foo
: }
I'm skipping whatever remains of this command
Database file #1: foo.bib
(There was 1 error message)
if you write in your tex
file as
\bibliography{foo2022, foo2022}
Such an error won't cause any trouble if the duplication appears as the last database file. Unfortunately, if you append another database file after that duplicated one, as suggested by the error message, the new file is ignored so bibtex
can't find that database entry.
So review the error message from bibtex
and exclude the duplicated database files.
I have prepared some tex
and bib
files for you to reproduce such an error.
tex
file
\documentclass[a4paper,12pt,oneside]{report}
\usepackage[round]{natbib}
\bibliographystyle{plainnat}
\usepackage[textheight=23.7cm,
hmargin=26mm,
top=26mm,
headheight=0.5cm,
headsep=0.5cm,
]{geometry}
\renewcommand{\bibname}{References}
\begin{document}
\citep{foo2022}, \citep{foo2:foo2022}
\bibliography{foo,foo,foo2}
\end{document}
foo.bib
@article{foo2022,
author = {Hello, World},
journal = {Journal},
month = {01},
number = {1},
pages = {1-10},
title = {Title},
volume = {100},
year = {2022}}
foo2.bib
@article{foo2:foo2022,
author = {Hello, World},
journal = {Journal},
month = {01},
number = {1},
pages = {1-10},
title = {Title},
volume = {100},
year = {2022}}
To compile, use the following commands
pdflatex <your file>
bibtex <your file>
pdflatex <your file>
pdflatex <your file>
To correct the above-mentioned error, change
\bibliography{foo,foo,foo2}
to
\bibliography{foo,foo2}
Upvotes: 1
Reputation: 555
It could be possible there's a non-display character (like a zero width space, for example) that got into one of your citations.
Try doing a find command for "cite{" and compare it with the number of results for "cite". If there's a difference then you've found the citation with a stray character in it, and you can just copy a properly formatted string and paste in place.
There could also be such a character within after the bracket which will cause the same problem, but that will be a bit harder to find.
I thought of this thanks to this question where the author also had a problem with a non-displaying character getting into his citation. https://tex.stackexchange.com/questions/33416/bibtex-i-didnt-find-a-database-entry-for
Upvotes: 0