feat: add template typst report

This commit is contained in:
Yadunand Prem 2024-03-19 21:11:22 +08:00
parent e68f5066e1
commit 8ca6e104fe
No known key found for this signature in database
2 changed files with 43 additions and 0 deletions

12
templates/report/main.typ Normal file
View File

@ -0,0 +1,12 @@
#import "template.typ": *
// Take a look at the file `template.typ` in the file panel
// to customize this template and discover how it works.
#show: project.with(
title: "INSERT TITLE HERE",
authors: (
"Yadunand Prem, A0253252M",
),
)
= Task 1

View File

@ -0,0 +1,31 @@
// The project function defines how your document looks.
// It takes your content and some metadata and formats it.
// Go ahead and customize it to your liking!
#let project(title: "", authors: (), body) = {
// Set the document's basic properties.
set document(author: authors, title: title)
set page(numbering: "1", number-align: center)
set text(font: "Linux Libertine", lang: "en")
// Title row.
align(center)[
#block(text(weight: 700, 1.75em, title))
]
// Author information.
pad(
top: 0.5em,
bottom: 0.5em,
x: 2em,
grid(
columns: (1fr,) * calc.min(3, authors.len()),
gutter: 1em,
..authors.map(author => align(center, strong(author))),
),
)
// Main body.
set par(justify: true)
body
}