2 Commits

Author SHA1 Message Date
26d861b72a improve bibliography a bit 2025-10-01 22:34:31 +02:00
6bebe41d6e add citation tests 2025-10-01 22:25:35 +02:00
6 changed files with 76 additions and 6 deletions

View File

@@ -1,5 +1,14 @@
#import "../lang.typ": get_lang_item #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 #import "../utils.typ": is_none, assert_dict_has, assert_not_none
#let bp( #let bp(
@@ -31,6 +40,6 @@
toc(language); toc(language);
abbrlist(language); abbrlist(language);
content content
bibliography(citation_file, style: "../tul_citace.csl"); bibliogr(citation_file);
}); });
} }

View File

@@ -249,3 +249,15 @@
}; };
outline(title: get_lang_item(language, "toc")); 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 + "'");
}
}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="en-US"> <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="en-US">
<info> <info>
<title>ISO-690 (numeric, Czech)</title> <title>TUL ISO-690</title>
<id>-----</id> <id>-----</id>
<link href="" rel="self"/> <link href="" rel="self"/>
<link href="" rel="documentation"/> <link href="" rel="documentation"/>
@@ -264,7 +264,7 @@
<group> <group>
<text term="retrieved" suffix=" " text-case="capitalize-first"/> <text term="retrieved" suffix=" " text-case="capitalize-first"/>
<text term="from" suffix=": "/> <text term="from" suffix=": "/>
<text variable="URL"/> <text variable="URL" suffix=" "/>
</group> </group>
</if> </if>
</choose> </choose>

View File

@@ -0,0 +1,40 @@
@article{Wang2025,
author = {Wang, Erming and Yu, Kaiwen and Cao, Jiqing and Wang, Minghui and Katsel, Pavel and Song, Won-min and Wang, Zhen and Li, Yuxin and Wang, Xusheng and Wang, Qian and Xu, Peng and Yu, Gefei and Zhu, Li and Geng, Jia and Habibi, Parnian and Qian, Lu and Tuck, Tony and Li, Aiqun and TCW, Julia and Roussos, Panos and Brennand, Kristen J. and Haroutunian, Vahram and Johnson, Erik C.B. and Seyfried, Nicholas T. and Levey, Allan I. and Bennett, David A. and Peng, Junmin and Cai, Dongming and Zhang, Bin},
title = {Multiscale proteomic modeling reveals protein networks driving Alzheimers disease pathogenesis},
journal = {Cell},
year = {2025},
volume = {},
number = {},
pages = {},
publisher = {Elsevier},
doi = {10.1016/j.cell.2025.08.038},
url = {https://doi.org/10.1016/j.cell.2025.08.038},
issn = {0092-8674}
}
@misc{csl,
title = {Citation Style Language},
year = {2025},
medium = {online},
accessed = {2025-06-10},
URL = {https://citationstyles.org/},
}
@misc{linux,
journal = {Blog | Linux Foundation},
title = {Classic SysAdmin: Vim 101: A Beginners Guide to Vim},
year = {2025},
medium = {online},
accessed = {2025-06-10},
URL = {https://www.linuxfoundation.org/blog/blog/classic-sysadmin-vim-101-a-beginners-guide-to-vim},
}
@book{Satrapa2011,
author = {Pavel Satrapa},
title = {IPv6},
publisher = {Edice CZ.NIC},
year = {2011},
edition = {3. vydání},
ISBN = {978-80-904248-4-9},
URL = {https://www.bookport.cz/kniha/ipv6-treti-vydani-5999/},
}

View File

@@ -1,4 +1,7 @@
// todo: add citations @Wang2025
@csl
@linux
@Satrapa2011
#pagebreak(weak: true) #set text(lang: "cs")
#bibliography("citations.bib", title: "Bibliography - CZ", style: "../template/tul_citace.csl") #bibliography("citations.bib", title: "Bibliography - CZ", style: "../template/tul_citace.csl")

6
tests/citations_en.typ Normal file
View File

@@ -0,0 +1,6 @@
@Wang2025
@csl
@linux
@Satrapa2011
#bibliography("citations.bib", title: "Bibliography - EN", style: "iso-690-author-date")