Rendering

Output Formats

Quarto provides the following output formats:

  • HTML

  • PDF

  • Typst (way better than LaTex!)

  • MS Word (docx)

  • OpenOffice (odt)

  • ePub

How To Render

1. In RStudio:

Click the Render button OR use the quarto R package:

library(quarto)
quarto_render("my-reproducible-manuscript.qmd") # defaults to html
quarto_render("my-reproducible-manuscript.qmd", output_format = "pdf")


2. Terminal: quarto render (--to [output format])

quarto render
quarto render my-reproducible-manuscript.qmd # defaults to html
quarto render my-reproducible-manuscript.qmd --to pdf

Render Options

Render as an HTML document

---
title: "Hello Quarto"
author: "JJB + Course"
format: html
---

Render as a PDF

---
title: "Hello Quarto"
author: "JJB + Course"
format: pdf
---

Render as a Word

---
title: "Hello Quarto"
author: "JJB + Course"
format: docx
---

Multi-format Render Options

Render one Quarto document to many output options like HTML, Jupyter Notebook, PDF, and Word Document.

---
title: "Hello Quarto"
author: "JJB + Course"
format: 
  html: default
  ipynb: default # new format!
  pdf: default
  docx: default
---

Note

Quarto supports many formats include PowerPoint (PPT), Revealjs, Beamer, Rich Text Format (RTF), and on. For details, see All Formats.

Note

the Render button will not work for multiple formats.

Journal Formats

Besides default html/pdf/docx, Quarto offers journal templates. See also Quarto Documentation: Journals.

  • acm: Association of Computing Machinery (ACM)
  • plos: Public Library of Science (PLOS)
  • agu: American Geophysical Union (AGU)
  • elsevier: Elsevier
  • biophysical-journal: Biophysical
  • acs: American Chemical Society (ACS)
  • jss: Journal of Statistical Software (JSS)

APA - apaquarto

Use a journal template from the start of your project (will create a new document):

  • In console
quarto use template quarto-journals/<template-name>


For example:

quarto use template wjschne/apaquarto

APA - apaquarto

APA - apaquarto

Publishing

Sharing Work

  • Once you are satisfied with the Quarto document, it’s time to publish your work!

  • The publishing step is important as the documents need to be viewed under the guise of a server

  • There are multiple options for publishing with Quarto, and we’ll present two of them

Publish Options

quarto publish gh-pages
  • This option is great if you want to share your document through a GitHub Pages website.
  • Alternatively, you can publish your Quarto document on Quarto Pub via Quarto. Use the following command in your terminal:
quarto publish quarto-pub

OR:

  • You can find the blue Publishing icon in the following locations:

    • The upper right of the file editor

    • The document viewer when viewing a document

    • The embedded viewer when running a Shiny application

    • The Plots pane

      • Click on icon