typst-templates/problems.typ

27 lines
503 B
Plaintext
Raw Normal View History

2023-04-18 19:59:45 -04:00
// templates for compsci problem documents outside of contests
2024-03-30 15:51:39 -04:00
#import "main.typ": gen_preamble, doc_template, mono_font, lref, source_code, status
2023-04-18 19:59:45 -04:00
#let template(
title: none,
authors: none,
problem_url: none,
stat: "incomplete",
body
) = {
2023-12-02 20:47:28 -05:00
doc_template(title: title, {
2023-08-08 21:23:42 -04:00
gen_preamble(
title: title,
authors: authors,
prefix: status(stat: stat),
suffix: {
if (problem_url != none) {
2024-03-30 15:51:39 -04:00
[#link(problem_url)]
2023-08-08 21:23:42 -04:00
}
}
)
2023-04-18 19:59:45 -04:00
body
})
}