Rendering

Output Formats

Quarto provides the following output formats:

  • HTML

  • PDF

  • 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

Exercise

  • Go to the Rendering chapter in the workshop book and refer to the instructions in the Exercise section.

  • You will render your document into html and docx formats.

10:00

Sharing Work

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

  • There are a number of options

Sharing Work

  • Share the pdf or Word document with collaborators and incorporate changes back into the .qmd document

  • Trackdown in R

    • Converts document to md and posts on Google Docs/Googledrive
  • Render to website and use hypothes.is