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

Rendering to Multiple Formats

---
title: "My Reproducible Manuscript"
format: 
  html: default
  docx: default
  pdf: default
---

Then:

library(quarto)
quarto_render("my-reproducible-manuscript.qmd")

OR

quarto render my-reproducible-manuscript.qmd

You don’t have to run separate commands with the --to flag.

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)

Journal Formats

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

quarto use template quarto-journals/<template-name>


For example:

quarto use template quarto-journals/plos

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