apaquarto

repository·main·Indexed 42 days ago

https://github.com/wjschne/apaquarto

A Quarto extension for automating the creation of APA 7th Edition style documents. It supports rendering to .docx, .html, .pdf (via LaTeX or Typst), and .typst formats, with a strong focus on .docx compatibility.

Tokens
822
Snippets
4
Records
4
Agent score
4%

What's inside apaquarto

  1. Create a new APA 7 article using a template

    main

    You can generate a new Quarto document pre-configured with APA 7 style settings using the apaquarto template. You can do this via the R console or the terminal.

    Via R Console

    1. Ensure the quarto R package is installed (requires version 1.4 or higher).
    2. Set your working directory to the desired location.
    3. Run quarto::quarto_use_template("wjschne/apaquarto").
    4. Confirm the author trust prompt by answering Yes or Y.

    Via Terminal

    1. Navigate to your target folder.
    2. Run quarto use template wjschne/apaquarto.
    3. Confirm the author trust prompt.
    4. Provide a name for the new folder when prompted.

    After installation, a .qmd file will be created. You can use the generated template file (which includes explanations and examples) or start with minimal.qmd for a cleaner slate.

    # Install the required R package if not present
    install.packages("quarto")
    
    # Set working directory and use the template
    setwd("path/to/my/folder")
    quarto::quarto_use_template("wjschne/apaquarto")
  2. Add apaquarto to an existing document or project

    main

    If you already have a .qmd file and want to apply APA 7 styling, you can add the extension to your existing project.

    Via Terminal

    Navigate to the folder containing your .qmd file and run:

    quarto add wjschne/apaquarto

    Via R Console

    1. Open your project in RStudio.
    2. If the file is not in a project, set the working directory to its folder.
    3. Run:
    quarto::quarto_use_template("wjschne/apaquarto")
  3. Configure apaquarto output formats in YAML metadata

    main

    To use the extension, you must specify the apaquarto formats in your document's YAML header. You can target .docx, .html, .pdf, or .typst (experimental, requires Quarto 1.5+).

    Available format keys:

    • apaquarto-docx
    • apaquarto-html
    • apaquarto-pdf
    • apaquarto-typst

    Example minimal YAML metadata:

    ---
    title: "My Paper's Title"
    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: 1301 Cecil B. Moore Ave.
            city: Philadelphia
            region: PA
            postal-code: 19122-6091
    abstract: "This is my abstract."
    keywords: [keyword1, keyword2]
    author-note:
      disclosures: The author has no conflict of interest to declare.
    bibliography: mybibfile.bib     
    format:
      apaquarto-docx: default
      apaquarto-html: default
      apaquarto-pdf: default
      apaquarto-typst: default
    ---
    format:
      apaquarto-docx: default
      apaquarto-html: default
      apaquarto-pdf: default
      apaquarto-typst: default
  4. Update or remove the apaquarto extension

    main

    Use the Quarto CLI to manage the lifecycle of the extension in your project.

    To update to the latest version:

    quarto update wjschne/apaquarto

    To remove the extension:

    quarto remove wjschne/apaquarto
    # Update
    quarto update wjschne/apaquarto
    
    # Remove
    quarto remove wjschne/apaquarto