跳到主要内容

alternatives-match

#alternatives has a couple of "cousins" that might be more convenient in some situations. The first one is #alternatives-match that has a name inspired by match-statements in many functional programming languages. The idea is that you give it a dictionary mapping from subslides to content:

Example:

#alternatives-match((
"1, 3-5": [this text has the majority],
"2, 6": [this is shown less often]
))
Parameters

subslides-contents : dictionary

A dictionary mapping from subslides to content.

position : alignment    default: bottom + left

The alignment of alternatives within the reserved space. Default is bottom + left.

stretch : bool    default: false

Whether to stretch all alternatives to the maximum width and height. Default is false. Important: If you use a zero-length content like a context expression, you should set stretch: false.

Returns: content