6

I am trying to get automatically numbered sections, subsections, and subsubsections while using the APA6 format. Is it possible to number sections even though section numbers were deactivated by APA6? I would prefer to keep apa6 because apart from section numbers I need to comply with APA. I use overleaf but it does not work with TeXMaker (Windows 10 x64) either.

As you can see below, I tried a numbered list to solve the problem (see comment for the error message). Is there any way to manipulate the APA6 package to get section numbers back?

\documentclass[a4paper,man,natbib,12pt]{apa6}

\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}

\title{Paper}
\shorttitle{Paper}
\author{James Bond}
\affiliation{XXX}

\begin{document}

\maketitle

\begin{enumerate}

\section{\item{1. <- I don't want to do it manually}} % ! LaTeX Error: Something's wrong--perhaps a missing \item.

\section{2. <- I don't want to do it manually} 

\end{enumerate}

\bibliography{References}

\end{document}
1
  • Welcome to TeX.SX! You're missing the secnumdepth counter. Of course using enumerate is a bad idea here ;-)
    – user31729
    Mar 13, 2016 at 16:35

1 Answer 1

8

Section numbers are switched on and off with the counter variable secnumdepth, set here to 3, meaning section, subsection and subsubsections should be numbered.

Apparently secnumdepth is set to 0 right from the start!

\documentclass[a4paper,man,natbib,12pt]{apa6}

\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}

\title{Paper}
\shorttitle{Paper}
\author{James Bond}
\affiliation{XXX}

\setcounter{secnumdepth}{3}

\begin{document}

\maketitle


\section{Dr. No}

\subsection{Honey Ryder}
\subsubsection{Dr. No again}
\section{Goldfinger} 

\subsection{Thunderball}


%\bibliography{References}

\end{document}
1
  • This does lead to probably-undesirable consequences like the references section being numbered, and any subsections in appendices being numbered incorrectly. It's probably best to include a \setcounter{secnumdepth}{0} just before the \bibliography command, to re-set that counter to what apa6 expects.
    – postylem
    Oct 19, 2022 at 16:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .