iowo/docs/template.typ
2024-01-18 20:17:57 +01:00

48 lines
864 B
Plaintext

// would also be interesting to try out IBM Plex Mono/Sans sometime
#let atk = "Atkinson Hyperlegible"
#let fonts = (
main: (font: atk, size: 12pt),
title: (font: atk, size: 20pt),
subtitle: (font: atk, size: 10pt),
heading: (font: "Montserrat", weight: "regular"),
)
#let conf(
title: none,
subtitle: none,
doc,
) = {
set page(
numbering: "1 / 1",
header: locate(loc => {
datetime.today().display()
if counter(page).at(loc).first() > 1 {
// on all pages other than the first, the title is useful to have at hand
h(1fr)
title
}
}),
)
set text(..fonts.main)
set heading(numbering: "A.1")
show heading: it => text(..fonts.heading, it)
// document title
if title != none {
align(
right,
text(..fonts.title, title)
+ v(-12pt)
+ text(..fonts.subtitle, subtitle)
)
v(0.25cm)
}
// content itself
doc
}