Skip to content

Add function to invert a subslide range #214

@eprovst

Description

@eprovst

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions