Add optional consultant parameter

This commit is contained in:
Matej-Zucha-TUL
2025-10-03 09:25:37 +02:00
parent 2e300ded3c
commit 1a7418d2cd
6 changed files with 17 additions and 12 deletions

View File

@@ -18,7 +18,7 @@
faculty_id, faculty_color, language, assignment_document, citation_file,
// document info
title, author, author_gender, supervisor, study_programme, study_branch, abstract_content,
title, author, author_gender, supervisor, consultant, study_programme, study_branch, abstract_content,
keywords,
content
@@ -41,7 +41,7 @@
assert_not_none(author_gender, "author gender");
}
mainpage(faculty_id, language, "bp", title, author, supervisor, study_programme, study_branch);
mainpage(faculty_id, language, "bp", title, author, supervisor, consultant, study_programme, study_branch);
assignment(language, assignment_document);
default_styling(false, faculty_color, {
disclaimer(language, faculty_id, "bp", author, author_gender);

View File

@@ -12,7 +12,7 @@
language, faculty_id, document_type, citation_file, assignment_document,
// document info
title, author, author_gender, supervisor, study_programme, study_branch, abstract, keywords,
title, author, author_gender, supervisor, consultant, study_programme, study_branch, abstract, keywords,
// content
content,
@@ -38,6 +38,7 @@
author,
author_gender,
supervisor,
consultant,
study_programme,
study_branch,
abstract,

View File

@@ -96,7 +96,7 @@
faculty_id,
language,
document_type,
title, author, supervisor, study_programme, study_branch,
title, author, supervisor, consultant, study_programme, study_branch,
) = {
let info_name_value_padding = 5em;
let info_name_min_width = 10em;
@@ -121,6 +121,7 @@
("study_branch", study_branch, false),
("author", author, true),
("supervisor", supervisor, false),
("consultant", consultant, false),
)
context {
let max_field_name_width = calc.max(..info_fields.map((v) => {
@@ -155,13 +156,13 @@
faculty_id,
language,
document_type,
title, author, supervisor, study_programme, study_branch
title, author, supervisor, consultant, study_programme, study_branch
) = {
import "../utils.typ": has_all_none, map_none
let nonetype = type(none);
page({
if has_all_none((
document_type, title, author, supervisor, study_programme,
document_type, title, author, supervisor, consultant, study_programme,
)) {
place(center + horizon, align(left, faculty_logotype(faculty_id, language)));
} else {
@@ -169,7 +170,7 @@
align({
info(
faculty_id, language, document_type, map_none(title, (v) => v.at(language)),
author, supervisor, map_none(study_programme, (v) => v.at(language)),
author, supervisor, consultant, map_none(study_programme, (v) => v.at(language)),
map_none(study_branch, (v) => v.at(language)),
);
v(5em);

View File

@@ -17,14 +17,14 @@
faculty_id, faculty_color, language, assignment_document, citation_file,
// document info
title, author, _, supervisor, study_programme, study_branch, abstract_content, keywords,
title, author, _, supervisor, consultant, study_programme, study_branch, abstract_content, keywords,
content
) = {
assert_not_none(title, "title");
assert_dict_has((language,), title, "title");
mainpage(faculty_id, language, none, title, author, supervisor, study_programme, study_branch);
mainpage(faculty_id, language, none, title, author, supervisor, consultant, study_programme, study_branch);
default_styling(true, faculty_color, {
toc(language);
abbrlist(language);