Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

wjschne/apaquarto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

any text: you like

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.

Version History

Example Outputs

The apaquarto-docx form looks like this:

Preview of .docx output

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

Preview of .pdf output in journal mode

Creating a New Article

You can create a new article with apaquarto’s template file. There aretwo ways to do so.

  1. Via the R console
  2. 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.

Using R via the R Console

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.

Using the Terminal

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.

Template file

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.

Adding apaquarto to an Existing Document or Project

You can add the apaquarto extension to an existing file or project inone of two ways:

  1. Via the R console
  2. Via the terminal

Creating a New Document Via the R console

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")

Creating a New Document Via the Terminal

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

Add apaquarto to the Document’s Metadata:

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---

Updating to the latest version of apaquarto

In the terminal, run

quarto update wjschne/apaquarto

Removing 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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors9


[8]ページ先頭

©2009-2025 Movatter.jp