4 The _quarto-slides.yml file
project:
output-dir: Slides- Send the slides to the “Slides” directory.
format:
beamer:
theme: Madrid
colortheme: PrimaryBullets
aspectratio: 169
toc: false
include-in-header: "defs_beamer.tex"
execute:
echo: false
fig-width: 7
fig-height: 3.5
code-line-numbers: falseformatdefines the format, but only when the profile is not set tobook.beamerproduces pdf slides, using the \(\LaTeX\)beamerclass. If this is unfamiliar to you, you can change this to be html slides. The code used for conditional inclusion is based on the profile, not the output format.theme: Madridis specific to the beamer class.colortheme: PrimaryBulletsuses my custom beamer colortheme (which also affects the theme. this is bad programming on my part, but it looks nice). If you use this, you should change the name, institution, and email in the definition!aspectratioandtoc(table of contents), are beamer specific settings.include-in-headeruses a custom \(\LaTeX\) definition file for spacing in books versus slides. See below.executemakes figures the right size for 16x9 slides. It also makesechofalse by default (the book usestrueby default).
For include-in-header: defs_beamer.tex, I use two special commands to make sure that I can control spacing in the slides and the book separately. In slides, I want to add spacing between lists. The \lspace command is defined as \newline if the file is executed without profile --book, and it’s defined as nothing if the profile is set to book. Similarly, \pspace adds a space between paragraphs if the book is rendering to slides and does nothing for the book.