Update cetz & ci

This commit is contained in:
2025-09-23 23:29:06 -07:00
parent 121780df6c
commit e5b0053465
17 changed files with 393 additions and 483 deletions

View File

@ -1,5 +1,5 @@
#import "@local/handout:0.1.0": *
#import "@preview/cetz:0.3.1"
#import "@preview/cetz:0.4.2"
#show: handout.with(
title: [Warm-Up: What's an AST?],
@ -24,51 +24,48 @@ respecting the order of operations $[and, times, div, +, -]$.
#v(2mm)
#align(
center,
cetz.canvas({
import cetz.draw: *
#align(center, cetz.canvas({
import cetz.draw: *
// spell:off
content((0, 0), $+$, name: "r")
content((-0.5, -1), $3$, name: "a")
content((0.5, -1), $div$, name: "b")
content((-0.3, -2), $times$, name: "ba")
content((1.3, -2), $and$, name: "bb")
content((-0.8, -3), $9$, name: "baa")
content((0.2, -3), $8$, name: "bab")
content((0.8, -3), $5$, name: "bba")
content((1.8, -3), $6$, name: "bbb")
// spell:on
// spell:off
content((0, 0), $+$, name: "r")
content((-0.5, -1), $3$, name: "a")
content((0.5, -1), $div$, name: "b")
content((-0.3, -2), $times$, name: "ba")
content((1.3, -2), $and$, name: "bb")
content((-0.8, -3), $9$, name: "baa")
content((0.2, -3), $8$, name: "bab")
content((0.8, -3), $5$, name: "bba")
content((1.8, -3), $6$, name: "bbb")
// spell:on
// Zero-sized arrows are a hack for offset.
set-style(
stroke: (thickness: 0.3mm),
mark: (
start: (
symbol: "|",
offset: 0.25,
width: 0mm,
length: 0mm,
),
end: (
symbol: "|",
offset: 0.25,
width: 0mm,
length: 0mm,
),
// Zero-sized arrows are a hack for offset.
set-style(
stroke: (thickness: 0.3mm),
mark: (
start: (
symbol: "|",
offset: 0.25,
width: 0mm,
length: 0mm,
),
)
end: (
symbol: "|",
offset: 0.25,
width: 0mm,
length: 0mm,
),
),
)
// spell:off
line("r", "a")
line("r", "b")
line("b", "ba")
line("b", "bb")
line("ba", "baa")
line("ba", "bab")
line("bb", "bba")
line("bb", "bbb")
// spell:on
}),
)
// spell:off
line("r", "a")
line("r", "b")
line("b", "ba")
line("b", "bb")
line("ba", "baa")
line("ba", "bab")
line("bb", "bba")
line("bb", "bbb")
// spell:on
}))