Console
install.packages(c("ragg", "svglite", "quarto"))This tutorial is for graduate students who want to write a thesis or dissertation with apaquarto’s thesis mode. You do not need to be a programmer, and you do not need to have used tools like Quarto or RStudio before. If you can use a word processor and install a program, you can do this.
A few promises before we start:
It is possible to write a thesis or dissertation in a wide variety of styles. As seen in its name, apaquarto formats theses and dissertations according to APA style. If you want APA headings, but need a different citation style, apaquarto can be adapted to do so.
Thesis mode follows Temple University’s Dissertation and Thesis Handbook (see the options page for the edition it follows). Formatting rules change from year to year, and your department or committee may ask for something different. Before you submit, confirm the current requirements with the Graduate School and your committee. Treat apaquarto’s output as a very good first draft of the format, not as an official approval.
| Step | What you do |
|---|---|
| 1 | Install R (a free program that RStudio relies on) |
| 2 | Install RStudio (the program you will write in) |
| 3 | Install a few R packages that apaquarto needs |
| 4 | Check that Quarto, Typst, and (optionally) TinyTeX are ready |
| 5 | Make a project folder (on your computer, OneDrive, or both) and turn it into an RStudio project |
| 6 | Install apaquarto in the project folder |
| 7 | Create your thesis file |
| 8 | Fill in the front matter with apa7maker |
| 9 | Render your file to .docx, .pdf, or .html |
| 10 | Learn the handful of Markdown tricks you need |
| 11 | Set up Zotero for citations and references |
| 12 | Cite your sources in the text |
| 13 | Change options later |
You do these steps once. After that, your writing routine is just: open the project, write, click Render.
Think of building a house. You need tools (R, Quarto), a workshop to use them in (RStudio), and a few specialty parts (packages and extensions).
| Piece | What it is | Everyday analogy |
|---|---|---|
| Quarto | The engine that turns a plain-text file into a finished document | The printing press |
| apaquarto | An add-on for Quarto that knows APA style and Temple’s thesis layout | The house style the press is set up to follow |
| R | A programming language | A utility that RStudio plugs into |
| RStudio | A free writing environment with Quarto built in | Your desk |
| Zotero | A free reference manager | Your index-card box |
You will write in a .qmd file (a “Quarto document”). It is a plain-text file with a little markup for things like italics and headings. You never format by hand: you tell Quarto what each piece of text is (a heading, a quotation, a citation) and apaquarto decides how it should look.
Many students keep their files mostly online in OneDrive or Google Drive and only open them through a browser. That works well for Microsoft 365 or Google Docs, but the programs in this tutorial need to find your files on your computer. This short section gives you the vocabulary you will need.
A folder on your computer and a folder in OneDrive can be the same folder. OneDrive keeps a copy of a folder on your computer and copies it up to the cloud whenever it changes. You can look at it either way. Step 5 shows how to set this up.
Open File Explorer (the yellow folder icon on your taskbar, or press Win+EWin+E). On the left you will see Documents, Desktop, and, if OneDrive is installed and signed in, an entry such as OneDrive – Temple University. That is your OneDrive folder, and it lives on your computer.
To see a folder’s full location, click once in the address bar at the top of File Explorer. It will look something like C:\Users\yourname\Documents\Thesis.
Open Finder (the smiley-face icon in the Dock). In the sidebar you will see Documents, Desktop, and, if the OneDrive app is installed and signed in, OneDrive. To see a folder’s full location, open it in Finder and choose View → Show Path Bar. The path appears at the bottom of the window.
Open your file manager (called Files on many systems). Your personal files live in your home folder, for example /home/yourname/Documents. Microsoft does not offer an official OneDrive app for Linux, so see the Linux note in Step 5.
A terminal is a window where you type a command instead of clicking a button. You will use one a few times. You never need to understand it deeply: you type (or paste) the exact text shown on this page, press EnterEnter, and read what comes back. RStudio has a terminal built in (a tab next to the Console), so you do not need to hunt for a separate program.
R is a free programming language used for statistics. You do not have to use R for anything. apaquarto works perfectly well for a thesis that contains no analyses at all. We install R only because RStudio, the friendliest place to use Quarto, expects it to be there. If you do analyze data, you will already have R ready.
Instructions depend on your distribution. Start at the R download page for Linux and choose Debian, Fedora, Red Hat, SUSE, or Ubuntu. Those pages give the exact commands to paste into a terminal. The version of R in your system’s default software store is often old, so it is worth following the CRAN instructions.
You will not see a new program to open. That is fine. R works quietly in the background once RStudio is installed.
RStudio is the program you will write in. It is free.
RStudio is only one of several places to use Quarto. If you already like another one, use it. Positron is a newer program from the same company that makes RStudio and Quarto, and it works with many languages. VS Code is another popular option. The steps in this tutorial are written for RStudio, because it is the gentlest place to begin, but the ideas carry over. See the installation page for more options.
When RStudio opens, you will see several panes (windows within the window). Their exact arrangement may differ on your screen, but you will mostly care about these:
If you cannot find the Terminal tab, choose Tools → Terminal → New Terminal from the menu at the top (Mac users: the menu bar at the top of the screen).
A package is a small add-on for R. apaquarto uses a couple of them to make clean, sharp figures. You install each package once.
> symbol).> symbol returns, it is finished.If a message asks whether you would like to install packages from source or use a personal library, answer Yes.
You may also be asked to install a few others (such as knitr or rmarkdown). Say yes.
Nothing more to do. If a message mentions Rtools, you can ignore it. These packages install ready-made.
Nothing more to do in most cases. If a pop-up asks to install “command line developer tools,” you can click Install, but you do not need it for these packages.
On Linux, R packages are sometimes built on your machine and need a few system libraries. If the installation stops with an error that names a missing library, install the libraries and try again. On Ubuntu or Debian, this usually does it:
On other distributions, the names are similar but slightly different. Searching for the library names in the error message will lead you to the right ones.
apaquarto needs Quarto 1.9 or newer. RStudio comes with its own copy of Quarto, but the copy may be older than that, so we check.
You will see a list of checks. Look for these lines:
1.9 or higher? If not, install the newest Quarto from the Quarto download page, then close and reopen RStudio and run quarto check again.apaquarto can make a .pdf in two ways:
| Format name | How it makes a .pdf | Needs TinyTeX? |
|---|---|---|
apaquarto-typst |
Typst | No |
apaquarto-pdf |
LaTeX | Yes (unless you already have a LaTeX setup) |
If you only want .docx, .html, and a .pdf from Typst, you can skip TinyTeX entirely. If you want the LaTeX .pdf, install it as shown below.
Already use LaTeX? If you have TeX Live, MacTeX, or MiKTeX installed, Quarto will find it. You can skip TinyTeX.
In the Console:
This downloads a few hundred megabytes, so it may take several minutes. To update TinyTeX later:
Quarto may ask whether you want to continue or whether to add TinyTeX to your system path. The defaults are fine. If your computer is managed by your university and an installation is blocked, contact your IT help desk. Please do not try to work around the block yourself.
When you are done, run quarto check once more in the terminal. Everything you plan to use should report as OK.
An RStudio project is a folder that RStudio treats as home base for one piece of work. When you open the project, everything is right where you left it, and apaquarto, your references, and your figures can all find each other. Do this for your thesis.
Your thesis folder will hold your thesis file, your references, your images, and the finished documents.
Give the folder a short name with no spaces or special characters, such as Dissertation or thesis-2027. Spaces are not forbidden, but they cause trouble more often than you would expect.
Pick the path that matches your situation:
Dissertation.RStudio reopens inside your project. You should see your folder’s contents in the Files pane.
This is the same as the previous path. Just choose the folder from your OneDrive location when you click Browse… In File Explorer or Finder, it is under OneDrive.
This is a common situation. Your folder exists in OneDrive online, but you have never put a copy on your computer. The solution is to sync it. Syncing tells OneDrive, “keep a copy of this folder on my computer, and keep both copies up to date.”
First, make sure the OneDrive app is installed and signed in with your Temple account.
OneDrive is built into Windows 10 and 11. Look for a cloud icon in the notification area at the bottom right of your screen (you may need to click the small up-arrow). If you do not see it, search the Start menu for OneDrive and sign in with your Temple email address.
Microsoft does not offer an official OneDrive app for Linux. Your best options are to keep the project in a normal local folder (use path A) and upload copies to OneDrive in your browser when you want a backup, or to use a community-made OneDrive client. If you choose the latter, ask your IT contact whether it is permitted on your machine.
Then, sync the folder:
If your thesis folder does not exist at all yet, make it right in OneDrive’s online view (click New → Folder) and then sync it as above. Or make it inside the OneDrive folder on your computer (see path B) and it will appear online automatically.
Now make it a project, exactly as in path A: File → New Project… → Existing Directory → Browse… and choose the folder that now sits under OneDrive.
If you notice repeated trouble, the safest arrangement is to keep the project in a plain local folder and copy it to OneDrive when you reach a stopping point. Either way, back up your work regularly, and consider keeping a dated copy of your .qmd file at important milestones.
The top right corner of RStudio now shows your folder name, and a file ending in .Rproj appears in the Files pane. Next time, you can open your thesis by double-clicking that .Rproj file, or by using File → Recent Projects.
An extension is a small package of formatting rules that you add to a project. You install apaquarto into your thesis folder so that Quarto knows how to format it.
Y and press EnterEnter. You are agreeing that the extension may run its formatting code on your computer.Y.A new folder called _extensions appears in your Files pane. Do not edit or delete it. That is where apaquarto lives.
Installing the extension happens per project. If you start a different project (for a paper, say), repeat this step there.
dissertation.qmd (or thesis.qmd), and save it in your project folder. Be sure the name ends in .qmd.You now have a file open in the Source pane. Its first few lines might look like this:
The part between the two lines of three dashes is called the YAML (said “YAM-ul”). It holds your document’s settings: title, author, and so on. Everything after it is your writing. In the next step, we will fill the settings in for you.
RStudio has two ways of looking at a Quarto file. Source shows you the plain text, with its markup. Visual looks more like a word processor, with buttons for bold and italics. The two are interchangeable, and you can switch with the Source / Visual buttons at the top of the editor. This tutorial describes Source mode, because it shows you exactly what is happening. Visual mode is a fine choice for ordinary writing, but it can sometimes rewrite unusual bits of markup, so keep an eye on the YAML at the top if you try it.
Your thesis starts with a title page, copyright page, abstract, dedication, acknowledgments, and tables of contents. apaquarto builds all of these for you from the settings in your YAML. apa7maker is a free web page that writes those settings for you, so you do not have to remember them.
dissertation.qmd file, select everything (Ctrl+ACtrl+A, or Cmd+ACmd+A on a Mac), and paste over it (Ctrl+VCtrl+V or Cmd+VCmd+V). Save the file.The apa7maker app keeps your information confidential because it runs in your browser in a private sandbox. That is, once it finishes downloading and starts running, it computes everything locally. It never sends information back to the server. Thus, there is no way for anyone—not even the developer—to see what is entered into apa7maker.
If you would like to see what the finished settings can look like, here is a trimmed example:
---
title: "An Inquiry into Vexing Problems at the Intersection of Digital Typography, Tasseomancy, and Badminton"
shorttitle: "Typography, Tasseomancy, and Badminton"
author:
- name: Your Name
abstract: "This is my abstract."
dedication: |
For everyone who wondered whether this would ever be finished.
acknowledgments: |
Thanks to my committee, my family, and the miracle of coffee.
bibliography: references.yaml
documentmode: thesis
thesis:
type: Dissertation
submitted-to: the Temple University Graduate Board
degree: Doctor of Philosophy
date: May 2027
committee:
- name: Advisor's Name, Ph.D.
role: Advisory Chair
affiliation: Department of Your Field
- name: Committee Member's Name, Ph.D.
affiliation: Department of Another Field
- name: Outside Member's Name, Ph.D.
role: External Member
affiliation: Another University
format:
apaquarto-docx: default
apaquarto-html: default
apaquarto-pdf: default
apaquarto-typst: default
---Below the YAML goes your writing. A very small starting body looks like this:
Each first-level heading (a line starting with a single #) becomes a chapter in thesis mode. The # References heading with the {#refs} block tells apaquarto where to put your reference list.
format lines mean
The four lines under format: list the kinds of document you can make. apaquarto-docx is a Word file. apaquarto-html is a web page that is quick to produce and good for drafting. apaquarto-typst makes a .pdf through Typst, and apaquarto-pdf makes a .pdf through LaTeX. You can keep all of them or delete the ones you do not want. The next step shows how to choose among them.
Rendering means turning your .qmd file into a finished document, the way “printing” turns a file into paper.
| Format | Good for |
|---|---|
apaquarto-html |
Quick drafting. It renders fastest, so you can see the effect of your edits. |
apaquarto-docx |
Sharing with an advisor who wants to comment in Word. |
apaquarto-typst |
A polished and quickly rendered .pdf with no extra software. |
apaquarto-pdf |
A .pdf made through LaTeX (needs TinyTeX or another LaTeX installation). It renders slowly compared to the other formats, but LaTeX is famous for rendering text that has a certain subtle beauty for the discerning eye. |
My suggestion: draft with HTML, check the layout occasionally with the Typst .pdf, and render all formats before you send a version to anyone. Check with your Graduate School on which format it will accept for the final submission.
quarto check again (Step 4).Markdown is a way of writing formatted text using ordinary keyboard characters. It looks odd for about ten minutes, then becomes second nature. You can always look back at this page. For anything not covered here, see the writing page and the Quarto Markdown guide.
| You type | You get |
|---|---|
*italics* |
italics |
**bold** |
bold |
***bold italics*** |
bold italics |
H~2~O |
H2O (subscript) |
x^2^ |
x2 (superscript) |
APA style rarely uses bold in the body of your writing, but you might need it for a term or two. Use italics for emphasis, for statistical symbols such as p, and for the titles of books.
Leave one blank line between paragraphs:
apaquarto indents the first line of each paragraph automatically. Do not use the Tab key or spaces to indent.
Start a line with one to five # symbols, followed by a space. More # means a smaller heading:
In thesis mode, a level-1 heading starts a new chapter in all caps. Write headings in title case (capitalize the major words); apaquarto handles the rest of the formatting. See the writing page for how APA headings differ from level to level.
The simplest table is drawn with vertical bars and dashes. Give it a label that begins with tbl- and a title after a colon:
| Scale | Description |
|:---------|:-------------------------------|
| Nominal | Categories without an order |
| Ordinal | Ordered categories |
| Interval | Quantities without a true zero |
| Ratio | Quantities with a true zero |
: Classic Scale Types {#tbl-scales apa-note="Adapted from Stevens's classification."}#tbl-scales is the table’s label. In your text, @tbl-scales becomes “Table 1” (and the number updates itself if you add a table earlier!).apa-note is optional and puts a note below the table.:--- left, :---: center, ---: right.Typing a table by hand is fiddly. If you switch to Visual mode (Step 7), RStudio offers Insert → Table with a friendly grid. You can also build a table in a spreadsheet and copy the layout.
For more advanced users, you can create beautiful and/or complex tables with various packages in R or Python. I wrote the apa7 package, which is designed specifically for creating APA-Style tables. I wrote a 24-part series of blog posts starting here in which I recreated all of the example tables from the APA Manual.
Put the image file in your project folder (for example, in a subfolder named img). Then:
[ ] is the figure’s title.#fig-mediation is the label: write @fig-mediation in your text to refer to “Figure 1”.fig-alt is a description of the image for readers who use a screen reader. Please always include one. It is good practice and makes your work accessible.width and apa-note are optional.A figure is a chart or graph. An illustration is other artwork, such as a photograph or a map. If you label an image with #ill- instead of #fig-, apaquarto numbers it separately, as in “Illustration 1.” (Check with your committee whether it prefers one scheme.)
A quotation of 40 words or more goes in its own indented block. Start each line with >:
Austen [-@austen1990] had this to say about memory:
> If any one faculty of our nature may be called more wonderful than the rest,
> I do think it is memory. There seems something more speakingly
> incomprehensible in the powers, the failures, the inequalities of memory,
> than in any other of our intelligences. (p. 163)For a quotation that ends in an attribution, as an epigraph often does, put a final line that starts with three hyphens (---), which turn into an em dash:
If a paragraph continues after the block quote (it is the same paragraph, not a new one), wrap the continuation so it is not indented:
Appendices come after the references. Each one is a level-1 heading with a label that starts with apx-:
@apx-interview becomes “Appendix A” (or whichever letter it was given).Zotero is a free reference manager. You collect your sources in it (articles, books, chapters), and it remembers every detail of each source. apaquarto then reads Zotero’s list so that citations in your text and your reference list are built automatically, in APA style. You never type a reference by hand, and you never have to fix one by hand either.
Download Zotero from zotero.org/download and install it. It is available for Windows, Mac, and Linux. (Linux users get an archive to unpack; Zotero’s download page links to instructions.)
You will also want the Zotero Connector, a browser add-on from the same page. When you are looking at an article on a website, one click on the connector adds it to your Zotero library.
Better BibTeX is a Zotero add-on. It does two things you need: it gives each source a short, stable citation key (like austen1990), and it can export your library to a file that stays up to date.
.xpi file. (On some browsers you need to right-click the download link and choose Save Link As… so the browser does not try to open it.).xpi file you downloaded.The quickest way to add a source is with its DOI (for articles and many chapters) or ISBN (for books):
10.1037/amp0000700) or an ISBN, and press EnterEnter.Automatic lookups are good, but not perfect. Click each new source and check that the authors, year, title, and journal look right. Mistakes in Zotero turn into mistakes in your reference list. Pay particular attention to capitalization of titles and to organization names listed as authors.
For sources without a DOI or ISBN (reports, web pages, unpublished work), use the Zotero Connector while you are on the webpage, or click the New Item button (the green plus) and fill in the fields by hand.
Click any source. In the right-hand pane, you will see a Citation Key field. That is the short name you will use to cite the source. A key might look like austenMansfieldPark1990. You can leave the keys as they are. Just copy them as you need them.
Yes. In Zotero, right-click a source and choose Better BibTeX → Copy Citation Key (the menu wording can differ slightly across versions). Then paste it into your document.
Now you will make a file that holds your library, in your project folder, so that Quarto can read it. You do this once, and the file keeps itself up to date.
references.yaml and click Save.You will now see references.yaml in the RStudio Files pane. From now on, whenever you add or change a source in Zotero, the file updates itself, as long as Zotero is open.
Save the file inside the synced folder (see Step 5) so that it travels with the project. If you see a message about the file being in use, wait a few seconds and let OneDrive finish syncing.
In your .qmd file’s YAML (the part at the top), make sure there is a bibliography line that names the file:
If you used apa7maker in Step 8, it may have a place to enter this. If not, add the line yourself, and make sure it is aligned with the other top-level lines, with no leading spaces. You do not need to supply a citation style: apaquarto already includes APA style.
You cite a source by writing @ followed by its citation key. When you render, apaquarto turns it into the right citation and adds the source to your reference list. Only sources you actually cite appear in the references.
I will use @smith2020 and @jones2019 as stand-ins for your own keys.
Put the citation in square brackets. This is the form you use at the end of a sentence:
| You type | You get |
|---|---|
[@smith2020] |
(Smith, 2020) |
[@smith2020; @jones2019] |
(Jones, 2019; Smith, 2020) |
[@smith2020, pp. 35--41] |
(Smith, 2020, 35-41) |
[e.g., @smith2020] |
(e.g., Smith, 2020) |
[see @smith2020, p. 12] |
(see Smith, 2020, 12) |
A few details:
p. or pp., because apaquarto will add that for you. Also, the hyphen automatically will be converted to an en dash (–), as specified by APA style.@. If you have a prefix for a group of sources, attach it to the citation that comes first alphabetically.Example in a sentence:
A narrative citation puts the author’s name in your sentence. Write the key with no brackets:
| You type | You get |
|---|---|
@smith2020 found a result. |
Smith (2020) found a result. |
@smith2020 [101--103] found a result. |
Smith (2020, pp. 101–103) found a result. |
@smith2020 ['s] theory |
Smith’s (2020) theory |
@smith2020 ['s, 35] theory |
Smith’s (2020, p. 35) theory |
Notes:
['s] trick is an apaquarto feature for possessives. It puts the possessive on the author’s name and moves the year outside, as APA prescribes.If a citation does not turn into a name and year, but shows up as @smith2020 in your output, the key is not in your references file. Check the spelling, and check that Zotero has the source and has exported it (Step 11e). Capitalization matters!
For more patterns (suppressing ampersands, masked citations, meta-analysis references), see the citations section of the writing page.
You can change how your thesis looks at any time by changing its YAML settings. There are two ways:
Open your .qmd file and edit the settings at the top. For example, to change the committee or the date:
or to change the left margin:
The options page lists everything you can change, including the thesis options. Each entry includes an example you can copy.
Go back to apa7maker, import your document, change what you like, click Make Document and Update, and copy the YAML. Then replace only the YAML at the top of your file (the part between the two lines of three dashes), leaving your writing below untouched.
Thesis mode sets margins, spacing, fonts, and page numbering to follow the Graduate School’s handbook. Changing them can make your thesis stop conforming. If you change them, confirm with the Graduate School before submitting.
| Problem | Try this |
|---|---|
| RStudio cannot find R | Reinstall R (Step 1), then restart RStudio. |
quarto is “not recognized” in the Terminal |
Close and reopen RStudio. If that fails, reinstall Quarto (quarto.org). |
| The extension did not install | Make sure the Terminal is inside your project folder, then repeat Step 6. |
| The .pdf (LaTeX) will not render | Run quarto check, then quarto install tinytex (Step 4). Or use apaquarto-typst. |
A citation shows as @something |
The key is missing from references.yaml or is misspelled (Step 12). |
| A figure does not appear | Check the file name, its extension, and that the image sits where you said it does. |
| An error about a file in use | Close the output file, wait for OneDrive to finish syncing, and render again. |
You can do this. Good luck with your thesis!
Drafted with AI assistance (Claude Sonnet 5.5, Anthropic). Reviewed and edited by W. Joel Schneider, CEHD, Temple University.