Slides
Generic slides
The main building block of the Slydekit framework is the slide function, which is used to create individual slides in a presentation.
#let slide(
title,
steps: none
label: none,
body
)titleThe title of the slide.
steps – default: noneThe number of steps in the slide. This is used to create incremental slides, where content is revealed step by step. This is required to animate slides using CeTZ or Fletcher, but optional for other animations.
label – default: noneAn optional label for the slide. This can be used to reference the slide later in the presentation.
bodyThe content of the slide.
Practically, a slide can be defined in various ways:
// Markup-based slide + label
== Title <label>
Content of the slide
// Slide function + label
#slide("Title", label: <label>)[
Content of the slide
]
// Slide function
#slide[
Content of the slide
]slide("Title")[...] creates a slide with the specified title. When a slide is defined as slide[...], its title is automatically inherited from the previous slide.Custom slides
There are several ways to define custom slides, which can be used to create slides with different layouts and styles. For instance, the focus-slide function used for capturing the audience’s attention is defined as follows in the built-in themes:
// Focus slide of the simple theme
#let simple-focus-slide(body) = context {
set page(header:none, footer: none, fill: sk-states.colors.get().focus)
set align(center + horizon)
text(size: 2em, fill: white)[*#body*]
// Decrement the page counter to avoid counting the focus slide as a regular slide
counter(page).update(n => n - 1)
}If you want to create your own custom focus slide, that can use animations and other features, you can use the slide function to define it. For example:
#let my-focus-slide(..args) = {
set align(center + horizon)
set text(fill: white, size: 5em)
set page(header: none, footer: none, fill: rgb("#5E8B65"))
slide(..args)
// Freeze the slide number to avoid incrementing it for focus slides
sk-states.slide-number.update(n => n - 1)
}
Then, you can use it in your presentation like this:
#my-focus-slide[
*Hey* #pause *ho!*
]