remove previous argument signatures
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
#let cont_or_str = variants(cont, nonrec_str);
|
#let cont_or_str = variants(cont, nonrec_str);
|
||||||
#let opt_cont_or_str = variants(cont, nonrec_str);
|
#let opt_cont_or_str = variants(cont, nonrec_str);
|
||||||
|
|
||||||
// "fs", "ft", "fp", "ef", "fua", "fm", "fzs", "cxi"
|
|
||||||
#let arguments_structure = struct(
|
#let arguments_structure = struct(
|
||||||
keyval(literal("document"), struct( // document
|
keyval(literal("document"), struct( // document
|
||||||
doc(
|
doc(
|
||||||
@@ -133,6 +132,24 @@
|
|||||||
"assignment", "Stránka / stránky se zadáním",
|
"assignment", "Stránka / stránky se zadáním",
|
||||||
),
|
),
|
||||||
|
|
||||||
|
doc( // presentation_info
|
||||||
|
keyval(literal("presentation_info"), struct(
|
||||||
|
doc(
|
||||||
|
keyval(literal("append_thanks"), bool), none,
|
||||||
|
"Zda na konec prezentace vložit poděkování za pozornost",
|
||||||
|
),
|
||||||
|
doc(
|
||||||
|
keyval(literal("wide"), bool), none,
|
||||||
|
"Jestli použít široký režim (16:9 - `true`) nebo úzký (4:3 - `false`)",
|
||||||
|
),
|
||||||
|
doc(
|
||||||
|
keyval(literal("first_heading_is_fullpage"), bool), none,
|
||||||
|
("Pokud je nastaveno `true`, pak se nadpisy první úrovně budou vkládat na " +
|
||||||
|
"samostatnou stránku"),
|
||||||
|
),
|
||||||
|
)), none, "Argumenty pro dokument typu `presentation`",
|
||||||
|
),
|
||||||
|
|
||||||
doc( // citations
|
doc( // citations
|
||||||
keyval(literal("citations"), string),
|
keyval(literal("citations"), string),
|
||||||
"citations", "Cesta k souboru s citacemi",
|
"citations", "Cesta k souboru s citacemi",
|
||||||
@@ -143,50 +160,6 @@
|
|||||||
signature_docs(arguments_structure);
|
signature_docs(arguments_structure);
|
||||||
}
|
}
|
||||||
|
|
||||||
#let arguments_structure = (
|
|
||||||
document: (
|
|
||||||
visual_style: "string",
|
|
||||||
faculty: "string",
|
|
||||||
language: "string",
|
|
||||||
type: "string",
|
|
||||||
),
|
|
||||||
title_pages: "string | boolean | none",
|
|
||||||
title: "dictionary[string : string | content] | none",
|
|
||||||
author: (
|
|
||||||
name: "string | content | none",
|
|
||||||
pronouns: "string | none",
|
|
||||||
programme: "dictionary[string : string | content] | none",
|
|
||||||
specialization: "dictionary[string : string | content] | none",
|
|
||||||
year_of_study: "string | content | none",
|
|
||||||
),
|
|
||||||
project: (
|
|
||||||
supervisor: "string | content | dictionary[string : string | content] | none",
|
|
||||||
consultant: "string | content | dictionary[string : string | content] | none",
|
|
||||||
),
|
|
||||||
abstract: (
|
|
||||||
content: "dictionary[string : string | content] | none",
|
|
||||||
keywords: "dictionary[string : string | content | array[string]] | none",
|
|
||||||
),
|
|
||||||
acknowledgement: "dictionary[string : string | content] | none",
|
|
||||||
assignment: "dictionary[string : any] | content | string | none",
|
|
||||||
presentation_info: "dictionary[string: any] | none",
|
|
||||||
citations: "string",
|
|
||||||
);
|
|
||||||
|
|
||||||
#let assignment_structure = (
|
|
||||||
personal_number: "string | content",
|
|
||||||
department: "string | content",
|
|
||||||
academical_year: "string | content",
|
|
||||||
content: "content",
|
|
||||||
);
|
|
||||||
|
|
||||||
#let presentation_structure = (
|
|
||||||
append_thanks: "boolean",
|
|
||||||
wide: "boolean",
|
|
||||||
first_heading_is_fullpage: "boolean",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
#let check_arguments(args, structure: arguments_structure, namespace: none) = {
|
#let check_arguments(args, structure: arguments_structure, namespace: none) = {
|
||||||
let check_arguments_dict(structure, args, argument_path) = {
|
let check_arguments_dict(structure, args, argument_path) = {
|
||||||
for (key, value) in structure.pairs() {
|
for (key, value) in structure.pairs() {
|
||||||
@@ -279,21 +252,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#let assignment_info(assignment) = {
|
|
||||||
if type(assignment) == dictionary {
|
|
||||||
assert_dict_has(assignment_structure.keys(), assignment, "assignment");
|
|
||||||
check_arguments(assignment, structure: assignment_structure, namespace: "assignment");
|
|
||||||
}
|
|
||||||
assignment
|
|
||||||
}
|
|
||||||
|
|
||||||
#let presentation_info(presentation) = {
|
|
||||||
if not is_none(presentation) {
|
|
||||||
check_arguments(presentation, structure: presentation_structure, namespace: "presentation")
|
|
||||||
}
|
|
||||||
presentation
|
|
||||||
}
|
|
||||||
|
|
||||||
#let arguments(
|
#let arguments(
|
||||||
document_info,
|
document_info,
|
||||||
title_pages,
|
title_pages,
|
||||||
@@ -314,8 +272,8 @@
|
|||||||
project: project_info,
|
project: project_info,
|
||||||
abstract: abstract_info,
|
abstract: abstract_info,
|
||||||
acknowledgement: acknowledgement,
|
acknowledgement: acknowledgement,
|
||||||
assignment: assignment_info(assignment),
|
assignment: assignment,
|
||||||
presentation_info: presentation_info(presentation),
|
presentation_info: presentation,
|
||||||
citations: citations,
|
citations: citations,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user