-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.typ
140 lines (106 loc) · 2.38 KB
/
main.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#import "template.typ": *
#import "chap01.typ": *
#import "chap02.typ": *
#import "chap03.typ": *
#import "chap04.typ": *
#import "chap05.typ": *
#import "chap06.typ": *
// Take a look at the file `template.typ` in the file panel
// to customize this template and discover how it works.
#show: project.with(
title: "Troika!",
authors: (
"Melsonian Ars Council",
),
date: "November 15, 2023",
logo: "fortle.svg",
cover: "troika_cover.png"
)
#show heading.where(
level: 1
): it => block(width: 100%)[
#set align(center)
#set par(justify: false)
#set text(size:40pt, hyphenate: false, weight: 700 , font: "Bokor")
#it.body
]
#show heading.where(
level: 2
): it => block(width: 100%)[
#set align(left)
#set par(justify: false)
#set text(size:1.4em,hyphenate: false, weight: 700, font: "Bokor")
#it.body
#v(6pt)
]
#show heading.where(
level: 3
): it => block(width: 100%)[
#set align(left)
#set par(justify: false)
#set text(size:1.2em,hyphenate: false, weight: 700, font: "Bokor")
#it.body
]
#show heading.where(
level: 4
): it => block(width: 100%)[
#set align(left)
#set par(justify: false)
#set text(size:1.1em,hyphenate: false, weight: 400, style: "italic", font: "Averia Serif Libre")
#it.body
]
#set page(header: locate(loc => {
let elems = query(
selector(heading).after(loc),
loc,
)
let academy = smallcaps[
Troika!
]
if elems == () {
align(right, academy)
} else {
let body = elems.first().body
academy + h(1fr) + emph(body)
}
}))
#show outline.entry.where(
level: 1
): it => {
v(10pt, weak: true)
strong(it)
}
#show outline.entry.where(
level: 1
): it => {
v(6pt, weak: true)
text(size: 1.1em, weight:700,it)
}
#set page(
background: locate(loc => if calc.even(loc.page()) {
if loc.page() > 6 {
image(
"troika-left-border.png",
)
}
} else {
if loc.page() > 6 {
image(
"troika-right-border.png",
)
}// odd page
}))
#pagebreak()
#chapterLayout(chap01_title, 1, chap01)
#pagebreak()
#chapterLayout([ = Contents], 3, outline( indent: 3mm, depth: 3, title: none))
#pagebreak()
#chapterLayout(chap02_title, 2, chap02)
// #pagebreak()
#chapterLayout(chap03_title, 2, chap03)
#pagebreak()
#chapterLayout(chap04_title, 2, chap04)
// #pagebreak()
#chapterLayout(chap05_title, 2, chap05)
#pagebreak()
#chapterLayout(chap06_title, 1, chap06)