![我对 documentclass{apa6} 做错了什么](https://linux22.com/image/474791/%E6%88%91%E5%AF%B9%20documentclass%7Bapa6%7D%20%E5%81%9A%E9%94%99%E4%BA%86%E4%BB%80%E4%B9%88.png)
在运行 MacTex2023 的 MacBookPro 2023、Sonoma 14.4 上,我无法让 apa 函数工作;(biber 和 biblatex 给出 \endcsname 丢失,我无法理解;所以我转到 natbib 和 BibTeX,但也出现了我无法理解的错误)
我需要(重新)制作 apa 文档,并希望应用 documentclass{apa6}。在常规选项 [doc、字体和纸张大小,..] 旁边,我指定了推荐选项 [...、babel、dutch、american、natbib](参考 apa6.pdf)。
natbib 加载包 apacite,并且不需要在 .tex 文件中指定 \bibliographystyle,因为这是由 apa6 类完成的。
我特意应用 PassOptionsToPackage 来调用 apacite 引用命令(但是省略这一点对发生的问题没有影响)
需要四次运行才能获得最终文档。
但是 LaTex 运行出现错误:
运行 1) Latex 在 natbib 识别的引用命令上给出三个 natbib 警告,在经典引用命令。我继续按 ENTER 键来完成错误的 pdf 输出,以获得 Bibtex 运行的适当输入(即辅助文件)
运行 2)Bibtex 结果我有五行状态信息,但没有警告也没有错误
运行 3) Latex 再次给出 3 个 natbib 警告和两个未定义的控制序列错误;但 PDF 输出中有一个正确的参考表
运行 4) Latex 在 apacite 引用命令 \citeA 和 \citeNP 上仅给出两个错误,这些错误无法识别。
基本问题是如何在范围内获取 apacite 引用命令,有什么想法吗?谢谢
bib 文件
%% This BibTeX bibliography file was created using BibDesk.
%% https://bibdesk.sourceforge.io/
%% Created for Ben Jutten at 2024-03-18 09:55:52 +0100
%% Saved with string encoding Unicode (UTF-8)
@incollection{Bereiter2002,
author = {Bereiter, C.},
booktitle = {Liberal education in a knowledge society},
editor = {Smith, B.},
publisher = {Chicago: Open Court},
title = {Education in a knowledge society},
year = {2002}}
@book{Kreijns2020,
author = {Kreijns, K.},
date-added = {2020-07-11 19:13:57 +0200},
date-modified = {2020-07-11 19:18:03 +0200},
month = {03},
publisher = {Open Universiteit},
title = {{Online Samenwerkend Leren en Social Presence}},
year = {2020}}
@article{Scardamalia1993,
author = {Scardamalia, M. and Bereiter, C.},
journal = {Communications of the ACM},
number = {5},
pages = {37-41},
title = {Technologies for knowledge-building discourse},
volume = {36},
year = {1993}}
和 .tex 文件
% Documentclass apa6
% option babel must be immediately followed by the desired language(s), the last is the main language
% option natbib, implicitly loads apacite and applies mask option to apa6
% NB do not specify \bibliographystyle as this is done by the apacite class that is loaded by natbib option in apa6 class
\PassOptionsToPackage{apaciteclassic}{apacite}
\documentclass[doc, 12pt, a4paper, babel, dutch, american, natbib]{apa6}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
% the title commands; we need some otherwise it does not 'compile'
\title{The Title of the document.}
\shorttitle{subject of this document}
\author{The author's name}
\affiliation{the institute}
\abstract{This abstract is dummy just to fill some some text in order to show that the field is there. }
\begin{document}
\maketitle
\section{Citing Examples}
\subsection{Natbib cite commands}
command \textbackslash{}citet ( year parenthesized) gives: \citet[p.10-20]{Bereiter2002},
command \textbackslash{}citep whole reference parenthesized gives: \citep[p.27]{Kreijns2020},
\subsection{APA cite commands}
APA \textbackslash{}cite gives: \cite{Scardamalia1993}, <<probably natbib's cite
APA \textbackslash{}citeA gives: \citeA[p.30-35]{Bereiter2002}, << cmd not recognized
APA \textbackslash{}citeNP gives: \citeNP{Kreijns2020} << cmd not recognized
% print the reference information (style comes from apacite class)
\bibliography{learn.bib}
\end{document}