Skip to main content

slide

Default slide function for the presentation.

Parameters

config : dictionary    default: (:)

is the configuration of the slide. Use config-xxx to set individual configurations for the slide. To apply multiple configurations, use utils.merge-dicts to combine them.

repeat : int | auto    default: auto

is the number of subslides. The default is auto, allowing touying to automatically calculate the number of subslides. The repeat argument is required when using #slide(repeat: 3, self => [ .. ]) style code to create a slide, as touying cannot automatically detect callback-style uncover and only.

setting : dictionary    default: body => body

is the setting of the slide, which can be used to apply set/show rules for the slide.

composer : array | function    default: auto

is the layout composer of the slide, allowing you to define the slide layout. For example, #slide(composer: (1fr, 2fr, 1fr))[A][B][C] to split the slide into three parts. The first and the last parts will take 1/4 of the slide, and the second part will take 1/2 of the slide. If you pass a non-function value like (1fr, 2fr, 1fr), it will be assumed to be the first argument of the components.side-by-side function. The components.side-by-side function is a simple wrapper of the grid function. It means you can use the grid.cell(colspan: 2, ..) to make the cell take 2 columns. For example, #slide(composer: 2)[A][B][#grid.cell(colspan: 2)[Footer]] will make the Footer cell take 2 columns. If you want to customize the composer, you can pass a function to the composer argument. The function should receive the contents of the slide and return the content of the slide, like #slide(composer: grid.with(columns: 2))[A][B].

..bodies : arguments

is the contents of the slide. You can call the slide function with syntax like #slide[A][B][C] to create a slide.