Quarto is the successor of R
Markdown. It reads the same Markdown, runs the same R code with knitr,
and also works with Python and Julia. {iheiddown} gives a
Quarto template for each kind of document:
| Template | Output | Engine |
|---|---|---|
syllabus |
Typst | |
problemset |
Typst | |
thesis |
LaTeX (default) or Typst | |
slides |
HTML and PowerPoint | reveal.js and Pandoc |
poster |
Typst |
In RStudio, choose File > New Project > New Directory > IHEID document (Quarto), and choose a template.
In Positron, in another editor, or in a script, use
use_quarto():
use_quarto() copies these files into the folder:
syllabus.qmd, to
edit;_extensions/, which formats the
document;_brand.yml, with the colours and fonts of the
Institute;iheid-logo.png, the logo of the Institute;.bib file.It does not change files that already exist, unless you give
overwrite = TRUE.
Render the document with the Render button, or with
quarto render in a terminal. RStudio and Positron include
Quarto.
Typst makes PDF files, as LaTeX does. Quarto includes Typst, so you do not need to install anything else, and Typst is much faster than LaTeX. All PDF templates use Typst.
The thesis also has a LaTeX format, with the layout of
thesis_pdf(). It is the default, because many supervisors
and journals ask for LaTeX. To use Typst, change the format in
_quarto.yml:
Do not put LaTeX commands such as \newpage in the text:
they do not work with Typst. Use the Quarto shortcode
{{< pagebreak >}} instead.
Most of the Markdown and R code stays the same. These are the main changes:
| R Markdown | Quarto |
|---|---|
output: iheiddown::syllabus_pdf |
format: iheid-syllabus-typst |
knitr::include_graphics("x.png") |
 |
Chunk options in the header: {r, echo=FALSE} |
Chunk options in the chunk: #| echo: false |
fig.cap = "..." |
#| fig-cap: "..." |
A label (\#fig:delays) and
\@ref(fig:delays) |
#| label: fig-delays and @fig-delays |
\@ref(tab:x) |
@tbl-x |
A section label {#intro} and
\@ref(intro) |
{#sec-intro} and @sec-intro |
_bookdown.yml and index.Rmd |
_quarto.yml, with the chapters under
book: chapters: |
\newpage |
{{< pagebreak >}} |
Labels in Quarto start with fig-, tbl-,
eq- or sec-. Quarto then numbers the figure,
table, equation or section, and the reference is a link.
The ai-statement field works in the same way in both
systems. See ?ai_statement.
The slides follow the PowerPoint template of the Institute (2025):
# heading, with a panel on the
right;## heading;::: {.key-figure};## Thank you {.closing}.The template has a photo where these slides have a grey panel. To
show your own photo, give title-photo: photo.jpg in the
header, or a photo attribute on the heading:
# A chapter {photo="photo.jpg"}.
The starter file makes two formats.
iheid-slides-revealjs makes a web page, and
iheid-slides-pptx makes a PowerPoint file with the layouts
of the template. In PowerPoint, you can then choose other layouts of the
template, such as the lists and key figures, and add photos.
The templates follow the visual identity of the Institute (March
2025): the institutional red (#E2001A) for titles and
links, black or grey for the text, and Arial. Arial is on Windows and
macOS. On Linux, install it, or set another font with
mainfont in the header.