mirror of
https://github.com/kristoferssolo/LU-DF-Typst-Template.git
synced 2026-03-21 16:16:27 +00:00
feat(documentary-page): make better documentary page for bachelor thesis
This commit is contained in:
98
src/documentary-page.typ
Normal file
98
src/documentary-page.typ
Normal file
@@ -0,0 +1,98 @@
|
||||
#let signature-line(length: 6em) = box(
|
||||
width: length,
|
||||
stroke: (bottom: 0.5pt),
|
||||
height: 0.65em,
|
||||
)
|
||||
|
||||
#let bachelor-dokumentary(
|
||||
title,
|
||||
authors,
|
||||
advisors,
|
||||
reviewer,
|
||||
date,
|
||||
presentation-date,
|
||||
) = [
|
||||
Bakalaura darbs "*#title*" izstrādāts Latvijas Universitātes Eksakto zinātņu un
|
||||
tehnoloģiju fakultātē.
|
||||
|
||||
Ar savu parakstu apliecinu, ka darbs izstrādāts patstāvīgi, izmantoti tikai
|
||||
tajā norādītie informācijas avoti un iesniegtā darba elektroniskā kopija
|
||||
atbilst izdrukai.
|
||||
#set par(hanging-indent: 1cm)
|
||||
|
||||
#v(0.2fr)
|
||||
|
||||
#if authors.len() > 1 { [Autori:\ ] } else { "Autors: " }
|
||||
#(
|
||||
authors
|
||||
.map(author => [*#author.name, #author.code* ~#signature-line()~ #date])
|
||||
.join(", ")
|
||||
)
|
||||
|
||||
#v(1fr)
|
||||
Rekomendēju/nerekomendēju darbu aizstāvēšanai _(nederīgo svītro vadītājs)_\
|
||||
#if advisors.len() > 0 [
|
||||
#if advisors.len() > 1 { [Vadītāji:\ ] } else { "Vadītājs:" }
|
||||
#(
|
||||
advisors
|
||||
.map(
|
||||
advisor => [*#advisor.title #advisor.name* ~#signature-line()~ #date],
|
||||
)
|
||||
.join("\n")
|
||||
)
|
||||
]
|
||||
|
||||
#v(1fr)
|
||||
|
||||
#if reviewer != none {
|
||||
[Recenzents: *#reviewer.title #reviewer.name*]
|
||||
v(1fr)
|
||||
}
|
||||
|
||||
|
||||
Darbs iesniegts Datorikas nodaļā #date \
|
||||
Pilnvarotā persona: vecākā metodiķe: Ārija Sproģe ~#signature-line()
|
||||
|
||||
#v(1fr)
|
||||
|
||||
Darbs aizstāvēts bakalaura gala pārbaudījuma komisijas sēdē ~#signature-line() \
|
||||
#presentation-date prot. Nr. #signature-line(length: 4em) \
|
||||
Komisijas sekretārs(-e): #signature-line(length: 15em)
|
||||
|
||||
#v(1fr)
|
||||
]
|
||||
|
||||
#let fmt-date(date) = {
|
||||
strong(date.display("[day].[month].[year]."))
|
||||
}
|
||||
|
||||
#let course-work-dokumentary = []
|
||||
|
||||
#let qualification-work-dokumentary = []
|
||||
|
||||
#let make-documentary-page(
|
||||
title,
|
||||
authors,
|
||||
advisors,
|
||||
reviewer,
|
||||
thesis-type,
|
||||
date,
|
||||
presentation-date,
|
||||
) = {
|
||||
set page(numbering: none)
|
||||
heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
|
||||
set par(spacing: 2em)
|
||||
let formatted-date = fmt-date(date)
|
||||
let formatted-presentation-date = fmt-date(presentation-date)
|
||||
|
||||
if thesis-type == "bachelor" {
|
||||
bachelor-dokumentary(
|
||||
title,
|
||||
authors,
|
||||
advisors,
|
||||
reviewer,
|
||||
formatted-date,
|
||||
formatted-presentation-date,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -40,8 +40,9 @@
|
||||
bibliography: none,
|
||||
university: "Latvijas Universitāte",
|
||||
faculty: [Eksakto zinātņu un tehnoloģiju fakultāte\ Datorikas nodaļa],
|
||||
thesis-type: "Bakalaura darbs",
|
||||
thesis-type: "bachelor",
|
||||
date: datetime.today(),
|
||||
presentation-date: datetime.today(),
|
||||
place: none,
|
||||
logo: none,
|
||||
outline-title: "Saturs",
|
||||
@@ -309,6 +310,7 @@
|
||||
reviewer,
|
||||
thesis-type,
|
||||
date,
|
||||
presentation-date,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
#import "documentary-page.typ": make-documentary-page
|
||||
|
||||
#let get-thesis-type-name(thesis-type) = {
|
||||
let thesis-types = (
|
||||
qualification: "Kvalifikācijas darbs",
|
||||
course: "Kursa darbs",
|
||||
bachelor: "Bakalaura darbs",
|
||||
)
|
||||
thesis-types.at(thesis-type, default: str(thesis-type))
|
||||
}
|
||||
|
||||
#let merge(a, b) = {
|
||||
let result = a
|
||||
for (k, v) in b { result.at(k) = v }
|
||||
@@ -88,7 +99,7 @@
|
||||
|
||||
v(0.2fr)
|
||||
|
||||
align(center, upper(text(size: 14pt, thesis-type)))
|
||||
align(center, upper(text(size: 14pt, get-thesis-type-name(thesis-type))))
|
||||
|
||||
v(1fr)
|
||||
|
||||
@@ -112,63 +123,6 @@
|
||||
align(center, upper([#place #date.year()]))
|
||||
}
|
||||
|
||||
#let make-documentary-page(
|
||||
title,
|
||||
authors,
|
||||
advisors,
|
||||
reviewer,
|
||||
thesis-type,
|
||||
date,
|
||||
) = [
|
||||
#set page(numbering: none)
|
||||
#let formatted-date = strong(date.display("[day].[month].[year]."))
|
||||
|
||||
#heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
|
||||
|
||||
#set par(spacing: 2em)
|
||||
|
||||
#thesis-type "*#title*" izstrādāts Latvijas Universitātes Eksakto zinātņu un
|
||||
tehnoloģiju fakultātē.
|
||||
|
||||
Ar savu parakstu apliecinu, ka darbs izstrādāts patstāvīgi, izmantoti tikai
|
||||
tajā norādītie informācijas avoti un iesniegtā darba elektroniskā kopija
|
||||
atbilst izdrukai.
|
||||
#set par(hanging-indent: 1cm)
|
||||
|
||||
#v(0.2fr)
|
||||
|
||||
#if authors.len() > 1 { "Autori: " } else { "Autors: " }
|
||||
#(
|
||||
authors.map(author => [*#author.name, #author.code*]).join(", ")
|
||||
) ~ #formatted-date
|
||||
|
||||
#v(1fr)
|
||||
Rekomendēju darbu aizstāvēšanai\
|
||||
#if advisors.len() > 0 [
|
||||
#if advisors.len() > 1 { "Vadītāji:" } else { "Vadītājs:" }
|
||||
#(
|
||||
advisors.map(advisor => [*#advisor.title #advisor.name*]).join("\n")
|
||||
) ~ #formatted-date
|
||||
]
|
||||
|
||||
#v(1fr)
|
||||
|
||||
#if reviewer != none {
|
||||
[Recenzents: *#reviewer.title #reviewer.name*]
|
||||
v(1fr)
|
||||
}
|
||||
|
||||
|
||||
Darbs iesniegts Datorikas nodaļā #formatted-date \
|
||||
Pilnvarotā persona: vecākā metodiķe: Ārija Sproģe #line(length: 10%, stroke: 0.5pt)
|
||||
|
||||
#v(1fr)
|
||||
|
||||
Darbs aizstāvēts bakalaura gala pārbaudījuma komisijas sēdē
|
||||
|
||||
#v(1fr)
|
||||
]
|
||||
|
||||
#let make-attachments(title, attachments) = {
|
||||
if attachments == () {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user