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?],
@ -18,59 +18,56 @@ You may detach the string as you hang the painting, but it must be re-attached o
#v(2mm)
#align(
center,
cetz.canvas({
import cetz.draw: *
let s = 2.5
#align(center, cetz.canvas({
import cetz.draw: *
let s = 2.5
line(
(0 * s, 1 * s),
(2 * s, 1 * s),
(2 * s, 0 * s),
(0 * s, 0 * s),
close: true,
stroke: (thickness: 0.8mm),
)
line(
(0 * s, 1 * s),
(2 * s, 1 * s),
(2 * s, 0 * s),
(0 * s, 0 * s),
close: true,
stroke: (thickness: 0.8mm),
)
line(
(0.1 * s, 1 * s),
(0.5 * s, 1.5 * s),
(1.5 * s, 1.5 * s),
(1.9 * s, 1 * s),
stroke: (thickness: 0.5mm, dash: "dotted"),
)
line(
(0.1 * s, 1 * s),
(0.5 * s, 1.5 * s),
(1.5 * s, 1.5 * s),
(1.9 * s, 1 * s),
stroke: (thickness: 0.5mm, dash: "dotted"),
)
circle((0.5 * s, 1.5 * s), radius: 0.04 * s, fill: black, stroke: none)
circle((1.5 * s, 1.5 * s), radius: 0.04 * s, fill: black, stroke: none)
circle((0.5 * s, 1.5 * s), radius: 0.04 * s, fill: black, stroke: none)
circle((1.5 * s, 1.5 * s), radius: 0.04 * s, fill: black, stroke: none)
line(
(0.66 * s, 0.66 * s),
(0.66 * s, 0.35 * s),
(0.60 * s, 0.1 * s),
)
line(
(0.66 * s, 0.66 * s),
(0.66 * s, 0.35 * s),
(0.60 * s, 0.1 * s),
)
line(
(0.72 * s, 0.1 * s),
(0.66 * s, 0.35 * s),
)
line(
(0.72 * s, 0.1 * s),
(0.66 * s, 0.35 * s),
)
line(
(0.66 * s, 0.575 * s),
(0.6 * s, 0.475 * s),
(0.525 * s, 0.575 * s),
)
line(
(0.66 * s, 0.575 * s),
(0.6 * s, 0.475 * s),
(0.525 * s, 0.575 * s),
)
line(
(0.66 * s, 0.575 * s),
(0.72 * s, 0.475 * s),
(0.795 * s, 0.575 * s),
)
line(
(0.66 * s, 0.575 * s),
(0.72 * s, 0.475 * s),
(0.795 * s, 0.575 * s),
)
circle((0.66 * s, 0.66 * s), radius: 0.07 * s, fill: white)
}),
)
circle((0.66 * s, 0.66 * s), radius: 0.07 * s, fill: white)
}))
#solution([
Say we have a left nail and a right nail. The path of the string is as follows: