- Notifications
You must be signed in to change notification settings - Fork22
A quarto extension for creating APA7 documents in .docx, .html, and .pdf formats
License
wjschne/apaquarto
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This article template createsAPA Style 7th Editiondocuments in .docx, .html. and .pdf. The.pdf format can be rendered via Latex (i.e., apaquarto-pdf) or via Typst(apaquarto-typst). The Typst output for this extension is stillexperimental and requires Quarto 1.5 or greater.
Because the .docx format is still widely used—and often required—my mainpriority was to ensure compatibility for .docx. This is still a work inprogress, and I encourage filing a “New Issue” on GitHub if somethingdoes not work of if there is a feature missing.
Seeinstructions and template options for apaquartohere.
The apaquarto-docx form looks like this:
The .html and .pdf output (in manuscript mode) look similar. The .pdf injournal mode looks like this:
You can create a new article with apaquarto’s template file. There aretwo ways to do so.
- Via the R console
- Via the terminal
If you are an R user, you might prefer the R console method. Anyone,including R users, can use the second method.
If you are an R user, you can install extensions with thequartopackage (version = 1.4 orhigher). The quarto package is not Quarto itself, but it providesconvenient functions to interact with Quarto.
If the quarto package is not installed, you can can install it byrunning this code in the console:
# latest release versioninstall.packages("quarto")
Once the quarto package is installed, you can install a quarto extensiontemplate by setting your working directory to the folder where you wantthe template to be installed (e.g.,setwd("path/to/my/folder")) andthen running this:
quarto::quarto_use_template("wjschne/apaquarto")
A prompt will ask if you trust the author (me) not to run maliciouscode. To proceed, answerYes or justY.
If you are not an R user, you can create a new article directly in theterminal. Navigate to the folder where you want to create your file(e.g.,cd path/to/my/folder), and run this command:
quarto use template wjschne/apaquarto
In RStudio, the terminal is in a tab next to the console. If you cannotsee a terminal tab next to the console, use the keyboard shortcutAlt-Shift-R to make a terminal appear.
Entering the command above will prompt a question about whether youtrust the author of the extension to not run malicious code. If youanswer Yes, you will be prompted to name a new folder where theextension will be installed.
After installation, you will see a template file in the folder youselect. The template file will have the same name as the folder youinstalled the template to and ends with.qmd. This file has most ofthe options already filled out and explains how and why to change them.It also has a examples of how to use the extension in the text.
If you prefer a minimal template, you can start with theminimal.qmdfile instead.
You can add the apaquarto extension to an existing file or project inone of two ways:
- Via the R console
- Via the terminal
If you are an R user, you can install extensions with thequartopackage (version = 1.4 orhigher). The quarto package is not Quarto itself, but it providesconvenient functions to interact with Quarto.
If the quarto package is not installed, you can can install it byrunning this code in the console:
# latest release versioninstall.packages("quarto")
In RStudio, open the project that contains the file to which you want toadd apaquarto. If your file is not part of a project, set the workingdirectory to the same folder as the file (e.g.,setwd("path/to/my/folder")).
Run this code in the console:
quarto::quarto_use_template("wjschne/apaquarto")
To add this format to an existing document, navigate to the folder wherethe existing .qmd you wish to use and then run:
quarto add wjschne/apaquarto
You can select one of three formats: .docx, .pdf, or .html. Whenwriting, I prefer to output to .html, because it renders quickly. Then Iswitch to .docx or .pdf, depending on where I need to submit the paper.
You can add all of these formats or any combination of them:
format:apaquarto-docx:defaultapaquarto-html:defaultapaquarto-pdf:defaultapaquarto-typst:default
Here is a minimal example of what the YAML metadata might look like:
---title:"My Paper's Title: A Full Analysis of Everything"shorttitle:"My Paper's Title"author: -name:W. Joel Schneidercorresponding:trueorcid:0000-0002-8393-5316email:schneider@temple.eduaffiliations: -name:Temple Universitydepartment:College of Education and Human Developmentaddress:1301 Cecil B. Moore Ave.city:Philadelphiaregion:PApostal-code:19122-6091abstract:"This is my abstract."keywords:[keyword1, keyword2]author-note:disclosures:conflict of interest:The author has no conflict of interest to declare.bibliography:mybibfile.bibformat:apaquarto-docx:defaultapaquarto-html:defaultapaquarto-pdf:defaultapaquarto-typst:default---
In the terminal, run
quarto update wjschne/apaquarto
In the terminal, run
quarto remove wjschne/apaquarto
About
A quarto extension for creating APA7 documents in .docx, .html, and .pdf formats
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.

