Simple Theme
This theme originates from Polylux, created by Andreas Kröpelin.
Considered a relatively straightforward theme, you can use it to create simple slides and freely incorporate features you like.
Initialization
You can initialize it using the following code:
#import "@preview/touying:0.8.0": *
#import themes.simple: *
#show: simple-theme.with(
aspect-ratio: "16-9",
footer: [Simple slides],
)
The simple-theme function accepts the following parameters:
aspect-ratio: The aspect ratio of the slides, which can be "16-9" or "4-3", with a default of "16-9".header: The content displayed in the header, with a default ofself => utils.display-current-heading(setting: utils.fit-to-width.with(grow: false, 100%), level: 1, depth: self.slide-level). You can also pass a function likeself => self.info.title.header-right: The content displayed on the right side of the header, with a default ofself => self.info.logo.footer: The content displayed in the footer, with a default ofnone. You can also pass a function likeself => self.info.author.footer-right: The content displayed on the right side of the footer, with a default ofcontext utils.slide-counter.display() + " / " + utils.last-slide-number.primary: The primary color of the theme, with a default ofaqua.darken(50%).subslide-preamble: The content inserted before the body of every slide, with a default ofblock(below: 1.5em, text(1.2em, weight: "bold", utils.display-current-heading(level: 2))), i.e. it adds the subsection title to the current slide. Passnoneto remove it.
Slide Function Family
The Simple theme provides a variety of custom slide functions:
#centered-slide(config: (:), setting: body => body, ..args)[
...
]
A slide with its content centered. To start a new section, write = Title directly, or call #new-section-slide below.
#title-slide(config: (:), body)[
...
]
The same as centered-slide (it additionally freezes the slide counter); this is provided mainly for consistency with Polylux syntax.
#new-section-slide(config: (:), body)
A centered section divider that displays the current level-1 heading. It is already registered through config-common(new-section-slide-fn: ..), so it is normally triggered by writing = Title and does not need to be called by hand.
#slide(
config: (:),
repeat: auto,
setting: body => body,
composer: auto,
)[
...
]
A default slide with headers and footers, where the header corresponds to the current section, and the footer is what you set.
#focus-slide(foreground: ..., background: ...)[
...
]
Used to draw attention, it optionally accepts a foreground color (defaulting to white) and a background color (defaulting to auto, i.e., self.colors.primary).
Speaker Notes
Simple defines its own notes function and registers it with config-common(notes-fn: notes), so the notes panel on a second screen and in the only-notes view follows the theme's colors. It is built on top of touying-notes, and you can override it with your own implementation:
#show: simple-theme.with(
config-common(notes-fn: my-notes),
)
See Speaker Notes for details.
Example
#import "@preview/touying:0.8.0": *
#import themes.simple: *
#show: simple-theme.with(
aspect-ratio: "16-9",
footer: [Simple slides],
)
#title-slide[
= Keep it simple!
#v(2em)
Alpha #footnote[Uni Augsburg] #h(1em)
Bravo #footnote[Uni Bayreuth] #h(1em)
Charlie #footnote[Uni Chemnitz] #h(1em)
July 23
]
== First slide
#lorem(20)
#focus-slide[
_Focus!_
This is very important.
]
= Let's start a new section!
== Dynamic slide
Did you know that...
#pause
...you can see the current section at the top of the slide?
