add attachments to example.typ

This commit is contained in:
2025-10-03 19:28:00 +02:00
parent f22b16a803
commit 5c35389dca
4 changed files with 38 additions and 4 deletions

View File

@@ -60,7 +60,8 @@
}
}
#let attachments(attachments) = {
#let attachments(..attachments) = {
let attachments = attachments.pos();
assert_type_signature(
attachments, "array[array[string | content]] | array[string | content]", "attachments"
);
@@ -117,6 +118,9 @@
return;
}
let data = eval(data);
if data == false {
return;
}
heading(get_lang_item(language, "attachments"), numbering: none);
// listing

View File

@@ -33,7 +33,7 @@
faculty_id,
faculty_color(faculty_id),
language,
assignment_document,
map_none(assignment_document, (v) => "../../" + v),
map_none(citation_file, (v) => "../../" + v),
title,
author,

View File

@@ -123,6 +123,7 @@
) = {
let info_name_value_padding = 5em;
let info_name_min_width = 10em;
let gutter = .7em;
// document type
if type(document_type) != type(none) {
@@ -156,7 +157,7 @@
}), info_name_min_width.to-absolute());
grid(
columns: 2,
gutter: .7em,
gutter: gutter,
..info_fields.filter((v) => { type(v.at(1)) != type(none) }).map((v) => {
(
align(top, block(
@@ -168,7 +169,7 @@
}).flatten(),
);
v(1em);
h(max_field_name_width + info_name_value_padding);
h(max_field_name_width + info_name_value_padding + gutter);
text(get_lang_item(language, "city") + " " + str(datetime.today().year()), font: base_font);
}
}