::install_github("crsh/papaja@devel") remotes
Writing
Here I aim to build references on writing workflow tips. This is a work-in-progress.
Use APA 7 in papaja
papaja
is an R package for preparing APA-styled articles in Rmarkdown. It’s current version (0.1.2) supports APA 6 guidelines, although the newest guidelines are APA 7. Basically, we need to get papaja
to use APA 7.
I achieved this by following these instructions:
Namely, the steps followed were:
- Install developer version of
papaja
:
- Add to the YAML:
csl : "`r system.file('rmd', 'apa7.csl', package = 'papaja')`"
documentclass : "apa7"
And this:
header-includes:
- |
\makeatletter
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\parindent}%
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries\typesectitle}}
[1]{\@startsection{subparagraph}{5}{1em}%
\renewcommand{\subparagraph}
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
{-\z@\relax}%
{\normalfont\normalsize\bfseries\itshape\hspace{\parindent}{#1}\textit{\addperi}}{\relax}} \makeatother
This was sufficient for my set-up. The additional LaTeX packages I needed were then listed directly under (and in line with) \makatother
.
To test if APA 7 vs. 6 was being used, I changed a BibTex entry for a reference to have more than 7 authors (e.g., by repeating all the author names until >7). I then changed csl: "``"
to csl: "``"
. In the bibliography only 7 authors were listed (following apa 6). I then changed it back to 'apa7.csl
, and the rendered bibliography listed all authors (following apa 7). I took this as sufficient evidence that apa 7 was indeed being used. I then changed the BibTex authors back, of course.