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}