use_quarto() copies a Quarto template for a Geneva Graduate Institute
document into a folder: a starter .qmd file, the Quarto extension
that formats it, the Institute's _brand.yml file and logo,
and any example files the template uses.
Render the document with the Render button in RStudio or Positron,
or with quarto render in a terminal.
The PDF formats use Typst, which Quarto includes,
so they do not need a LaTeX installation.
The slides use reveal.js,
and can also be made as a PowerPoint file.
use_quarto() needs no internet connection and no other R package.
Quarto itself must be installed to render the document.
RStudio and Positron include Quarto.
Usage
use_quarto(template = names(quarto_templates), dir = ".", overwrite = FALSE)Arguments
- template
The template to use:
"syllabus": a course syllabus, with a weekly schedule."problemset": a problem set or assignment."thesis": a master's thesis or PhD dissertation, as a Quarto book. It renders with LaTeX by default, with the layout ofthesis_pdf()._quarto.ymlcan also render it with Typst."slides": slides for a talk or a class, with the layouts of the Institute's PowerPoint template. Theiheid-slides-revealjsformat makes a web page: open it in a web browser to present. Theiheid-slides-pptxformat makes a PowerPoint file."poster": a conference poster. Theposter-layoutfield chooses one of three layouts:columns,betterlandorbetterport.
- dir
The folder to put the files in.
use_quarto()makes the folder if it does not exist.- overwrite
If
FALSE, the default, files that already exist indirare not changed.
See also
ai_statement() for the ai-statement field
that all templates have.
Examples
dir <- file.path(tempdir(), "MINT001")
use_quarto("syllabus", dir)
#> ✔ Copied the "syllabus" template to
#> /var/folders/q2/p1t6rgxj5fj32g1dc7dmd49r0000gn/T//RtmpIabOHG/MINT001.
#> ℹ Edit
#> /var/folders/q2/p1t6rgxj5fj32g1dc7dmd49r0000gn/T//RtmpIabOHG/MINT001/syllabus.qmd,
#> and render it with the Render button or `quarto render` in a terminal.
list.files(dir, recursive = TRUE)
#> [1] "_brand.yml"
#> [2] "_extensions/iheid-syllabus/_extension.yml"
#> [3] "_extensions/iheid-syllabus/ai-statement.lua"
#> [4] "_extensions/iheid-syllabus/color-text.lua"
#> [5] "_extensions/iheid-syllabus/typst-show.typ"
#> [6] "_extensions/iheid-syllabus/typst-template.typ"
#> [7] "geneva-syllabus.csl"
#> [8] "iheid-logo.png"
#> [9] "references.bib"
#> [10] "syllabus.qmd"