bumped to Typst 0.13.1 + cetz 0.3.4

This commit is contained in:
2025-03-12 14:14:10 +01:00
parent 3eadf63db3
commit 788c8999b1
16 changed files with 69 additions and 43 deletions

View File

@ -5,7 +5,7 @@
chronos: chronos
)
#let example(src, show-src: true, vertical: false, fill: true, wrap: true) = {
#let example(src, show-src: true, vertical: false, fill: false, wrap: true) = {
src = src.text
let full-src = example-preamble + src
let body = eval(full-src, scope: example-scope)
@ -16,15 +16,15 @@
box(
stroke: black + 1pt,
radius: .5em,
fill: if fill {color.white.darken(5%)} else {none},
fill: if fill {color.white.darken(2%)} else {none},
if show-src {
let src-block = align(left, raw(src, lang: "typc"))
let src-block = raw(src, block: true, lang: "typc")
table(
columns: if vertical {1} else {2},
inset: 1em,
inset: 5pt,
align: horizon + center,
stroke: none,
img,
table.cell(inset: 1em, img),
if vertical {table.hline()} else {table.vline()}, src-block
)
} else {

View File

@ -14,8 +14,10 @@ _ret(comment: [bye])
```)
#let seq-comm-align = example(```
_par("p1", display-name: "Start participant")
_par("p2", display-name: "End participant")
_par("p1",
display-name: "Start participant")
_par("p2",
display-name: "End participant")
let alignments = (
"start", "end",
"left", "right",
@ -103,15 +105,15 @@ _par("a", display-name: "Alice")
_par("b", display-name: "Bob")
_loop("default loop", {
_seq("a", "b", comment: "Are you here ?")
_seq("a", "b", comment: "Are you here?")
})
_gap()
_loop("min loop", min: 1, {
_seq("a", "b", comment: "Are you here ?")
_seq("a", "b", comment: "Are you here?")
})
_gap()
_loop("min-max loop", min: 1, max: 5, {
_seq("a", "b", comment: "Are you still here ?")
_seq("a", "b", comment: "Are you still here?")
})
```)