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


ImportantRequired

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

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

---
title: "APA citations"
author: "Zihan Hei"
format: html
editor: visual

bibliography: references.bib
csl: apa.csl
---

16.2 Download the apa.csl file from Zotero

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

16.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. Upload it into your Quarto project folder, and in your YAML, include:

---
csl: apa.csl     

or 

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

16.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))

16.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 Dr.Shane’s Quantitative Playbook (which doesn’t have a DOI but has a web link), you can manually add it to your references.bib file:

@article{McCarty2025, 
  title = {The Quantitative Playbook for Public Health Research in R},
  year = {2025},
  author = {McCarty, S.},
  url = {https://shanemccarty.github.io/FRIplaybook/},
  langid = {en}
}

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

---
nocite: |
  @McCarty2025
---

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

ImportantRequirement

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

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. (2025). The Quantitative Playbook for Public Health Research in R. 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