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"
|
||||
|
||||
|
||||
#show: handout.with(
|
||||
@ -43,61 +43,56 @@ Now, consider the set of six-sided dice below:
|
||||
- Die $E$: $0, 5, 5, 5, 5, 5$
|
||||
On average, which die beats each of the others? Draw a diagram.
|
||||
|
||||
#solution(
|
||||
align(
|
||||
center,
|
||||
cetz.canvas({
|
||||
import cetz.draw: *
|
||||
#solution(align(center, cetz.canvas({
|
||||
import cetz.draw: *
|
||||
|
||||
let s = 0.8 // Scale
|
||||
let t = 13pt * s // text size
|
||||
let radius = 0.3 * s
|
||||
let s = 0.8 // Scale
|
||||
let t = 13pt * s // text size
|
||||
let radius = 0.3 * s
|
||||
|
||||
// Points
|
||||
let a = (-2 * s, 0.2 * s)
|
||||
let b = (0 * s, 2 * s)
|
||||
let c = (2 * s, 0.2 * s)
|
||||
let d = (1.2 * s, -2.1 * s)
|
||||
let e = (-1.2 * s, -2.1 * s)
|
||||
// Points
|
||||
let a = (-2 * s, 0.2 * s)
|
||||
let b = (0 * s, 2 * s)
|
||||
let c = (2 * s, 0.2 * s)
|
||||
let d = (1.2 * s, -2.1 * s)
|
||||
let e = (-1.2 * s, -2.1 * s)
|
||||
|
||||
set-style(
|
||||
stroke: (thickness: 0.6mm * s),
|
||||
mark: (
|
||||
end: (
|
||||
symbol: ">",
|
||||
fill: black,
|
||||
offset: radius + (0.025 * s),
|
||||
width: 1.2mm * s,
|
||||
length: 1.2mm * s,
|
||||
),
|
||||
),
|
||||
)
|
||||
set-style(
|
||||
stroke: (thickness: 0.6mm * s),
|
||||
mark: (
|
||||
end: (
|
||||
symbol: ">",
|
||||
fill: black,
|
||||
offset: radius + (0.025 * s),
|
||||
width: 1.2mm * s,
|
||||
length: 1.2mm * s,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
line(a, b)
|
||||
line(b, c)
|
||||
line(c, d)
|
||||
line(d, e)
|
||||
line(e, a)
|
||||
line(a, c)
|
||||
line(b, d)
|
||||
line(c, e)
|
||||
line(d, a)
|
||||
line(e, b)
|
||||
line(a, b)
|
||||
line(b, c)
|
||||
line(c, d)
|
||||
line(d, e)
|
||||
line(e, a)
|
||||
line(a, c)
|
||||
line(b, d)
|
||||
line(c, e)
|
||||
line(d, a)
|
||||
line(e, b)
|
||||
|
||||
circle(a, radius: radius, fill: oblue, stroke: none)
|
||||
circle(b, radius: radius, fill: oblue, stroke: none)
|
||||
circle(c, radius: radius, fill: oblue, stroke: none)
|
||||
circle(d, radius: radius, fill: oblue, stroke: none)
|
||||
circle(e, radius: radius, fill: oblue, stroke: none)
|
||||
circle(a, radius: radius, fill: oblue, stroke: none)
|
||||
circle(b, radius: radius, fill: oblue, stroke: none)
|
||||
circle(c, radius: radius, fill: oblue, stroke: none)
|
||||
circle(d, radius: radius, fill: oblue, stroke: none)
|
||||
circle(e, radius: radius, fill: oblue, stroke: none)
|
||||
|
||||
content(a, text(fill: white, size: t, [*A*]))
|
||||
content(b, text(fill: white, size: t, [*B*]))
|
||||
content(c, text(fill: white, size: t, [*C*]))
|
||||
content(d, text(fill: white, size: t, [*D*]))
|
||||
content(e, text(fill: white, size: t, [*E*]))
|
||||
}),
|
||||
),
|
||||
)
|
||||
content(a, text(fill: white, size: t, [*A*]))
|
||||
content(b, text(fill: white, size: t, [*B*]))
|
||||
content(c, text(fill: white, size: t, [*C*]))
|
||||
content(d, text(fill: white, size: t, [*D*]))
|
||||
content(e, text(fill: white, size: t, [*E*]))
|
||||
})))
|
||||
|
||||
#v(1fr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user