apa6:删除 maketitle 会导致错误

apa6:删除 maketitle 会导致错误

背景

我正在尝试撰写一份包含 APA6 格式引文和参考书目的手稿。为此,我使用了\documentclass[man]{apa6}

但是我并不需要这个类默认创建的标题页,为了实现这个功能我注释掉了\maketitle,结果引发了级联错误。

尝试解决这个问题

我没有注释 \maketitle,而是清空了构成它的字段,例如 \title{}、\author{}、\affiliation{} 等。然而,问题仍然存在。

期望的结果

我想写一篇 apa6 格式的稿件,没有标题页

代码

\documentclass[man]{apa6}

\usepackage[american]{babel}

\usepackage{csquotes}
\usepackage[style=apa6,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{bibliography.bib}

\title{Sample APA-Style Document Using the \textsf{apa6} Package}

\author{Brian D.\ Beitzel}
\affiliation{SUNY Oneonta}

\leftheader{Beitzel}

\abstract{This demonstration paper uses the \textsf{apa6} \LaTeX\
  class to format the document in compliance with the 6th Edition of
  the American Psychological Assocation's \textit{Publication Manual.}
  The references are managed using \textsf{biblatex}.}

\keywords{APA style, demonstration}

\begin{document}
\maketitle
\section{Introduction}
\end{document}

本文档的标题后面有几个部分。

错误

Undefined control sequence. \section
Undefined control sequence. \end{document}
Undefined control sequence. \end{document}
Please (re)run Biber on the file:(biblatex) shortsample(biblatex) and rerun LaTeX afterwards.

删除字段数据

\documentclass[man]{apa6}

\usepackage[american]{babel}

\usepackage{csquotes}
\usepackage[style=apa6,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{bibliography.bib}

\title{}

\author{}
\affiliation{}

\leftheader{}

\abstract{}

\keywords{}

\begin{document}
\maketitle
\section{Introduction}
\end{document}

删除字段后出现错误

There's no line here to end. \maketitle
There's no line here to end. \maketitle
There's no line here to end. \maketitle
Please (re)run Biber on the file:(biblatex) shortsample(biblatex) and rerun LaTeX afterwards.

答案1

如果您查看注释掉该\maketitle命令时出现的错误,就会发现这是一个未定义的控制序列\shorttitle,它引用了运行头中使用的。因此,您需要定义它,以便不显示标题页。(我删除了与此无关的参考书目代码。)

但这样做根本无法创建任何标题,也不会打印摘要,因为这是由命令生成的apa6 \maketitle

\documentclass[man]{apa6}

\usepackage[american]{babel}

\usepackage{csquotes}


\title{Sample APA-Style Document Using the \textsf{apa6} Package}

\author{Brian D.\ Beitzel}
\affiliation{SUNY Oneonta}
\shorttitle{Short Title}
\leftheader{Beitzel}

\abstract{This demonstration paper uses the \textsf{apa6} \LaTeX\
  class to format the document in compliance with the 6th Edition of
  the American Psychological Assocation's \textit{Publication Manual.}
  The references are managed using \textsf{biblatex}.}

\keywords{APA style, demonstration}

\begin{document}
%\maketitle
\section{Introduction}
\end{document}

相关内容