Files
typst_nure_template/src/layouts/pz-lb/complex.typ
T
2026-01-17 17:54:11 +02:00

82 lines
2.4 KiB
Typst
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Title page layouts for pz-lb {{{1
// This module provides different title page layouts for practice/lab work templates
#import "/src/helpers.typ": gender-form, gender-get, pz-lb-title, uline
/// Default DSTU title page layout (ministry + university header, 2-column author/mentor info)
/// Returns: content for the title page
/// Simple title page layout (university header only, single column layout)
/// Returns: content for the title page
#let complex(
uni,
edu_program,
subject,
type,
number,
title,
authors,
mentors,
) = {
align(center)[
Міністерство освіти і науки України\
#uni.name
\
#set par(first-line-indent: 0pt)
#align(left)[
#let edu = uni.edu_programs.at(edu_program)
Кафедра #underline(edu.department_gen)\
Спеціальність #underline([#edu.code #edu.description])\
Освітня програма #underline(edu.name_long)
]
\ \
#pz-lb-title(type, number: number)
з навчальної дисципліни "#uni.subjects.at(subject, default: subject)"
#if title != none [\ з теми "#eval(title, mode: "markup")"]
#if authors.first().variant != none [\ Варіант #authors.first().variant]
\ \ \
#align(right)[
#if authors.len() == 1 {
let a = authors.first()
[#gender-form("author", gender: gender-get(a)):\ ]
[студент групи #a.edu_program\-#a.group\ #a.name\ ]
text(size: 10pt, [(прізвище та ініціали)\ ])
} else if authors.len() > 1 [
#gender-form("author"):\
#for a in authors [студент групи #a.edu_program\-#a.group\ #a.name\ ]
#text(size: 10pt, [(прізвище та ініціали)\ ])
]
\
#if mentors.len() == 1 {
let m = mentors.first()
[#gender-form("mentor", gender: gender-get(m)):\ ]
if "degree" in m.keys() and m.degree != none [#m.degree\ ]
[#m.name\ ]
text(size: 10pt, [(прізвище та ініціали)\ ])
} else if mentors.len() > 1 [
#gender-form("mentor"):\
#for m in mentors {
if "degree" in m.keys() and m.degree != none [#m.degree\ ]
[#m.name\ ]
}
]
]
#v(1fr)
Харків\
#datetime.today().display("[year]")
]
}
// vim:sts=2:sw=2:fdm=marker:cms=/*%s*/