我已经被动关注这个论坛一段时间了,它通常对我有帮助,但现在我无法解决问题。我想在 APA 中有一个简单参考书目(首选),但它不起作用。我几乎尝试了所有方法,但它显示错误。
\documentclass[12pt,titlepage]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\synctex=1
\usepackage{color}
\usepackage[a4paper,lmargin={3cm},rmargin={2cm},tmargin={2cm},bmargin={2cm}]{geometry}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amstext}
\usepackage{mathptmx}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{setspace}
\onehalfspacing
\usepackage{nicefrac}
\usepackage{tocloft}
\usepackage{titlesec}
\usepackage{nameref}
\usepackage{csquotes}
\usepackage{natbib}
\usepackage{url}
\usepackage[colorlinks=false,pdfborder={0 0 0}]{hyperref}
\begin{document}
test test
test \cite{dohmen2011}
\bibliography{Literatur}
\bibliographystyle{apacite}
\end{document}
这是错误信息:
Undefined control sequence. test \citet Undefined control sequence. dohmen2011} Undefined control sequence. \APACinsertmetastar Environment APACrefauthors undefined. \begin{APACrefauthors} Undefined control sequence. \BCBL Undefined control sequence. \BCBL {}\ \BBA Undefined control sequence. \BCBL {}\ \BBA {} Wagner, G\BPBI \begin{thebibliography} on input line 1 ended by \end{APACrefauthors}. \end{APACrefauthors} Undefined control sequence. \APACrefYearMonthDay Undefined control sequence. {\BBOQ Undefined control sequence. {\BBOQ}\APACrefatitle Undefined control sequence. ...nants, and behavioral consequences}.{\BBCQ Undefined control sequence. \APACjournalVolNumPages Undefined control sequence. \PrintBackRefs Undefined control sequence. \PrintBackRefs{\CurrentBib
这是 bib 文件:
@article{dohmen2011,
title={Individual risk attitudes: Measurement, determinants, and behavioral consequences},
author={Dohmen, Thomas and Falk, Armin and Huffman, David and Sunde, Uwe and Schupp, J{\"u}rgen and Wagner, Gert G},
journal={Journal of the European Economic Association},
volume={9},
number={3},
pages={522--550},
year={2011},
publisher={Wiley Online Library}
}
答案1
您收到的错误是因为您尝试使用apacite
书目样式而不加载apacite
包。由于您使用的是natbib
引用命令,因此您应该使用以下选项加载包natbibapa
:
\usepackage[natbibapa]{apacite}
请参阅以下问题以了解更多讨论:
首次添加命令时文档仍然失败的原因是与上一次+编译\usepackage
相关的辅助文件仍然存在。每当您更改与参考书目(和一些其他包)相关的包时,在重新编译之前删除所有辅助文件始终是一个好主意。 latex
bibtex
请参阅以下问题以了解更多讨论: