Skip to content

Add APA 7th edition template #342

Open
@crsh

Description

@crsh

To summarize the previous discussion, for those who urgently need APA 7th edition: With the current version of papaja you can get most of the way like this:

  1. Make sure you are using the latest development version of papaja (remotes::install_github("crsh/papaja@devel"))
  2. (Install the apa7 LaTeX document class, unless your LaTeX distribution, like tinytex is setup to do this on the fly.)
  3. Make the following settings in the YAML front matter:
header-includes:
  - |
    \makeatletter
    \renewcommand{\paragraph}{\@startsection{paragraph}{4}{\parindent}%
      {0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
      {-1em}%
      {\normalfont\normalsize\bfseries\typesectitle}}
    
    \renewcommand{\subparagraph}[1]{\@startsection{subparagraph}{5}{1em}%
      {0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
      {-\z@\relax}%
      {\normalfont\normalsize\bfseries\itshape\hspace{\parindent}{#1}\textit{\addperi}}{\relax}}
    \makeatother

csl               : "`r system.file('rmd', 'apa7.csl', package = 'papaja')`"
documentclass     : "apa7"
output            : papaja::apa6_pdf

Note, that you currently cannot include the ORCID in the author note, as suggested in the apa7-manual, those YAML fields are currently not parsed.


Properly implementing support for APA 7th edition will require a little more work. I'll gather the required steps that I have identified, as of now, here. If I'm missing anything necessary adjustments, or if anyone has thoughts or suggestions about the implementation feel free to discuss. Also, this would be the time to rethink any design decisions regarding the R Markdown template (such as the setup of the font matter or naming of the options).

General

  • It seems unnecessary to add another "APA article (7th edition)" entry to the template list because the templates would be almost identical.
  • Create an R functions, such as apa7_*(), that generate the rmarkdown format. It may be worth considering, whether specialized functions for each edition are necessary. It seems easier and less confusing to just keep apa_*() and specify the version via the documentclass field in the front matter. Of course, the old functions would be kept for backward compatibility.
  • Ship a APA 7th edition CSL file (see Automate updating APA CSL #314)

PDF format

  • Add support for a ORCID element in the YAML author list and automatically add this information to the author note. This should be fairly straight forward for PDF (use \addORCIDlink{}{}) if I can make pandoc parse the contents of the author_note field.
  • Check how the definitions of \subsubsection{} and \paragraph{} have changed and adjust the default header includes accordingly.
  • Always position figure captions above the corresponding figure (for LaTeX approaches see this, this, and this SO post; for Rmarkdown see [this(https://stackoverflow.com/a/26743812/914024)]). This will be easy to do in Quarto.
  • Don't add & to author name concatination on title page and use \authornames and \authorsaffiliations (Add APA 7th edition template #342 (comment))

Word format

  • Create a pandoc word template for APA 7th edition.
  • Add support for a ORCID element in the YAML author list and automatically add this information to the author note. This will require to ship an ORCID icon with the template.
  • Adjust formatting of table captions generated by apa_table()
  • Adjust formatting of figure captions in docx_fixes-Lua-filter, i.e. create an version of the filter for APA 7th edition

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions