Writing APA 7 with LaTeX!

I finally tried completing an entire assignment using just $\LaTeX{}$! Its an awesome typesetting tool, however, setting it up to write an APA 7 style document was quite a challenge.

I also couldn’t find any comprehensive guides on how to do so and had to go through a billion Google searches before I finally got what I wanted. So I thought I’d make my own guide for anyone else who wants to get started with APA 7 in $\LaTeX{}$.

Assumptions

I will assume that you are at least somewhat familiar with your LaTeX editor, and also that you know how to install LaTeX packages for whatever specific distribution you have.

For Windows users most people often recommend MiKTeX, which I already had installed on my system, however, as a heads up to anyone who is planning on writing LaTeX in VS Code, you’ll need to have the Perl language installed in order to use MiKTeX.

For reasons I will explain some other time, I couldn’t install Perl. So I grabbed the lightest distribution of LaTeX that I could find that worked with VS Code without Perl, that wonderfully light distribution is TinyTeX!

It basically just installs the TeXLive distribution without the gazillion packages it forces you to install. It also comes with the TeXLive package manager tlmgr.

Package Requirements

You’ll first need to install the following packages and all their dependencies:

As of right now, BibTeX only supports up to APA 6 references and citations. The only bibliography generator that supports APA 7 is Biber with BibLaTeX.

Starting the TeX file

Now we’ll just have to insert some boilerplate for the APA 7 document. For students, I’ve already created a template you can just copy and paste straight into your editor:

\documentclass[12pt, stu, hidelinks]{apa7}

\usepackage{newtxtext}
\usepackage{newtxmath}

\usepackage[style=apa]{biblatex}
\addbibresource{apa7-student.bib}

\title{Assignment Title}
\author{Student Name}
\course{CRSE 123: Sample Course Name}
\professor{Dr. Professor Name}
\duedate{\today}
\authorsaffiliations{University Name}

\abstract{
    \lipsum[1-2]
}

\begin{document}
\clearpage
\maketitle
\tableofcontents
\clearpage

\section{Introduction}

\lipsum[2-4]

\end{document}

Let’s dive into each of those lines.

APA Style Tables

Creating an APA style table is pretty simple using the threeparttable package:

% H comes with "float" package, it forces the floating object to be drawn exactly where the command is located by turning it into a non-floating object.
\begin{table}[H]
	\centering
	\begin{threeparttable}
		\caption{Text that shows below the title "Table X"}
		\begin{tabular}{llll} % 4 columns
			\toprule
			Column 1 & Column 2 & Column 3 & Column 4 \\
			\midrule
			entry 1  & 47.34    & 0.13     & 0.19\%  \\
			entry 2  & 89.21    & 0.12     & 0.16\%  \\
			\bottomrule
			total    & 136.55   & 0.25     & 0.35\%
		\end{tabular}
	\end{threeparttable}
\end{table}

Declare the \toprule command before you all the entries you want included in the table head. Then \midrule for the main body of the table, and finally \bottomrule for the end of the table, total results or conclusions.

Using the threeparttable package, this will automatically render as a beautiful APA style table!

Creating and Citing Figures

Creating figures requires a little bit of work. First you’ll need to move the image file that you wish to use in your figure into the same directory as your TeX document. Putting it into a subfolder also works, as we will be addressing the file by its relative path.

Then, we’ll create a LaTeX figure using the following code:

\begin{figure}[H]
	\makebox[\textwidth]{\includegraphics[width=0.8\paperwidth]{image_path.jpg}}
	\caption{Name of the Figure}
	\label{fig:NameUsedForCitation}
\end{figure}