我的示例文档如下所示
\documentclass{article}
\title{Demo Bibtex}
\author{John Smith}
\begin{document}
\maketitle
Some claim \cite{velikonja2015asymmetric}.
\bibliographystyle{apacite}
\bibliography{References}
\end{document}
我的 bib 文件(References.bib
)位于同一文件夹中,如下所示:
@article{velikonja2015asymmetric,
title={On asymmetric shape of electric double layer capacitance curve},
author={Velikonja, Alja{\v{z}} and Kralj-Igli{\v{c}}, Veronika and
Igli{\v{c}}, Ale{\v{s}}},
journal={Int. J. Electrochem. Sci},
volume={10},
pages={1--7},
year={2015}
}
生成的文档看上去有问题:
好像里面所有东西都算了两次。非常感谢您的帮助。
答案1
如果我简单地使用类apa
而不是article
我可以编译代码和bib条目而不会出现错误消息。
尝试以下 MWE(包filecontents
仅用于获取带有 TeX 代码和 bib 文件的编译 MWE):
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{velikonja2015asymmetric,
title={On asymmetric shape of electric double layer capacitance curve},
author={Velikonja, Alja{\v{z}} and Kralj-Igli{\v{c}}, Veronika and
Igli{\v{c}}, Ale{\v{s}}},
journal={Int. J. Electrochem. Sci},
volume={10},
pages={1--7},
year={2015}
}
\end{filecontents}
\documentclass{apa} % article
\title{Demo Bibtex}
\author{John Smith}
\begin{document}
\maketitle
Some claim \cite{velikonja2015asymmetric}.
\bibliographystyle{apacite}
\bibliography{\jobname}
\end{document}
以及生成的pdf:
编辑:
与类report
和biblatex
与biber
:
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{velikonja2015asymmetric,
title={On asymmetric shape of electric double layer capacitance curve},
author={Velikonja, Alja{\v{z}} and Kralj-Igli{\v{c}}, Veronika and
Igli{\v{c}}, Ale{\v{s}}},
journal={Int. J. Electrochem. Sci},
volume={10},
pages={1--7},
year={2015},
}
\end{filecontents}
\documentclass{report} % article
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[%
backend=biber,
style = authoryear,
]{biblatex}
\addbibresource{\jobname.bib}
\title{Demo Bibtex}
\author{John Smith}
\begin{document}
\maketitle
Some claim \cite{velikonja2015asymmetric}.
\printbibliography
\end{document}
结果: