我在 Mac 上使用 TexMaker。在我的 BIB 文件中,有一个如下项目:
@inproceedings{DBLP:conf/wsdm/YeungI11,
author = {Ching{-}man Au Yeung and
Tomoharu Iwata},
title = {Strength of social influence in trust networks in product review sites},
booktitle = {Proceedings of the Forth International Conference on Web Search and
Web Data Mining, {WSDM} 2011, Hong Kong, China, February 9-12, 2011},
pages = {495--504},
year = {2011},
crossref = {DBLP:conf/wsdm/2011},
url = {http://doi.acm.org/10.1145/1935826.1935899},
doi = {10.1145/1935826.1935899},
timestamp = {Mon, 31 Jan 2011 13:46:06 +0100},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/wsdm/YeungI11},
bibsource = {dblp computer science bibliography, http://dblp.org}
}
(我从 DBLP 网站找到的)
当我编译 TEX 文件时,出现错误:
bad cross reference---entry "DBLP:conf/wsdm/YeungI11" refers to entry "DBLP:conf/wsdm/2011", which doesn't exist
我可以在 ShareLatex 中毫无问题地编译该文件。
我该怎么做才能在 TexMaker 中编译该文件?
答案1
(评论太长,因此作为答案发布。)
我能想到您收到以下错误消息的两个原因
错误的交叉引用---条目“DBLP:conf / wsdm / YeungI11”引用了不存在的条目“DBLP:conf / wsdm / 2011”
首先,您在本地机器上使用的 bib 文件中缺少带有 key 的条目DBLP:conf/wsdm/2011
(以 TeXMaker 为前端)。其次,该条目实际上存在于 bib 文件中,但它发生前带有键的条目DBLP:conf/wsdm/YeungI11
。要使 BibTeX 的crossref
字段正常工作,需要交叉引用的条目必须在 bib 文件中,该字段的出现时间晚于包含该crossref
字段的条目。
无论如何,以下 MWE 工作正常(两个条目的信息均从 DBLP 获取);请注意 中条目的顺序test.bib
。
\RequirePackage{filecontents}
\begin{filecontents}{test.bib}
@inproceedings{DBLP:conf/wsdm/YeungI11,
author = {Ching{-}man Au Yeung and
Tomoharu Iwata},
title = {Strength of social influence in trust networks in product review sites},
booktitle = {Proceedings of the Forth International Conference on Web Search and
Web Data Mining, {WSDM} 2011, Hong Kong, China, February 9-12, 2011},
pages = {495--504},
year = {2011},
crossref = {DBLP:conf/wsdm/2011},
url = {http://doi.acm.org/10.1145/1935826.1935899},
doi = {10.1145/1935826.1935899},
timestamp = {Mon, 31 Jan 2011 13:46:06 +0100},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/wsdm/YeungI11},
bibsource = {dblp computer science bibliography, http://dblp.org}
}
@proceedings{DBLP:conf/wsdm/2011,
editor = {Irwin King and
Wolfgang Nejdl and
Hang Li},
title = {Proceedings of the Forth International Conference on Web Search and
Web Data Mining, {WSDM} 2011, Hong Kong, China, February 9-12, 2011},
publisher = {{ACM}},
year = {2011},
isbn = {978-1-4503-0493-1},
timestamp = {Mon, 31 Jan 2011 13:29:32 +0100},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/wsdm/2011},
bibsource = {dblp computer science bibliography, http://dblp.org}
}
\end{filecontents}
\documentclass{article}
\usepackage[numbers]{natbib}
\bibliographystyle{plainnat}
\begin{document}
\cite{DBLP:conf/wsdm/YeungI11}
\bibliography{test}
\end{document}