2025-01-20 19:17:59 -08:00

38 lines
750 B
Typst

#import "@preview/cetz:0.3.1"
// Shorthand, we'll be using these a lot.
#let tp = sym.plus.circle
#let tm = sym.times.circle
#let graphgrid(inner_content) = {
align(
center,
box(
inset: 3mm,
cetz.canvas({
import cetz.draw: *
let x = 5.25
grid(
(0, 0), (x, x), step: 0.75,
stroke: luma(100) + 0.3mm
)
if (inner_content != none) {
inner_content
}
mark((0, x + 0.5), (0, x + 1), symbol: ">", fill: black, scale: 1)
mark((x + 0.5, 0), (x + 1, 0), symbol: ">", fill: black, scale: 1)
line(
(0, x + 0.25),
(0, 0),
(x + 0.25, 0),
stroke: 0.75mm + black,
)
}),
),
)
}