TransWikia.com

apa6: removal of maketitle leads to error

TeX - LaTeX Asked by Neeraj Hanumante on July 11, 2021

Background

I am trying to write a manuscript that has APA6 format citations and bibliography. For this purpose, I am using documentclass[man]{apa6}.

However, I do not want the title page that this class creates by default. In order to achieve it when I commented the maketitle, it led to cascading errors.

Attempt to address this problem

Instead of commenting the maketitle, I emptied the fields constituting it such as title{}, author{}, affiliation{} and so on. However, the problem still persists.

Desired outcome

I want to write a manuscript with apa6 formatting and without a title page

Code

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}

There are some sections in this document following the title.

Errors

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.

Removing the fields data

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}

Errors after removing the fields

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.

One Answer

If you look at the error you get when you comment out the maketitle command, it's an undefined control sequence referring to the shorttitle, which is used in the running head. So you need to define that in order not to have a title page. (I've removed the bibliography code which is irrelevant here.)

But doing this will fail to create any title at all and won't print the abstract either, since that is produced by the apa6 maketitle command.

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}

Correct answer by Alan Munn on July 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP