One source of the difference in syntax is that Quarto is more closely aligned with Pandoc format names and options (thus the use of - as a word separator rather than _).
materials/workshop/04-static/old-rmarkdown.rmd
Table of contents (ToC) and sections are useful for breaking up longer documents.
or
Split up and flip between sections of a page, alternative to just two columns
::: {.panel-tabset}
## Element 1
## Element 2
:::
mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2
Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1
For example, here we specify that we want only “View Source” (no toggling of code visibility) and no caption on the code menu:
In some situations (especially for longer documents), you may prefer to send viewers to the source code on a version-control website rather than the built in viewer.
materials/workshop/04-static/penguin-report.qmd
downlit
The goal of
downlit
is to provide syntax highlighting and automatic linking of R code
Out of the box, Quarto is styled with Bootstrap 5 and opinionated defaults.
Bootstrap is the most popular CSS Framework for responsive websites, where v5 is the latest.
Quarto comes pre-installed with 25 themes from Bootswatch and you can use them like so:
materials/workshop/04-static/bootswatch-themed.qmd
and try out some themes!CSS = Cascading Style Sheets:
CSS is a language for specifying how documents are presented to users — how they are styled, laid out, etc mdn web docs
HTML structures the page, CSS styles it
:::{style="color: white; font-size: 150px; background-color:#d3d3d3;"}
Text
:::
Text
Some text with [dplyr code]{style="font-family: 'Fira Mono !important'; background-color:#d3d3d3;"} and more text.
Some text with code and more text.
::: {.big-text}
- Big text
- Still big
:::
- Smol text
Here is some [big text]{.big-text} and some small text.
Here is some big text and some small text.
format: PDF
TIP! - pandoc divs/spans are generally transferrable - CSS is not transferable - Lean on Quarto/Pandoc tooling and then reach for raw CSS/LaTeX
materials/workshop/01-intro/history.qmd