typst-templates/problems.typ

28 lines
537 B
Plaintext
Raw Normal View History

2023-04-18 19:59:45 -04:00
// templates for compsci problem documents outside of contests
2023-08-08 21:23:42 -04:00
#import "main.typ": gen_preamble, doc_template, mono_font, lref
2023-04-18 19:59:45 -04:00
#import "compsci.typ": source_code, status
#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) {
[#linebreak()#link(problem_url)]
2023-08-08 21:23:42 -04:00
}
}
)
2023-04-18 19:59:45 -04:00
body
})
}