From 26d861b72a28a4092cbba7bad5854a06fd2c7eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Mekina?= Date: Wed, 1 Oct 2025 22:34:31 +0200 Subject: [PATCH] improve bibliography a bit --- template/classic/bp.typ | 13 +++++++++++-- template/classic/common.typ | 12 ++++++++++++ template/tul_citace.csl | 4 ++-- tests/citations_en.typ | 2 +- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/template/classic/bp.typ b/template/classic/bp.typ index f1eb6ae..cf919ff 100644 --- a/template/classic/bp.typ +++ b/template/classic/bp.typ @@ -1,5 +1,14 @@ #import "../lang.typ": get_lang_item -#import "common.typ": mainpage, default_styling, assignment, disclaimer, abstract, toc, abbrlist +#import "common.typ": ( + mainpage, + default_styling, + assignment, + disclaimer, + abstract, + toc, + abbrlist, + bibliogr +) #import "../utils.typ": is_none, assert_dict_has, assert_not_none #let bp( @@ -31,6 +40,6 @@ toc(language); abbrlist(language); content - bibliography(citation_file, style: "../tul_citace.csl"); + bibliogr(citation_file); }); } diff --git a/template/classic/common.typ b/template/classic/common.typ index 10477aa..285dbd8 100644 --- a/template/classic/common.typ +++ b/template/classic/common.typ @@ -249,3 +249,15 @@ }; outline(title: get_lang_item(language, "toc")); } + +// BIBLIOGRAPHY + +#let bibliogr(language, citations_file) = { + if language == "cs" { + bibliography(citations_file, style: "../tul_citace.csl"); + } else if language == "en" { + bibliography(citations_file, style: "iso-690-numeric"); + } else { + panic("unknown language for bibliography '" + language + "'"); + } +} diff --git a/template/tul_citace.csl b/template/tul_citace.csl index 4435981..2f74f84 100644 --- a/template/tul_citace.csl +++ b/template/tul_citace.csl @@ -1,7 +1,7 @@