BibTeX:我没有找到“”的数据库条目——空数据库条目?

问题描述 投票:0回答:3

我正在开发 Latex 模板,但不断收到以下错误:

BibTeX:我没有找到“”的数据库条目

起初我以为我的围兜里有一个意想不到的空引文,但实际上没有。我也尝试过重命名 bib 文件,但没有成功......有什么想法吗? 我到处都找过了,但还没有找到解决方案。如有任何帮助,我们将不胜感激。

latex bibtex biblatex
3个回答
0
投票

您的引文中可能存在非显示字符(例如零宽度空格)。

尝试对“cite{”执行查找命令,并将其与“cite”的结果数量进行比较。如果存在差异,那么您发现引文中含有杂散字符,您只需复制格式正确的字符串并粘贴到位即可。

括号后面也可能有这样的字符,也会导致同样的问题,但是会更难找到。

我之所以想到这一点,是因为这个问题,作者也遇到了非显示字符进入他的引文的问题。 https://tex.stackexchange.com/questions/33416/bibtex-i-didnt-find-a-database-entry-for


0
投票

这可能是由于命令中的数据库文件重复造成的

\bibliography{}

bibtex
命令将产生以下输出

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)

如果您在

tex
文件中写为

\bibliography{foo2022, foo2022}

如果重复出现在最后一个数据库文件中,这样的错误不会造成任何麻烦。不幸的是,如果您按照错误消息的建议在重复的数据库文件之后附加另一个数据库文件,则新文件将被忽略,因此

bibtex
无法找到该数据库条目。

因此请查看

bibtex
中的错误消息并排除重复的数据库文件。

我准备了一些

tex
bib
文件供您重现此类错误。

tex
文件

\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}}

要编译,请使用以下命令

pdflatex <your file>
bibtex <your file>
pdflatex <your file>
pdflatex <your file>

要纠正上述错误,请更改

\bibliography{foo,foo,foo2}

\bibliography{foo,foo2}

0
投票

我在 overlaeaf 中也遇到了这个问题,因为我引用了空引用(例如 cite{})。你可以通过删除bib文件中的参考文献,然后重新编译pdf,通过查看参考文献的位置找到错误来解决这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.