Update cetz & ci
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#import "@local/handout:0.1.0": *
|
||||
#import "@preview/cetz:0.3.1"
|
||||
#import "@preview/cetz:0.4.2"
|
||||
|
||||
|
||||
// Shorthand, we'll be using these a lot.
|
||||
@ -7,35 +7,31 @@
|
||||
#let tm = sym.times.circle
|
||||
|
||||
#let graphgrid(inner_content) = {
|
||||
align(
|
||||
center,
|
||||
box(
|
||||
inset: 3mm,
|
||||
cetz.canvas({
|
||||
import cetz.draw: *
|
||||
let x = 5.25
|
||||
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
|
||||
)
|
||||
grid(
|
||||
(0, 0),
|
||||
(x, x),
|
||||
step: 0.75,
|
||||
stroke: luma(100) + 0.3mm,
|
||||
)
|
||||
|
||||
if (inner_content != none) {
|
||||
inner_content
|
||||
}
|
||||
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)
|
||||
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,
|
||||
)
|
||||
}),
|
||||
),
|
||||
)
|
||||
line(
|
||||
(0, x + 0.25),
|
||||
(0, 0),
|
||||
(x + 0.25, 0),
|
||||
stroke: 0.75mm + black,
|
||||
)
|
||||
})))
|
||||
}
|
||||
|
||||
/// Adds extra padding to an equation.
|
||||
@ -48,23 +44,16 @@
|
||||
/// Note that there are newlines between the $ and content,
|
||||
/// this gives us display math (which is what we want when using this macro)
|
||||
#let eqnbox(eqn) = {
|
||||
align(
|
||||
center,
|
||||
box(
|
||||
inset: 3mm,
|
||||
eqn,
|
||||
),
|
||||
)
|
||||
align(center, box(
|
||||
inset: 3mm,
|
||||
eqn,
|
||||
))
|
||||
}
|
||||
|
||||
#let dotline(a, b) = {
|
||||
cetz.draw.line(
|
||||
a,
|
||||
b,
|
||||
stroke: (
|
||||
dash: "dashed",
|
||||
thickness: 0.5mm,
|
||||
paint: ored,
|
||||
),
|
||||
)
|
||||
cetz.draw.line(a, b, stroke: (
|
||||
dash: "dashed",
|
||||
thickness: 0.5mm,
|
||||
paint: ored,
|
||||
))
|
||||
}
|
||||
|
Reference in New Issue
Block a user