From bc97b8bb81723287a011dec62bd4dd71d1e1799c Mon Sep 17 00:00:00 2001 From: Yi-Ting Shih Date: Sun, 13 Apr 2025 06:29:00 +0800 Subject: [PATCH] Feat: add authors --- styles.typ | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/styles.typ b/styles.typ index 2a5a801..f8cc5b8 100644 --- a/styles.typ +++ b/styles.typ @@ -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 }