32  APA Citations & References

How to cite and reference sources in Quarto using APA style (7th)

Author

Zihan Hei

Published

10.20.2025

Abstract

This short guide explains how to set up and manage APA-style citations and references in Quarto markdown documents. Specifically, researchers learn how to add a bibliography file, insert in-text citations using Visual mode, include uncited references with the nocite field, and automatically generate a bibliography at the end of the report. By following these steps, researchers will be able to properly cite articles, web pages, and other sources within a Quarto report.

Open Project → Open .qmd → Run load-library chunk → Run All Chunks Above → code. If anything looks wrong, use Ref’s Quick Checklist.


ImportantRequired: citations in your Final Report

Your Final Report will include in-text citations and references using this chapter. However, the Results & Discussion report draft will not require citations and references.

32.1 Add “bibliography: references.bib” to the YAML

This line tells Quarto to create and use a file called references.bib, which you can find in the Files section.

To format your references in APA style, also include the line csl: apa.csl in the YAML header.

The two lines are already in the Required YAML header from Start My Report, shown again here:

---
title: "title your report here"
subtitle: "insert subtitle here"
date: 10.09.2026            # SWAP: the date you submit, written MM.DD.YYYY
date-format: "MM.DD.YYYY"
author:
  - name: "your name"
    email: youremail@binghamton.edu 
    affiliation: 
      - name: Binghamton University
    attributes:
      corresponding: true
abstract: |
    TBD goes here
keywords:
  - insert keyword 1
  - insert keyword 2
  - insert keyword 3
  - insert keyword 4
  - insert keyword 5
bibliography: references.bib   # your Zotero export (Citations & Refs)
csl: apa.csl                   # APA 7th style file (Citations & Refs)
format: 
  html:
    toc: true
    toc-depth: 3
    number-sections: true
    fig-width: 8
    fig-height: 5
    code-fold: true                # code is folded behind a "Code" button: readers see a paper, graders click to see the code
    code-summary: "Show the code"
    code-overflow: wrap
    embed-resources: true
    theme: cosmo
  pdf:
    toc: true
    number-sections: true
    colorlinks: true
    fig-width: 6
    fig-height: 4
    geometry:
      - top=1in
      - bottom=1in
      - left=1in
      - right=1in
---
    

32.2 Download the apa.csl file from Zotero

32.2.1 Find APA Style in Zotero

  1. Open Zotero.

  2. Go to the menu bar (top left).

    • On Windows: click Edit –> Settings

    • On Mac: click Zotero –> Settings

  3. In the left sidebar, select Cite –> then click the Styles tab.

  4. At the bottom of the style list, click “Get additional styles…”

  5. Search for APA — you’ll see this:

    • American Psychological Association 7th edition
  6. Click the name of the style and Zotero will automatically install it into your local Zotero library.

32.2.2 Finding the CSL File

We need the actual .csl file for Quarto:

  1. After installing it, go to Zotero’s data directory:
  • On Windows: C:\Users\<YourName>\Zotero\styles

    • C: drives –> folder with your name –> Zotero folder –> styles folder
  • On macOS: Home/Zotero/styles

    • Home folder –> Zotero folder –> styles folder
  1. Find the file named something like apa.csl or apa-7th-edition.csl.

  2. Copy it into your Lastname_FRI project folder (in Finder or File Explorer, drag the file into the folder), and in your YAML, include:

---
csl: apa.csl     

or 

csl: apa-7th-edition.csl    
---

32.3 Insert Citations in Visual Mode

  1. Find your article’s DOI and copy it.

  2. In the Visual editor, click Insert —> Citation.

  3. Paste your DOI then search your article under “From DOI”, “Crossref”, “DataCite” or “PubMed”.

  4. Before you click insert, make sure the Add to bibliography file option points to references.bib.

  5. Choose In-text and click Insert.

  • The correct citation should look like this: (Offer et al. (2025))

  • If you want to cite multiple sources in one set of parentheses, separate them with semicolons: (Offer et al. (2025); Johnson (2018); O’Brien et al. (2024))

32.4 Including Uncited Items

If you want certain references to appear in your bibliography without citing them in the text, you can define a nocite field in your YAML like this:

---
nocite: |
  @kannan2014
---

This means “@kannan2014” will not appear in the body text, but it will still be listed in your final bibliography.

For example, if you want to include this playbook (which doesn’t have a DOI but has a web link), you can manually add it to your references.bib file. It is an edited book in its second edition, so the entry uses @book with an editor and an edition, and APA style then prints it as “McCarty, S. (Ed.). (2026). The Quantitative Playbook for R: Plays for Public Health & Community Health Research (2nd ed.).” To cite one chapter instead, use the chapter’s own authors and title with @incollection, the way the Preface shows:

@book{McCarty2026,
  title = {The {Quantitative} {Playbook} for {R}: Plays for {Public} {Health} \& {Community} {Health} {Research}},
  editor = {McCarty, Shane},
  edition = {2},
  year = {2026},
  url = {https://shanemccarty.github.io/FRIplaybook/},
  langid = {en}
}

After this, make sure you put it in the YAML using nocite:

---
nocite: |
  @McCarty2026
---

32.5 Bibliography Generation

By default, Quarto will automatically generate a list of cited works and will be placed at the end of the document.

For more information about citations in Quarto, check out the Quarto website: https://quarto.org/docs/authoring/citations.html

ImportantRequired: citations in your Final Report

Citations and references are not required for the Results & Discussion Report ( Lastname_RDreport.qmd ), but they are required for your final report (Lastname_finalreport.qmd).

Save → Render → Back up to ELN → Quit, Don’t Save workspace. Details: Ref’s Quick Checklist.

Johnson, S. G. B. (2018). Why do people believe in a zero-sum economy? Behavioral and Brain Sciences, 41. https://doi.org/10.1017/s0140525x18000389
Kannan, V. D., & Veazie, P. J. (2014). Predictors of avoiding medical care and reasons for avoidance behavior. Medical Care, 52(4), 336–345. https://doi.org/10.1097/mlr.0000000000000100
McCarty, S. (Ed.). (2026). The Quantitative Playbook for R: Plays for Public Health & Community Health Research (2nd ed.). https://shanemccarty.github.io/FRIplaybook/
O’Brien, A. G., Meese, W. B., Taber, J. M., Johnson, A. E., Hinojosa, B. M., Burton, R., Ranjan, S., Rodarte, E. D., Coward, C., & Howell, J. L. (2024). Why do people avoid health risk information? A qualitative analysis. SSM - Qualitative Research in Health, 6, 100461. https://doi.org/10.1016/j.ssmqr.2024.100461
Offer, K., Oglanova, N., Oswald, L., & Hertwig, R. (2025). Prevalence and predictors of medical information avoidance: A systematic review and meta-analysis. Annals of Behavioral Medicine, 59(1). https://doi.org/10.1093/abm/kaaf058