我所有的引用似乎都有效,除了这个,我不知道为什么— 就像我的所有参考书目一样,它是从 Mendeley 导出的,所以我不明白它为什么不起作用……现在我没有主意了,所以我希望有人能帮助我 :)
引用的代码是:
The data in the table are obtained from~\cite{John2008}.
警告如下:
LaTeX Warning: Citation 'John2008' on page 5 undefined on input line 8.
这是条目:
@incollection{John2008,
author = {{John, O. P., Naumann, L. P. Soto}, C. J.},
booktitle = {Handbook of personality: Theory and research},
number = {Chapter 4},
pages = {114--158},
publisher = {New York, NY: Guilford Press},
title = {{Handbook of personality: Theory and research}},
url = {https://www.ocf.berkeley.edu/{~}johnlab/bigfive.htm},
year = {2008}
}
我尝试从 URL 中删除波浪号,但是没有帮助。
我使用 Biber 和\printbibliography
-command 来打印参考书目。
答案1
您的代码中存在几个错误:
- 作者之间用 , 分隔
and
,而不是用逗号 - 作者字段中的括号错误,只需删除第二对
~
删除网址中的括号
因此,有了以下 MWE
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@incollection{John2008,
author = {John, O. P. and Naumann, L. P. and Soto, C. J.},
booktitle = {Handbook of personality: Theory and research},
number = {Chapter 4},
pages = {114--158},
publisher = {New York, NY: Guilford Press},
title = {Handbook of personality: Theory and research},
url = {https://www.ocf.berkeley.edu/~johnlab/bigfive.htm},
year = {2008},
}
\end{filecontents*}
\documentclass{article}
\usepackage[%
backend=biber,
style=authortitle,
]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
The data in the table are obtained from~\cite{John2008}.
\printbibliography
\end{document}
您将获得没有错误的结果: