Release 0.2.0 #5
@ -63,6 +63,45 @@ _grp("Group 1", desc: "Description", {
|
|||||||
})
|
})
|
||||||
```)
|
```)
|
||||||
|
|
||||||
|
#let alt = example(```
|
||||||
|
_par("a", display-name: "Alice")
|
||||||
|
_par("b", display-name: "Bob")
|
||||||
|
|
||||||
|
_alt(
|
||||||
|
"first encounter", {
|
||||||
|
_seq("a", "b", comment: "Who are you ?")
|
||||||
|
_seq("b", "a", comment: "I'm Bob")
|
||||||
|
},
|
||||||
|
|
||||||
|
"know eachother", {
|
||||||
|
_seq("a", "b", comment: "Hello Bob")
|
||||||
|
_seq("b", "a", comment: "Hello Alice")
|
||||||
|
},
|
||||||
|
|
||||||
|
"best friends", {
|
||||||
|
_seq("a", "b", comment: "Hi !")
|
||||||
|
_seq("b", "a", comment: "Hi !")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
```)
|
||||||
|
|
||||||
|
#let loop = example(```
|
||||||
|
_par("a", display-name: "Alice")
|
||||||
|
_par("b", display-name: "Bob")
|
||||||
|
|
||||||
|
_loop("default loop", {
|
||||||
|
_seq("a", "b", comment: "Are you here ?")
|
||||||
|
})
|
||||||
|
_gap()
|
||||||
|
_loop("min loop", min: 1, {
|
||||||
|
_seq("a", "b", comment: "Are you here ?")
|
||||||
|
})
|
||||||
|
_gap()
|
||||||
|
_loop("min-max loop", min: 1, max: 5, {
|
||||||
|
_seq("a", "b", comment: "Are you still here ?")
|
||||||
|
})
|
||||||
|
```)
|
||||||
|
|
||||||
#let sync = example(```
|
#let sync = example(```
|
||||||
_par("alice", display-name: "Alice")
|
_par("alice", display-name: "Alice")
|
||||||
_par("bob", display-name: "Bob")
|
_par("bob", display-name: "Bob")
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/// #examples.grp
|
/// #examples.grp
|
||||||
/// - name (content): The group's name
|
/// - name (content): The group's name
|
||||||
/// - desc (none, content): Optional description
|
/// - desc (none, content): Optional description
|
||||||
/// - type (str): The groups's type (unused for the moment)
|
/// - type (str): The groups's type (should only be set through other functions like @@_alt() or @@_loop() )
|
||||||
/// - elmts (array): Elements inside the group (can be sequences, other groups, notes, etc.)
|
/// - elmts (array): Elements inside the group (can be sequences, other groups, notes, etc.)
|
||||||
#let _grp(
|
#let _grp(
|
||||||
name,
|
name,
|
||||||
@ -11,9 +11,48 @@
|
|||||||
elmts
|
elmts
|
||||||
) = {}
|
) = {}
|
||||||
|
|
||||||
/// Synchronizes multiple sequences
|
/// 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
|
||||||
/// #examples.sync
|
/// #examples.sync
|
||||||
/// - elmts (array): Synchronized elements (generally sequences or notes)
|
/// - elmts (array): Synchronized elements (generally sequences or notes)
|
||||||
#let _sync(
|
#let _sync(
|
||||||
elmts
|
elmts
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/// 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) = {}
|
BIN
manual.pdf
BIN
manual.pdf
Binary file not shown.
@ -183,7 +183,7 @@ chronos.diagram({
|
|||||||
examples: examples
|
examples: examples
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
#tidy.show-module(grp-docs, show-outline: false)
|
#tidy.show-module(grp-docs, show-outline: false, sort-functions: none)
|
||||||
|
|
||||||
#pagebreak(weak: true)
|
#pagebreak(weak: true)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user