Skip to content

A quarto extension for creating APA7 documents in .docx, .html, and .pdf formats

License

Notifications You must be signed in to change notification settings

DominiqueMakowski/apaquarto

 
 

Repository files navigation

A Quarto Extension for Creating APA 7 Style Documents

any text: you like

This article template creates APA Style 7th Edition documents in .docx, .html. and .pdf. Because the .docx format is still widely used—and often required—my main priority was to ensure compatibility for .docx. This is still a work in progress, and I encourage filing a “New Issue” on GitHub if something does not work of if there is a feature missing.

If you want to type in markdown to create a document in the APA 6th Edition format, I suggest using papaja.

If you need all the flexibility of $\LaTeX$, I suggest using the apa7 document class with knitr and the .Rnw format.

New in apaquarto 3.1.0

The main goal for version 3 was to do everything with lua filters instead of R. It was quite a journey, but apaquarto is now completely independent of R, which should help folks working with other languages.

Breaking changes

  • The the apafg- and apatb- prefixes are no longer used for figures and tables. Use the standard Quarto prefixes (fig- and tbl-), as well as the standard quarto referencing syntax (e.g,. @fig-myplot will reference the fig-myplot chunk.).
  • The include statement below the metadata is no longer used and must be deleted. An informative error will provide instruction if the include statement remains.

Improvements

  • The floatsintext option now works in docx and html. Setting it to true, intermingles text, figures, and tables. Setting it to false moves all figures and tables to the end of the document.
  • The title page and abstract page are now processed using lua filters instead of R.
  • The .docx running header is set with a lua filter and a docx field that draws from the .docx metadata.
  • The officer package is no longer required to create a new reference document every time the document is rendered.
  • The jou (journal) mode in .pdf is better supported.

Version History

Creating a New Article

To create a new article using this format, run this command in the terminal:

quarto use template wjschne/apaquarto

In RStudio, the terminal is a tab next to the console. If you cannot see a terminal tab next to the console, use the keyboard shortcut Alt-Shift-R to make a terminal appear.

Entering the command above will prompt a question about whether you trust the author of the extension to not run malicious code. If you answer Yes, you will be prompted to name a new folder where the extension will be installed with an example document with the name of the folder and a file extension of .qmd. The example document has most of the instructions you will likely need.

Using with an Existing Document

To add this format to an existing document:

quarto add wjschne/apaquarto

Then, add the format to your document options:

format:
  apaquarto-docx: default

Here is an example of what the YAML metadata and the “include” statement below it might look like:

---
title: "My Paper's Title: A Full Analysis of Everything"
shorttitle: "My Paper's Title"
author:
  - name: W. Joel Schneider
    corresponding: true
    orcid: 0000-0002-8393-5316
    email: schneider@temple.edu
    affiliations:
      - name: Temple University
        department: College of Education and Human Development
        address: 358 Ritter Hall
        city: Philadelphia
        region: PA
        postal-code: 19122-6091
abstract: "This is my abstract."
keywords: [keyword1, keyword2]
author-note:
  disclosures:
    conflict of interest: The author has no conflict of interest to declare.
bibliograpy: mybibfile.bib     
format:
  apaquarto-docx: default
---

Example

This sample document has a fuller set of parameters specified and contains instructions for formatting figures, tables, cross-references, and more: template.qmd.

The apaquarto-docx form looks like this:

Preview of .docx output

The .html and .pdf output (in manuscript mode) look similar. The .pdf in journal mode looks like this:

Preview of .docx output

About

A quarto extension for creating APA7 documents in .docx, .html, and .pdf formats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 77.0%
  • TeX 17.5%
  • CSS 4.1%
  • SCSS 1.4%