// The template: everything that is the same in every report. #let report(title: "Report", subtitle: none, body) = { set document(title: title) set text(size: 10pt, lang: "en") set page( paper: "a4", margin: (x: 20mm, top: 30mm, bottom: 22mm), // Page header: repeated at the top of every page header: [ #grid( columns: (1fr, auto), text(weight: "bold")[NoteBox], title, ) #line(length: 100%, stroke: 0.5pt) ], // Page footer: repeated at the bottom of every page footer: context grid( columns: (1fr, auto), [Generated on #datetime.today().display("[day]/[month]/[year]")], counter(page).display("1 / 1", both: true), ), ) // Report header: once, on the first page text(size: 22pt, weight: "bold", title) if subtitle != none { linebreak() text(fill: luma(90), subtitle) } v(6pt) body }