Added short warning to typst lib

This commit is contained in:
Mark 2025-02-26 08:05:08 -08:00
parent a4e5a065b0
commit 967d842025
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
2 changed files with 28 additions and 2 deletions

View File

@ -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( #let make_header(
title, title,
subtitle: none, subtitle: none,

View File

@ -32,6 +32,7 @@
title: none, title: none,
by: none, by: none,
subtitle: none, subtitle: none,
short_warning: false,
) = { ) = {
set page( set page(
margin: 20mm, margin: 20mm,
@ -92,7 +93,7 @@
// Make handout title // Make handout title
{ {
import "header.typ": make_header, solution_warning import "header.typ": make_header, solution_warning, short_solution_warning
import "solution.typ": show_solutions import "solution.typ": show_solutions
let url = link( let url = link(
@ -108,8 +109,13 @@
top_right: url, top_right: url,
) )
if show_solutions { if show_solutions {
solution_warning() if short_warning {
short_solution_warning()
} else {
solution_warning()
}
} }
} }