From 1a7418d2cd2c92bccf32f6afe34fb236ffd204a5 Mon Sep 17 00:00:00 2001 From: Matej-Zucha-TUL Date: Fri, 3 Oct 2025 09:25:37 +0200 Subject: [PATCH] Add optional consultant parameter --- template/classic/bp.typ | 4 ++-- template/classic/classic.typ | 3 ++- template/classic/common.typ | 9 +++++---- template/classic/other.typ | 4 ++-- template/lang.json | 2 ++ template/template.typ | 7 ++++--- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/template/classic/bp.typ b/template/classic/bp.typ index 8ef86d9..15b0c6e 100644 --- a/template/classic/bp.typ +++ b/template/classic/bp.typ @@ -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); diff --git a/template/classic/classic.typ b/template/classic/classic.typ index dcccaea..e8f12f1 100644 --- a/template/classic/classic.typ +++ b/template/classic/classic.typ @@ -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, diff --git a/template/classic/common.typ b/template/classic/common.typ index d173c63..09c1124 100644 --- a/template/classic/common.typ +++ b/template/classic/common.typ @@ -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); diff --git a/template/classic/other.typ b/template/classic/other.typ index ed79be0..3bd9707 100644 --- a/template/classic/other.typ +++ b/template/classic/other.typ @@ -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); diff --git a/template/lang.json b/template/lang.json index 18ffb12..dc3e69f 100644 --- a/template/lang.json +++ b/template/lang.json @@ -3,6 +3,7 @@ "author": "Autor", "authors": "Autoři", "supervisor": "Vedoucí práce", + "consultant": "Konzultant práce", "study_programme": "Studijní program", "study_branch": "Studijní obor", @@ -47,6 +48,7 @@ "author": "Author", "authors": "Authors", "supervisor": "Supervisor", + "consultant": "Consultant", "study_programme": "Study programme", "study_branch": "Study branch", diff --git a/template/template.typ b/template/template.typ index fe0caaf..53644b2 100644 --- a/template/template.typ +++ b/template/template.typ @@ -41,7 +41,7 @@ // document info title: none, keywords: none, abstract: none, author: none, author_gender: none, - supervisor: none, programme: none, branch: none, + supervisor: none, consultant: none, programme: none, branch: none, // links assignment: none, citations: "citations.bib", @@ -64,6 +64,7 @@ assert_type_signature(author, "string | none", "author argument"); assert_type_signature(author_gender, "string | none", "author gender argument"); assert_type_signature(supervisor, "string | none", "supervisor argument"); + assert_type_signature(consultant, "string | none", "consultant argument"); assert_type_signature( programme, "dictionary[string : string] | none", "study programme argument" ); @@ -86,8 +87,8 @@ // template call templates.at(style)( lang, faculty, document, citations, assignment, - title, author, author_gender, supervisor, programme, branch, abstract, keywords, - content + title, author, author_gender, supervisor, consultant, + programme, branch, abstract, keywords, content ); import "prototyping.typ": assert_release_ready