grouped some elmt defs in misc.typ

This commit is contained in:
2025-07-16 15:29:30 +02:00
parent d51a08830d
commit 7106cc3e22
6 changed files with 68 additions and 69 deletions

View File

@ -3,41 +3,6 @@
#import "core/setup.typ": setup
#import "core/utils.typ": fit-canvas, set-ctx
#let gap-render(gap) = set-ctx(ctx => {
ctx.y -= gap.size
return ctx
})
#let _gap(size: 20) = {
return ((
type: "gap",
draw: gap-render,
size: size
),)
}
#let _evt(participant, event) = {
return ((
type: "evt",
draw: evt-render,
participant: participant,
event: event,
lifeline-style: auto
),)
}
#let _col(p1, p2, width: auto, margin: 0, min-width: 0, max-width: none) = {
return ((
type: "col",
p1: p1,
p2: p2,
width: width,
margin: margin,
min-width: min-width,
max-width: max-width
),)
}
#let diagram(elements, width: auto) = {
if elements == none {
return