When writing a theme, it would help to have a way to get an inverted subslide range, e.g., to have an alert function with optional subslide ranges (like Beamer):
#let alert(txt, vs: (:)) = {
only(vs, text(txt, fill: red))
only(invert-subslide-range(vs), txt)
}
Alternatively, alternatives-cases could stop evaluating at first match, then
#let alert(txt, vs: (:)) = alternatives-cases((vs, (:)), case => {
set text(fill: red) if case == 0
txt
})
would not always output the second case.
When writing a theme, it would help to have a way to get an inverted subslide range, e.g., to have an
alertfunction with optional subslide ranges (like Beamer):Alternatively,
alternatives-casescould stop evaluating at first match, thenwould not always output the second case.