Compare commits

..

1 Commits
main ... dev

Author SHA1 Message Date
e8d737ff00
updated manual 2024-11-09 17:57:53 +01:00
5 changed files with 89 additions and 21 deletions

View File

@ -1,5 +1,18 @@
#import "example.typ": example #import "example.typ": example
#let seq-return = example(```
_seq(
"Bob", "Alice",
comment: [hello],
enable-dst: true
)
_seq(
"Alice", "Alice",
comment: [some action]
)
_ret(comment: [bye])
```)
#let seq-comm-align = example(``` #let seq-comm-align = example(```
_par("p1", display-name: "Start participant") _par("p1", display-name: "Start participant")
_par("p2", display-name: "End participant") _par("p2", display-name: "End participant")
@ -121,15 +134,58 @@ _sync({
}) })
```) ```)
#let gaps-seps = example(``` #let gaps = example(```
_par("alice", display-name: "Alice") _par("a", display-name: "Alice")
_par("bob", display-name: "Bob") _par("b", display-name: "Bob")
_seq("alice", "bob", comment: "Hello") _seq("a", "b", comment: [message 1])
_gap(size: 10) _seq("b", "a", comment: [ok], dashed: true)
_seq("bob", "alice", comment: "Hi") _gap()
_sep("Another day") _seq("a", "b", comment: [message 2])
_seq("alice", "bob", comment: "Hello again") _seq("b", "a", comment: [ok], dashed: true)
_gap(size: 40)
_seq("a", "b", comment: [message 3])
_seq("b", "a", comment: [ok], dashed: true)
```)
#let seps = example(```
_par("a", display-name: "Alice")
_par("b", display-name: "Bob")
_sep[Initialization]
_seq("a", "b", comment: [Request 1])
_seq(
"b", "a",
comment: [Response 1],
dashed: true
)
_sep[Repetition]
_seq("a", "b", comment: [Request 2])
_seq(
"b", "a",
comment: [Response 2],
dashed: true
)
```)
#let delays = example(```
_par("a", display-name: "Alice")
_par("b", display-name: "Bob")
_seq("a", "b", comment: [Auth Request])
_delay()
_seq(
"b", "a",
comment: [Auth Response],
dashed: true
)
_delay(name: [5 minutes later])
_seq(
"b", "a",
comment: [Good Bye !],
dashed: true
)
```) ```)
#let notes-shapes = example(``` #let notes-shapes = example(```

View File

@ -1,8 +1,15 @@
/// Creates a gap before the next element
/// - size (int): Size of the gap
#let _gap(size: 20) = {}
/// Creates a separator before the next element /// Creates a separator before the next element
/// #examples.gaps-seps /// #examples.seps
/// - name (content): Name to display in the middle of the separator /// - name (content): Name to display in the middle of the separator
#let _sep(name) = {} #let _sep(name) = {}
/// Creates a delay before the next element
/// #examples.delays
/// - name (content, none): Name to display in the middle of the delay area
/// - size (int): Size of the delay
#let _delay(name: none, size: 30) = {}
/// Creates a gap before the next element
/// #examples.gaps
/// - size (int): Size of the gap
#let _gap(size: 20) = {}

View File

@ -42,6 +42,17 @@
slant: none slant: none
) = {} ) = {}
/// Creates a return sequence
/// #examples.seq-return
/// - comment (none, content): Optional comment to display along the arrow
#let _ret(comment: none) = {}
/// Accepted values for `comment-align` argument of @@_seq()
/// #examples.seq-comm-align
#let comment-align = (
"start", "end", "left", "center", "right"
)
/// Accepted values for `event` argument of @@_evt() /// Accepted values for `event` argument of @@_evt()
/// ///
/// `EVENTS = ("create", "destroy", "enable", "disable")` /// `EVENTS = ("create", "destroy", "enable", "disable")`
@ -52,9 +63,3 @@
#let tips = ( #let tips = (
"", ">", ">>", "\\", "\\\\", "/", "//", "x", "o", "", ">", ">>", "\\", "\\\\", "/", "//", "x", "o",
) )
/// Accepted values for `comment-align` argument of @@_seq()
/// #examples.seq-comm-align
#let comment-align = (
"start", "end", "left", "center", "right"
)

Binary file not shown.

View File

@ -197,7 +197,7 @@ chronos.diagram({
examples: examples examples: examples
) )
) )
#tidy.show-module(gap-sep-docs, show-outline: false) #tidy.show-module(gap-sep-docs, show-outline: false, sort-functions: none)
#pagebreak(weak: true) #pagebreak(weak: true)