These slides will introduce creating RevealJS slides with Quarto Markdown. It’s highly recommended you follow along with the source code.
As with R Markdown (.rmd
) files, you’ll need to provide a YAML header at the top of your Quarto Markdown (.qmd
) files.
As in R Markdown, use #
to denote headers.
#
denotes a section, for which a title slide will be created.#
s denote a slide title, for which a regular slide will be created.Lists are created as with R Markdown.
Tables are created as with R Markdown.
x | y | z |
---|---|---|
0 | 0 | 0 |
1 | 1 | 0 |
You can control the font face as with R Markdown.
monospaced
Links and images can be included as with R Markdown.
Have you heard of wormholes?
Code chunks are created as with R Markdown. As usual, the output can be included directly in the document.
[1] "Howdy, from Quarto!"
Quarto provides an alternate way to specify code chunk options as comments in the form #| <option>: <value>
at the top of the code chunk1.
Fragments give Quarto Markdown an expressive power not found in R Markdown: transitions.
The simplest way to do this is by separating sections between 3 dots (with a space between each). See below:
For more advanced transitions, we introduce a new syntax:
:::
) on each end.{ ... }
. Start with .fragment
to create a fragment.You provide a fragment class in the curly brackets to specify a transition. Here are some examples, showing you can…
… highlight text.
… shrink and grow text.
… fade out text.
… fade in text.
See here for a list of all available classes.
Here’s the code for the shown fragments.
.
) before the class name.You can specify multiple classes to combine transitions.
Pay attention to this!
You can nest fragments1 to provide multiple transitions for one chunk of text. They will be executed in order (from the outer to inner fragments).
I’m feeling animated today!
You can make changes beyond the provided fragment classes. For example, if you’re familiar with CSS, you can control the style of the text directly:
Here’s some mutilated text! :)