chronos/docs/groups.typ

58 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2024-10-02 16:33:21 +00:00
/// Creates a group of sequences
/// #examples.grp
/// - name (content): The group's name
/// - desc (none, content): Optional description
2024-10-04 23:52:31 +00:00
/// - type (str): The groups's type (should only be set through other functions like @@_alt() or @@_loop() )
2024-10-02 16:33:21 +00:00
/// - elmts (array): Elements inside the group (can be sequences, other groups, notes, etc.)
#let _grp(
name,
desc: none,
type: "default",
elmts
) = {}
2024-10-04 23:52:31 +00:00
/// Creates an alt-else group of sequences
///
/// It contains at least one section but can have as many as needed
/// #examples.alt
/// - desc (content): The alt's label
/// - elmts (array): Elements inside the alt's first section
/// - ..args (content, array): Complementary "else" sections.\ You can add as many else sections as you need by passing a content (else section label) followed by an array of elements (see example)
#let _alt(
desc,
elmts,
..args
)
/// Creates a looped group of sequences
/// #examples.loop
/// - desc (content): Loop description
/// - min (none, number): Optional lower bound of the loop
/// - max (auto, number): Upper bound of the loop. If left as `auto` and `min` is set, it will be infinity (`'*'`)
/// - elmts (array): Elements inside the group
#let _loop(
desc,
min: none,
max: auto,
elmts
) = {}
/// Synchronizes multiple sequences\
/// All elements inside a synchronized group will start at the same time
2024-10-02 16:33:21 +00:00
/// #examples.sync
/// - elmts (array): Synchronized elements (generally sequences or notes)
#let _sync(
elmts
2024-10-04 23:52:31 +00:00
)
/// Creates an optional group\
/// This is a simple wrapper around @@_grp()
/// - desc (content): Group description
/// - elmts (array): Elements inside the group
#let _opt(desc, elmts) = {}
/// Creates a break group\
/// This is a simple wrapper around @@_grp()
/// - desc (content): Group description
/// - elmts (array): Elements inside the group
#let _break(desc, elmts) = {}