Feat: add authors

This commit is contained in:
2025-04-13 06:29:00 +08:00
parent ad4611f3d5
commit bc97b8bb81

View File

@@ -1,5 +1,10 @@
#let document(
title: "This is title",
title: "This is a title",
authors: ((
name: "Yi-Ting Shih",
affiliation: "National Yang Ming Chiao Tung University",
email: "ytshih@it.cs.nycu.edu.tw",
),),
content,
) = {
// Content default
@@ -39,5 +44,23 @@
)
pad(y: 10pt, title)
}
{ // author
set align(center)
set text(
size: 10pt,
)
let count = authors.len()
let ncols = calc.min(count, 3)
grid(
columns: (1fr,) * ncols,
row-gutter: 24pt,
..authors.map(author => [
#author.name \
#author.affiliation \
#link("mailto:" + author.email)
]),
)
}
content
}