forked from pencelheimer/typst_nure_template
add complex page
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
name_long: Управління інформаційною безпекою
|
name_long: Управління інформаційною безпекою
|
||||||
department_gen: Інфокомунікаційної інженерії ім. В. В. Поповського
|
department_gen: Інфокомунікаційної інженерії ім. В. В. Поповського
|
||||||
code: 125 # TODO: change to F5?
|
code: 125 # TODO: change to F5?
|
||||||
|
description: Кібербезпека та захист інформації
|
||||||
КНТ:
|
КНТ:
|
||||||
name_en: CST # computer sciences and technologies
|
name_en: CST # computer sciences and technologies
|
||||||
name_long: Комп'ютерні науки та технології
|
name_long: Комп'ютерні науки та технології
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
// 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*/
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#let minimal(
|
#let minimal(
|
||||||
uni,
|
uni,
|
||||||
edu_program,
|
edu-program,
|
||||||
subject,
|
subject,
|
||||||
type,
|
type,
|
||||||
number,
|
number,
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
#upper(uni.name)
|
#upper(uni.name)
|
||||||
|
|
||||||
\ \
|
\ \
|
||||||
Кафедра #uni.edu_programs.at(edu_program).department_gen
|
Кафедра #uni.edu_programs.at(edu-program).department_gen
|
||||||
|
|
||||||
\ \ \
|
\ \ \
|
||||||
#pz-lb-title(type, number: number)
|
#pz-lb-title(type, number: number)
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
// 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
|
|
||||||
|
|
||||||
/// 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 simple(
|
|
||||||
uni,
|
|
||||||
edu_program,
|
|
||||||
subject,
|
|
||||||
type,
|
|
||||||
number,
|
|
||||||
title,
|
|
||||||
authors,
|
|
||||||
mentors,
|
|
||||||
) = {
|
|
||||||
align(center)[
|
|
||||||
#upper(uni.name)
|
|
||||||
Кафедра #uni.edu_programs.at(edu_program).department_gen
|
|
||||||
|
|
||||||
\ \ \
|
|
||||||
|
|
||||||
#pz-lb-title(type, number: number)
|
|
||||||
|
|
||||||
з дисципліни: "#uni.subjects.at(subject, default: subject)"
|
|
||||||
#if title != none [\ з теми: "#eval(title, mode: "markup")"]
|
|
||||||
|
|
||||||
\ \ \
|
|
||||||
|
|
||||||
#if authors.len() == 1 {
|
|
||||||
let a = authors.first()
|
|
||||||
[#gender-form("author", gender: gender-get(a)):\ #a.name]
|
|
||||||
[ст. гр. #a.edu_program\-#a.group]
|
|
||||||
if a.variant != none [Варіант: №#a.variant]
|
|
||||||
} else if authors.len() > 1 [
|
|
||||||
#gender-form("author"):\
|
|
||||||
#for a in authors [#a.name (ст. гр. #a.edu_program\-#a.group)\ ]
|
|
||||||
]
|
|
||||||
|
|
||||||
\
|
|
||||||
|
|
||||||
#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]
|
|
||||||
} 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*/
|
|
||||||
+4
-4
@@ -368,10 +368,10 @@
|
|||||||
// TODO: add actually relevant asserts
|
// TODO: add actually relevant asserts
|
||||||
|
|
||||||
import "layouts/pz-lb/minimal.typ": *
|
import "layouts/pz-lb/minimal.typ": *
|
||||||
import "layouts/pz-lb/simple.typ": *
|
import "layouts/pz-lb/complex.typ": *
|
||||||
|
|
||||||
let edu-program = if edu-program != none { edu-program } else if true {
|
let edu-program = if edu-program != none { edu-program } else if true {
|
||||||
authors.first().edu-program
|
authors.first().edu_program
|
||||||
}
|
}
|
||||||
let uni = universities.at(university)
|
let uni = universities.at(university)
|
||||||
|
|
||||||
@@ -381,8 +381,8 @@
|
|||||||
|
|
||||||
// page 1 {{{2
|
// page 1 {{{2
|
||||||
|
|
||||||
if layout == "simple" {
|
if layout == "complex" {
|
||||||
simple(uni, edu-program, subject, type, number, title, authors, mentors)
|
complex(uni, edu-program, subject, type, number, title, authors, mentors)
|
||||||
} else {
|
} else {
|
||||||
minimal(uni, edu-program, subject, type, number, title, authors, mentors)
|
minimal(uni, edu-program, subject, type, number, title, authors, mentors)
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-7
@@ -1,28 +1,29 @@
|
|||||||
#import "lib.typ": *
|
#import "/src/lib.typ": *
|
||||||
|
|
||||||
#set document(title: "Тест лейаутів", author: "Іванов І.І.")
|
// #set document(title: "Тест лейаутів", author: "Іванов І.І.")
|
||||||
|
|
||||||
#let authors = (
|
#let authors = (
|
||||||
(
|
(
|
||||||
name: "Іванов І.І.",
|
name: "Іванов І.І.",
|
||||||
full_name_gen: "Іванова Івана Івановича",
|
full_name_gen: "Іванова Івана Івановича",
|
||||||
edu_program: "ПЗПІ",
|
edu_program: "КУІБ",
|
||||||
group: "23-1",
|
group: "23-1",
|
||||||
variant: 5,
|
variant: 5,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
#let mentors = (
|
#let mentors = (
|
||||||
(name: "Петров П.П.", degree: "доц."),
|
(name: "Петров П.П.", degree: "доцент кафедри ІКІ"),
|
||||||
)
|
)
|
||||||
|
|
||||||
// Тест default лейауту
|
// Тест default лейауту
|
||||||
#show: pz-lb.with(
|
#show: pz-lb.with(
|
||||||
layout: "default",
|
layout: "complex",
|
||||||
subject: "БД",
|
subject: "БД",
|
||||||
|
edu-program: "КУІБ",
|
||||||
type: "ЛБ",
|
type: "ЛБ",
|
||||||
number: 2,
|
number: 2,
|
||||||
// title: "SQL запити",
|
title: "SQL запити",
|
||||||
authors: authors,
|
authors: authors,
|
||||||
mentors: mentors,
|
mentors: mentors,
|
||||||
)
|
)
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
subject: "БД",
|
subject: "БД",
|
||||||
type: "ЛБ",
|
type: "ЛБ",
|
||||||
number: 2,
|
number: 2,
|
||||||
// title: "SQL запити",
|
title: "SQL запити",
|
||||||
authors: authors,
|
authors: authors,
|
||||||
mentors: mentors,
|
mentors: mentors,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user