---
title: "APA citations"
author: "Zihan Hei"
format: html
editor: visual
bibliography: references.bib
csl: apa.csl
---16 APA Citations & References
How to cite and reference sources in Quarto using APA style (7th)
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.
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.
16.2 Download the apa.csl file from Zotero
16.2.1 Find APA Style in Zotero
Open Zotero.
Go to the menu bar (top left).
On Windows: click Edit –> Settings
On Mac: click Zotero –> Settings
In the left sidebar, select Cite –> then click the Styles tab.
At the bottom of the style list, click “Get additional styles…”
- This opens the Zotero Style Repository inside your browser.
Search for APA — you’ll see this:
- American Psychological Association 7th edition
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:
- 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
Find the file named something like
apa.cslorapa-7th-edition.csl.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
Find your article’s DOI and copy it.
In the Visual editor, click Insert —> Citation.
Paste your DOI then search your article under “From DOI”, “Crossref”, “DataCite” or “PubMed”.
Before you click insert, make sure the Add to bibliography file option points to
references.bib.Choose In-text and click Insert.

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
Citations and references are not required for the Results & Discussion Report ( RDreport.qmd ), but they are required for the final report.