Getting started

This section introduces the basic workflow for creating presentations with Slydekit. You will first learn how to import the template and configure the main presentation settings. Then, a minimal example will demonstrate the core structure of a Slydekit document, including how to create slides and organize content.

Import the template

To use the slydekit template, you need to include the following line at the beginning of your typ file:

#import "@preview/slydekit:0.1.0": *

Template initialization

After importing the template, you have to initialize the template by a show rule with the #slydekit command. This function takes a set of optional arguments that allow you to customize the presentation’s appearance and behavior.

#show: slydekit.with(
  title: "Title",
  subtitle: "Subtitle",
  short-title: "Short title",
  author: "Author",
  date: "Date",
  institution: "Institution",
  contact: none,
  theme: simple,
  fonts: none,
  colors: none,
  lang: "en",
  aspect-ratio: "16-9",
  navigation-style: "topbar",
  title-logo: (),
  slide-logo: none,
  handout: false,
)
Argument
title – default: “Title”
string | content

Main title of the presentation

Argument
subtitle – default: “Subtitle”
string | content

Optional subtitle for the presentation

Argument
short-title – default: “Short title”
string | content

Shorter version of the title for use in headers or footers

Argument
author – default: “Author”
string | content

Name of the author(s) or presenter(s)

Argument
date – default: “Date”
string | content

Date of the presentation

Argument
institution – default: “Institution”
string | content

Name of the institution or organization associated with the presentation

Argument
contact – default: none
string | content

Contact information for the author(s) or presenter(s), such as an email address or website (optional)

Argument
theme – default: simple
theme

The theme to be used for the presentation. Available themes include simple, fancy, metropolis, cambfurt, and chalkboard. You can also create your own custom theme by defining a new theme in your Typst document.

Argument
fonts – default: none
dictionary

Custom fonts to be used in the presentation. You can specify a set of fonts to override the default fonts provided by the selected theme. If not specified, the theme’s default fonts will be used.

The dictionary should have the following structure:

#let fonts = (
  size: "Size for body text",
  body: "Font Name for body text",
  math: "Font Name for math text",
  raw: "Font Name for raw text",
)
Argument
colors – default: none
dictionary

Custom colors to be used in the presentation. You can specify a set of colors to override the default colors provided by the selected theme. If not specified, the theme’s default colors will be used.

The dictionary should have the following structure:

#let colors = (
  primary: "Primary color for the presentation",
  secondary: "Secondary color for the presentation",
  background: "Background color for the slides",
  header: "Color for headers and titles",
  footer: "Color for footer text",
)
Argument
lang – default: “en”
string

Language of the presentation. This can be set to any valid language code (e.g., "en" for English, "fr" for French, etc.). The language setting affects the localization of certain elements in the presentation, such as the table of contents and navigation labels.

Available languages include:

  • "en": English
  • "fr": French
  • "es": Spanish
  • "de": German
  • "it": Italian
  • "zh": Chinese
  • "pt": Portuguese
Argument
aspect-ratio – default: “16-9”
string

Aspect ratio of the slides. Common values include “16-9” for widescreen presentations and “4-3” for standard presentations. This setting determines the dimensions of the slides and how they will be displayed on different screens and devices.

Argument
navigation-style – default: “topbar”
string

Navigation style for the presentation. Available options include “topbar” for a top navigation bar, “minislide” for a mini slide navigation, and other custom navigation styles that can be defined in your Typst document. This setting affects how users can navigate through the slides during the presentation.

Argument
title-logo – default: ()
array

Logo to be displayed on the title slide. You can provide an image file (e.g., PNG, SVG) to be displayed alongside the title and subtitle on the first slide of the presentation.

The array can contain one or more images. For example, if you need to display two logos on the title slide, the array can be defined as follows:

title-logo: (image("logo1.svg", height: 2.5cm), image("logo2.svg", height: 2.5cm))
Argument
slide-logo – default: none
image

Logo to be displayed on each slide. You can provide an image file (e.g., PNG, SVG) to be displayed in a consistent location on every slide of the presentation. This is useful for branding or to include a small logo throughout the presentation.

Argument
handout – default: false
bool

Whether to generate a handout version of the presentation. If set to true, the presentation will be formatted for printing or distribution as a handout, which may include additional notes or a different layout suitable for paper or PDF distribution. If set to false, the presentation will be formatted for on-screen viewing.

Basic usage

#import "@preview/slydekit:0.1.0": *

#show: slydekit.with(
  title: "Slydekit",
  subtitle: "An example of a presentation template using Typst",
  author: "John Doe",
  date: "2024-06-01",
  institution: "Université de Typst",
  contact: "john.doe@univ.typst.fr",
  title-logo: (image("slydekit-logo-full.svg", height: 2.5cm),),
  slide-logo: image("slydekit-logo-mini.svg", height: 1.25cm),
)

#title-slide

= First section

== First slide

#slide("Second slide")[
  I am #pause an animated slide

  $
    #uncover(2)[$y = f(x)$]
  $
]