-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.typ
96 lines (90 loc) · 2.23 KB
/
template.typ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#import "scipy.typ": *
[-IMPORTS-]
#let tableStyle = (
map-cells: cell => {
if (cell.y == 0) {
return (..cell, content: strong(text(cell.content, 8pt)))
}
(..cell, content: text(cell.content, 8pt))
},
auto-vlines: false,
map-hlines: line => {
if (line.y == 0 or line.y == 1) {
line.stroke = gray + 1pt;
} else {
line.stroke = 0pt;
}
return line
},
)
#show: template.with(
frontmatter: (
title: "[-doc.title-]",
abstract: [
[-parts.abstract-]
],
[# if doc.subtitle #]
subtitle: "[-doc.subtitle-]",
[# endif #]
[# if doc.short_title #]
short-title: "[-doc.short_title-]",
[# endif #]
[# if doc.open_access !== undefined #]
open-access: [-doc.open_access-],
[# endif #]
[# if doc.github !== undefined #]
github: "[-doc.github-]",
[# endif #]
[# if doc.doi #]
doi: "[-doc.doi-]",
[# endif #]
[# if doc.date #]
date: datetime(
year: [-doc.date.year-],
month: [-doc.date.month-],
day: [-doc.date.day-],
),
[# endif #]
[# if doc.keywords #]
keywords: (
[#- for keyword in doc.keywords -#]"[-keyword-]",[#- endfor -#]
),
[# endif #]
authors: (
[# for author in doc.authors #]
(
name: "[-author.name-]",
[# if author.orcid #]
orcid: "[-author.orcid-]",
[# endif #]
[# if author.email #]
email: "[-author.email-]",
[# endif #]
[# if author.affiliations #]
affiliations: ([#- for aff in author.affiliations -#]"[-aff.index-]"[#- if not loop.last -#],[#- endif -#][#- endfor -#]),
[# endif #]
),
[# endfor #]
),
affiliations: (
[# for aff in doc.affiliations #]
(
id: "[-aff.index-]",
name: "[-aff.name-]",
),
[# endfor #]
),
[# if doc.license.content #]
license: (id: "[-doc.license.content.id-]", name: "[-doc.license.content.name-]", url: "[-doc.license.content.url-]"),
[# endif #]
),
[# if doc.first_page #]
page-start: [-doc.first_page-]
[# endif #]
)
// This may be moved below the first paragraph to start columns later
// #set page(columns: 2, margin: (x: 1.5cm, y: 2cm),)
[-CONTENT-]
[# if doc.bibtex #]
#bibliography("[-doc.bibtex-]", title: text(10pt, "References"), style: "ieee")
[# endif #]