Added short warning to typst lib
This commit is contained in:
parent
563dd990a5
commit
b5ccf95a8b
@ -29,6 +29,26 @@
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
#let short_solution_warning() = {
|
||||
set text(ored)
|
||||
align(
|
||||
center,
|
||||
block(
|
||||
width: 60%,
|
||||
height: auto,
|
||||
breakable: false,
|
||||
fill: rgb(255, 255, 255),
|
||||
stroke: ored + 2pt,
|
||||
inset: 3mm,
|
||||
(
|
||||
align(center, text(weight: "bold", size: 12pt, [Instructor's Handout]))
|
||||
+ parbreak()
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
#let make_header(
|
||||
title,
|
||||
subtitle: none,
|
||||
|
@ -32,6 +32,7 @@
|
||||
title: none,
|
||||
by: none,
|
||||
subtitle: none,
|
||||
short_warning: false,
|
||||
) = {
|
||||
set page(
|
||||
margin: 20mm,
|
||||
@ -101,7 +102,7 @@
|
||||
|
||||
// Make handout title
|
||||
{
|
||||
import "header.typ": make_header, solution_warning
|
||||
import "header.typ": make_header, solution_warning, short_solution_warning
|
||||
import "solution.typ": solutions_state, reset_solutions
|
||||
|
||||
reset_solutions()
|
||||
@ -121,7 +122,11 @@
|
||||
|
||||
context {
|
||||
if solutions_state.get() {
|
||||
solution_warning()
|
||||
if short_warning {
|
||||
short_solution_warning()
|
||||
} else {
|
||||
solution_warning()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user