forked from pencelheimer/typst_nure_template
move to dictionary.at(layout)
This commit is contained in:
@@ -11,8 +11,9 @@
|
|||||||
mentors,
|
mentors,
|
||||||
) = {
|
) = {
|
||||||
align(center)[
|
align(center)[
|
||||||
МІНІСТЕРСТВО ОСВІТИ І НАУКИ УКРАЇНИ \
|
#upper([
|
||||||
#upper(uni.name)
|
Міністерство освіти і науки України \
|
||||||
|
#uni.name])
|
||||||
|
|
||||||
\ \
|
\ \
|
||||||
Кафедра #uni.edu_programs.at(edu-program).department_gen
|
Кафедра #uni.edu_programs.at(edu-program).department_gen
|
||||||
|
|||||||
+7
-11
@@ -338,8 +338,6 @@
|
|||||||
style.appendices(appendices)
|
style.appendices(appendices)
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include "src/layouts.typ"
|
|
||||||
|
|
||||||
// Practice and Laboratory works template {{{1
|
// Practice and Laboratory works template {{{1
|
||||||
|
|
||||||
/// DSTU 3008:2015 Template for NURE
|
/// DSTU 3008:2015 Template for NURE
|
||||||
@@ -355,7 +353,7 @@
|
|||||||
/// - mentors ((name: str, degree: str, gender: ("m" | "f" | "p" | none)),): List of mentors. Optional.
|
/// - mentors ((name: str, degree: str, gender: ("m" | "f" | "p" | none)),): List of mentors. Optional.
|
||||||
#let pz-lb(
|
#let pz-lb(
|
||||||
doc,
|
doc,
|
||||||
layout: "simple",
|
layout: "default",
|
||||||
university: "ХНУРЕ",
|
university: "ХНУРЕ",
|
||||||
edu-program: none,
|
edu-program: none,
|
||||||
subject: none,
|
subject: none,
|
||||||
@@ -370,9 +368,7 @@
|
|||||||
import "layouts/pz-lb/minimal.typ": *
|
import "layouts/pz-lb/minimal.typ": *
|
||||||
import "layouts/pz-lb/complex.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 { authors.first().edu_program }
|
||||||
authors.first().edu_program
|
|
||||||
}
|
|
||||||
let uni = universities.at(university)
|
let uni = universities.at(university)
|
||||||
|
|
||||||
set document(title: title, author: authors.map(c => c.name))
|
set document(title: title, author: authors.map(c => c.name))
|
||||||
@@ -381,11 +377,11 @@
|
|||||||
|
|
||||||
// page 1 {{{2
|
// page 1 {{{2
|
||||||
|
|
||||||
if layout == "complex" {
|
(
|
||||||
complex(uni, edu-program, subject, type, number, title, authors, mentors)
|
"complex": complex(uni, edu-program, subject, type, number, title, authors, mentors),
|
||||||
} else {
|
"minimal": minimal(uni, edu-program, subject, type, number, title, authors, mentors),
|
||||||
minimal(uni, edu-program, subject, type, number, title, authors, mentors)
|
"default": minimal(uni, edu-program, subject, type, number, title, authors, mentors),
|
||||||
}
|
).at(layout)
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -8,12 +8,13 @@
|
|||||||
full_name_gen: "Іванова Івана Івановича",
|
full_name_gen: "Іванова Івана Івановича",
|
||||||
edu_program: "КУІБ",
|
edu_program: "КУІБ",
|
||||||
group: "23-1",
|
group: "23-1",
|
||||||
|
gender: "m",
|
||||||
variant: 5,
|
variant: 5,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
#let mentors = (
|
#let mentors = (
|
||||||
(name: "Петров П.П.", degree: "доцент кафедри ІКІ"),
|
(name: "Петров П.П.", degree: "доцент кафедри ІКІ", gender: "m"),
|
||||||
)
|
)
|
||||||
|
|
||||||
// Тест default лейауту
|
// Тест default лейауту
|
||||||
@@ -32,7 +33,7 @@
|
|||||||
|
|
||||||
// Тест simple лейауту
|
// Тест simple лейауту
|
||||||
#show: pz-lb.with(
|
#show: pz-lb.with(
|
||||||
layout: "simple",
|
layout: "minimal",
|
||||||
subject: "БД",
|
subject: "БД",
|
||||||
type: "ЛБ",
|
type: "ЛБ",
|
||||||
number: 2,
|
number: 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user