typst-templates/problems.typ
dogeystamp 99fd8e3788
overhaul a lot of stuff
- added lref feature which links to files in the knowledge base without
  having to add ten million "../../../"
- instructions changed so that now you can link to
  "/templates/template.typ" without having to add ten million
  "../../../" to the path
2023-07-10 13:01:07 -04:00

30 lines
641 B
Plaintext

// templates for compsci problem documents outside of contests
#import "main.typ": gen_title, gen_authors, doc_template, mono_font, lref
#import "compsci.typ": source_code, status
#let template(
title: none,
authors: none,
problem_url: none,
stat: "incomplete",
body
) = {
doc_template({
gen_title(title: title)
if problem_url != none {
v(10pt, weak: true)
align(center, {
text(scale(link(problem_url)), size: 0.9em, font: mono_font)
v(10pt, weak: true)
})
}
v(10pt, weak: true)
status(stat: stat)
v(15pt, weak: true)
gen_authors(authors: authors)
body
})
}