
私は 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
(コメントとしては長すぎるため、回答として投稿しました。)
次のエラーメッセージが表示される理由は2つ考えられます。
不正な相互参照---エントリ「DBLP:conf/wsdm/YeungI11」は、存在しないエントリ「DBLP:conf/wsdm/2011」を参照しています
まず、キーのエントリが、DBLP:conf/wsdm/2011
ローカルマシン(TeXMakerをフロントエンドとして)で使用するbibファイルにありません。次に、エントリは実際には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}