technical-writing/paged-out!/nixos-easy-host/template.typ

36 lines
888 B
Typst

#let article(
title: none,
authors: (),
date: datetime.today(),
margin: (x: 1mm, y: 1mm),
fontsize: 12pt,
doc,
) = {
//setup page size. Margin can be small because Paged Out! includes its own margins.
set page(width: 182mm, height: 253mm, margin: margin)
//blue, web-style links.
show link: it => {
set text(blue)
underline(it)
}
//Lets us fit a bit more text on the page without looking too cramped.
set text(size: fontsize)
set par(leading: 4pt, justify: true)
//setup document metadata. (no clue if its useful to the Paged Out! pipeline, but just in case)
set document(
title: title,
author: authors,
date: date,
)
//setup top level headings. We leave styling the subheadings to the user.
show heading.where(level: 1): set text(size: 16pt)
//render a title if one is provided.
if title != none { [= #title] }
doc
}