-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.typ
49 lines (41 loc) · 1.22 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
#let textL = 1.8em
#let textM = 1.6em
#let fontSerif = ("Noto Serif", "Noto Serif CJK JP")
#let fontSan = ("Noto Sans", "Noto Sans CJK JP")
#let project(week: -1, authors: (), date: none, body) = {
let title = "微分方程式 " + str(week) + "レポート"
set document(author: authors.map(a => a.name), title: title)
set page(numbering: "1", number-align: center)
set text(font: fontSerif, lang: "ja")
show heading: set text(font: fontSan, weight: "medium", lang: "ja")
show heading.where(level: 2): it => pad(top: 1em, bottom: 0.4em, it)
show heading.where(level: 3): it => pad(top: 1em, bottom: 0.4em, it)
// Figure
show figure: it => pad(y: 1em, it)
show figure.caption: it => pad(top: 0.6em, it)
show figure.caption: it => text(size: 0.8em, it)
// Title row.
align(center)[
#block(text(textL, weight: 700, title))
#v(1em, weak: true)
#date
]
// 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)[
*#author.name* \
#author.email \
#author.affiliation
]),
),
)
// Main body.
set par(justify: true)
body
}