-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path00-university-template.typ
178 lines (176 loc) · 3.79 KB
/
00-university-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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Составляет титульный лист.
#let mk_title_page(
header: "",
department_name: "",
institute_name: "",
work_type: "",
discipline_name: "",
theme: none,
author: (),
adviser: (),
city: "",
year: "",
) = {
// Указываем институт и кафедру.
set align(center)
set text(weight: "bold")
image(header, width: 100%)
linebreak()
upper(institute_name)
linebreak()
linebreak()
upper(department_name)
// По центру указываем тип работы, дисциплину и тему.
set align(center + horizon)
upper(work_type)
linebreak()
[
по дисциплине "#discipline_name"
]
if theme != none {
linebreak()
linebreak()
set text(weight: "regular")
theme
}
set align(bottom)
set align(right)
set text(weight: "bold")
if author.sex == "male" [
Выполнил:
] else [
Выполнила:
]
linebreak()
set text(weight: "regular")
[#author.degree группы #author.group]
linebreak()
author.nwa
linebreak()
linebreak()
set text(weight: "bold")
if adviser.sex == "male" [
Проверил:
] else [
Проверила:
]
linebreak()
set text(weight: "regular")
adviser.degree
linebreak()
adviser.nwa
linebreak()
linebreak()
linebreak()
set align(center)
[#city #year г.]
}
// Составляет содержание работы.
#let mk_table_of_contents() = {
{
set align(center)
set text(16pt, weight: "bold")
[Содержание]
}
set align(left)
outline(
title: [],
indent: auto,
)
}
// Составляет полноценную работу.
#let student_work(
title: "",
header: "",
department_name: "",
institute_name: "",
work_type: "",
discipline_name: "",
theme: "",
author: (),
adviser: (),
city: "",
year: "",
table_of_contents: false,
links: (),
content,
) = {
set document(author: author.name, title: title)
set page(
paper: "a4",
margin: (left: 30mm, right: 15mm, top: 15mm, bottom: 15mm),
)
set text(font: "Times New Roman", size: 14pt, lang: "ru")
mk_title_page(
header: header,
department_name: department_name,
institute_name: institute_name,
work_type: work_type,
discipline_name: discipline_name,
theme: theme,
author: author,
adviser: adviser,
city: city,
year: year,
)
set page(numbering: "1")
if table_of_contents == true {
mk_table_of_contents()
}
// Покажем основное содержимое работы.
{
let indent = 1.25cm
show heading: it => {
pagebreak()
set align(center)
set text(16pt, hyphenate: false)
it
par(text(size: 0.35em, h(0.0em)))
}
set par(justify: true, first-line-indent: indent)
set list(indent: indent)
show list: it => {
it
par(text(size: 0.35em, h(0.0em)))
}
set enum(indent: indent)
show enum: it => {
it
par(text(size: 0.35em, h(0.0em)))
}
content
}
if links.len() != 0 {
pagebreak()
show heading: set align(center)
set heading(numbering: none)
[= Источники]
linebreak()
let src_cntr = counter("source_counter")
src_cntr.step()
for source in links {
src_cntr.display()
[. ]
if source.type == "book" {
[#source.author - ]
}
source.title
[. ]
if source.type == "web" {
[Электронный ресурс. Режим доступа: ]
link(source.link)[#source.link]
[ (дата обращения: ]
source.access_date
[).]
} else if source.type == "book" {
[Издательство "]
source.publisher
[", ]
source.year
[ г.]
}
src_cntr.step()
linebreak()
}
}
}