Feat: add authors
This commit is contained in:
25
styles.typ
25
styles.typ
@@ -1,5 +1,10 @@
|
|||||||
#let document(
|
#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,
|
||||||
) = {
|
) = {
|
||||||
// Content default
|
// Content default
|
||||||
@@ -39,5 +44,23 @@
|
|||||||
)
|
)
|
||||||
pad(y: 10pt, title)
|
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
|
content
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user