Revealjs presentations with Quarto: a template
Introduction
I love blogdown
, bookdown
, packagedown
and other downs (xaringan
not so much). But the new star is Quarto.
The name “Quarto” allegedly comes from the format type used to print the Sibyllenbuch, believed to have been printed by Johannes Gutenberg in 1452–53.
Quarto is a language agnostic CTI tool built on Pandoc that can render our markdown into almost anything (e.g. HTML, PDF, MS Word, Revealjs, ePub, etc.). Just change the extension “.rmd
” to “.qmd
” and it will run (although it is better to fully jump on the Quarto train an embrace the much more elegant settings declarations and chunk options).
There are many tutorials about Quarto and this will not be one of them. I will just point you to a boilerplate reveal.js presentation (code in Github) and add a few tips that I consider very important.
Extensions
What I use:
Font Awesome Extension for Quarto
To use extensions:
- Install from terminal
quarto install extension repo/quartoextension
- Add extension to the project you use it in
quarto add repo/quartoextension
Print to PDF:
Toggle into Print View using the E key (or using the Navigation Menu).
Open the in-browser print dialog (CTRL/CMD+P).
Change the Destination setting to Save as PDF.
Change the Layout to Landscape.
Change the Margins to None.
Enable the Background graphics option.
Click Save
Notes
Github Pages doesn’t render the presentation correctly if it is not self-contained HTML (looks like this). To obtain a self-contained HTML we use embed-resources: true
but this has some drawbacks.
Embedding video using Quarto default functionality fails when using embed-resources: true
(fixed in Quarto 1.3, but current version I use is version 1.2.269).External videos (e.g. youtube) embedding work with iframe
and data-external="1"
.
Chalkboard plugin conflicts with embed-resources: true
so it must be disabled.