J.J. Allaire
July 11th, 2022
Quarto is the next generation of R Markdown
Quarto is an open-source scientific and technical publishing system that builds on standard markdown with features essential for scientific communication.
Literate programming system in the tradition of Org-mode, Sweave, Weave.jl, R Markdown, iPyPublish, Jupyter Book, etc.
https://coko.foundation/articles/single-source-publishing.html
For R, Quarto still uses Knitr under the hood.
This means that for the most part the vast majority existing Rmd files can be rendered unmodified w/ Quarto.
Note that the standard syntax for chunk options has changed (old syntax nevertheless still works):
The Jupyter engine supports the use of Python, Julia, and any other language that has a Jupyter kernel.
Jupyter supports two input file formats:
.ipynb
).qmd
)Hello Jupyter: https://quarto.org/#hello-quarto
Side-by-side preview for JupyterLab, VS Code, Emacs, etc.:
Quarto includes native support for Observable JS, a set of enhancements to vanilla JavaScript created by Mike Bostock (also the author of D3).
Observable JS is distinguished by its reactive runtime, which is especially well suited for interactive data exploration and analysis.
Core features have similar expression across formats:
Code folding
Tabsets
Theming
Anchor links
The R Markdown ecosystem was built over nearly a decade (resulting in lots of inconsistency & duplication)
Tabset syntax: https://quarto.org/docs/output-formats/html-basics.html#tabsets
Universal themeing system (based on SCSS) for all HTML output formats (shared by HTML and RevealJS slides, extendable to work with anything).
Based on core variables defined by bslib (so fully compatible with Shiny, Flexdashboard, & R Markdown themes).
Sample theme file: https://quarto.org/docs/output-formats/html-themes.html#theme-options
Cross reference figures, tables, equations, sections, theorems, etc.
Plain markdown: https://quarto.org/docs/authoring/cross-references.html#subfigures
Knitr/Jupyter: https://quarto.org/docs/authoring/cross-references.html#computations
Advanced page layout features inspired by Tutfe, Distill, and Hugo Prose.
layout-ncol
or layout-nrow
) available for simple cases.Work in HTML, PDF, MS Word, and ePub output
Websites
Books
Blogs
Presentations
Arbitrary content depth / organization
Multi-level navigation (navbar / sidebar / hybrid)
Full text search (client side or Algolia)
Freezing computational output
Example: https://quarto.org
https://quarto.org/docs/presentations/revealjs/demo/
Quarto CLI
RStudio IDE
VS Code Extension
Visual Editor
Core component that drives Quarto rendering. This is the only thing you need to render plain markdown (it includes Pandoc 2.18).
knitr
to render documents w/ Rjupyter
to render with Jupyter kernelsLike git
, this is a system level compontent that is used by RStudio, VS Code, Jupyter Lab, terminal sessions, etc.
Download/install: https://quarto.org/docs/get-started/
Current release of RStudio IDE has Quarto tooling on-par w/ R Markdown tooling
https://marketplace.visualstudio.com/items?itemName=quarto.quarto
https://quarto.org/docs/visual-editor/
The Quarto visual editor provides a WYSIWYM editing interface for all of Pandoc markdown
Tables, citations, cross-references, footnotes, divs/spans, definition lists, attributes, raw HTML/TeX, etc.
Includes support for executing code cells and viewing their output inline.
Getting started: https://quarto.org/docs/get-started/
User guide: https://quarto.org/docs/guide/
rstudio::conf(2022): https://www.rstudio.com/conference/