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
02:00
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
You can create inline footnotes like so: some inline text with a^[footnote]
Pandoc also supports numbering and formatting footnotes using the following syntax:
![Howard is glamorous](images/howard-glamour.jpg){#fig-glamour}
The presence of the caption (Howard is glamouros) and label (#fig-howard) make this figure referenceable. This enables you to use the following syntax to refer to it elsewhere in the document
Figure 1 is a great glamour shot of Howard
If you hover your mouse over the citation and footnote in this sentence you’ll see a popup displaying the reference contents:
format:
html:
citations-hover: true
footnotes-hover: true
For example, did you know that Howard is a dog^[Specifically he is a Boston Terrier, although sometimes he acts like a cat]?
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
04:00
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!02:00
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.
SASS (Syntactically Awesome Style Sheets) is a pre-processor scripting language that will be compiled or interpreted into CSS. SassScript is itself a scripting language whereas SCSS is the main syntax for the SASS which builds on top of the existing CSS syntax
Sass reduces repetition of CSS and therefore saves time - think of it like manually changing code vs using functions in R.
Color palette: #404042
#3c6f9a
#fa551b
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
03:00