Skip to main content

slide

Default slide function for the presentation.

Parameters

title : string    default: auto

The title of the slide. Default is auto.

config : dictionary    default: (:)

The configuration of the slide. You can use config-xxx to set the configuration of the slide. For several configurations, you can use utils.merge-dicts to merge them.

repeat : int | string    default: auto

The number of subslides. Default is auto, which means touying will automatically calculate the number of subslides. The repeat argument is necessary when you use #slide(repeat: 3, self => [ .. ]) style code to create a slide. The callback-style uncover and only cannot be detected by touying automatically.

setting : function    default: body => body

The setting of the slide. You can use it to add some set/show rules for the slide.

composer : function | array    default: auto

The composer of the slide. You can use it to set the layout of the slide. 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 : array

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