Lib tweaks
Some checks failed
CI / Typos (pull_request) Successful in 11s
CI / Typst formatting (pull_request) Failing after 5s
CI / Build (pull_request) Has been skipped

This commit is contained in:
2025-09-23 23:29:20 -07:00
parent e5b0053465
commit 81d6518553
3 changed files with 72 additions and 72 deletions

View File

@ -1,4 +1,4 @@
#import "misc.typ": ored, oblue
#import "misc.typ": oblue, ored
/// If false, hide instructor info.
@ -61,57 +61,71 @@
}
#let solution(content) = {
if_solutions(
align(
center,
stack(
block(
width: 100%,
breakable: false,
fill: ored,
stroke: ored + 2pt,
inset: 1.5mm,
align(left, text(fill: white, weight: "bold", [Solution:])),
),
block(
width: 100%,
height: auto,
breakable: false,
fill: ored.lighten(80%).desaturate(10%),
stroke: ored + 2pt,
inset: 3mm,
align(left, content),
),
),
if_solutions(align(center, stack(
block(
width: 100%,
breakable: false,
fill: ored,
stroke: ored + 2pt,
inset: 1.5mm,
align(left, text(fill: white, weight: "bold", [Solution:])),
),
)
block(
width: 100%,
height: auto,
breakable: false,
fill: ored.lighten(80%).desaturate(10%),
stroke: ored + 2pt,
inset: 3mm,
align(left, content),
),
)))
}
#let sample_solution(content) = {
align(center, stack(
block(
width: 100%,
breakable: false,
fill: oblue,
stroke: oblue + 2pt,
inset: 1.5mm,
align(left, text(fill: white, weight: "bold", [Sample Solution:])),
),
block(
width: 100%,
height: auto,
breakable: false,
fill: oblue.lighten(80%).desaturate(10%),
stroke: oblue + 2pt,
inset: 3mm,
align(left, content),
),
))
}
#let instructornote(content) = {
if_solutions(
align(
center,
stack(
block(
width: 100%,
breakable: false,
fill: oblue,
stroke: oblue + 2pt,
inset: 1.5mm,
align(left, text(fill: white, weight: "bold", [Instructor note:])),
),
block(
width: 100%,
height: auto,
breakable: false,
fill: oblue.lighten(80%).desaturate(10%),
stroke: oblue + 2pt,
inset: 3mm,
align(left, content),
),
),
if_solutions(align(center, stack(
block(
width: 100%,
breakable: false,
fill: oblue,
stroke: oblue + 2pt,
inset: 1.5mm,
align(left, text(fill: white, weight: "bold", [Instructor note:])),
),
)
block(
width: 100%,
height: auto,
breakable: false,
fill: oblue.lighten(80%).desaturate(10%),
stroke: oblue + 2pt,
inset: 3mm,
align(left, content),
),
)))
}