Compare commits
27 Commits
5e65284c5d
...
v0.5
Author | SHA1 | Date | |
---|---|---|---|
26d861b72a
|
|||
6bebe41d6e
|
|||
4e634e6ff9
|
|||
b03978a2c0
|
|||
c41ac4bc77
|
|||
1f75a74f61
|
|||
5d17fa8fe3
|
|||
![]() |
9657f4b75b | ||
![]() |
cae85646e6 | ||
a5be430777
|
|||
fd397003ba
|
|||
35cc041d6e
|
|||
4dd974278a
|
|||
8ef9bfb7ef
|
|||
ae84cdaeac
|
|||
5347a16cf1
|
|||
1faa0c6c93
|
|||
438ca6d5c3
|
|||
f956b862c5
|
|||
3d183b8673
|
|||
a446bce8e6
|
|||
86cdf2bbc7
|
|||
5ce21d8a87
|
|||
02dea43d4a
|
|||
![]() |
a32308caae | ||
![]() |
63583d2a35 | ||
![]() |
b3f6dee886 |
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.otf filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
/*.pdf
|
||||
/pack
|
||||
|
19
LICENSE
Normal file
19
LICENSE
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2025 Ondřej Mekina, Matěj Žucha
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
33
Makefile
33
Makefile
@@ -2,10 +2,43 @@
|
||||
view_example: example.pdf
|
||||
xdg-open $<
|
||||
|
||||
.PHONY: watch_example
|
||||
watch_example:
|
||||
typst watch --font-path template/fonts example.typ & xdg-open example.pdf
|
||||
|
||||
.PHONY: example
|
||||
example: example.pdf
|
||||
|
||||
TO_PACK := $(shell find template -type f) template/LICENSE
|
||||
PACK_TARGETS := $(TO_PACK:%=pack/tultemplate2/%) pack/tultemplate2/example.typ
|
||||
|
||||
.PHONY: pack
|
||||
pack: pack/tultemplate2.zip
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf pack
|
||||
rm -f example.pdf
|
||||
|
||||
pack/tultemplate2.zip: $(PACK_TARGETS)
|
||||
@mkdir -p $(@D)
|
||||
rm -f $@
|
||||
cd pack && zip -r tultemplate2.zip tultemplate2
|
||||
|
||||
pack/tultemplate2/example.typ: example.typ
|
||||
ln -f $< $@
|
||||
|
||||
pack/tultemplate2/template/LICENSE: LICENSE
|
||||
@mkdir -p $(@D)
|
||||
ln -f $< $@
|
||||
|
||||
pack/tultemplate2/template/%: template/%
|
||||
@mkdir -p $(@D)
|
||||
ln -f $< $@
|
||||
|
||||
TEMPLATE_SRCS := $(shell find template -type f)
|
||||
|
||||
%.pdf: %.typ $(TEMPLATE_SRCS)
|
||||
typst compile --font-path template/fonts $<
|
||||
|
||||
include tests/make.mk
|
||||
|
22
README.md
Normal file
22
README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# tultemplate2
|
||||
|
||||
Easy Typst template for TUL documents. Begin by compiling `example.typ` and reading it.
|
||||
|
||||
## How to compile
|
||||
|
||||
It is recommended to use either:
|
||||
- The on-line Typst editor (https://typst.app/play/) - use some zip build from releases
|
||||
- The `typst` CLI tool (available in Arch repos and Snap)
|
||||
|
||||
On Linux, with the `typst` command available, you can just run:
|
||||
|
||||
```sh
|
||||
make
|
||||
```
|
||||
|
||||
That will compile the example document and view it.
|
||||
|
||||
## Repo structure note
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This repo uses git lfs to pull fonts. Please set it up (or download a packed build from releases).
|
15
citations.bib
Normal file
15
citations.bib
Normal file
@@ -0,0 +1,15 @@
|
||||
@misc{ typst,
|
||||
author = "Wikidata",
|
||||
title = "Q117858460 --- Wikidata{,} ",
|
||||
year = "2025",
|
||||
url = "https://www.wikidata.org/w/index.php?title=Q117858460&oldid=2404700455",
|
||||
note = "[Online; cit. 24-Zář-2025]"
|
||||
}
|
||||
|
||||
@misc{ bibtex,
|
||||
author = "{Wikipedia contributors}",
|
||||
title = "BibTeX --- {Wikipedia}{,} The Free Encyclopedia",
|
||||
year = "2025",
|
||||
url = "https://en.wikipedia.org/w/index.php?title=BibTeX&oldid=1309039867",
|
||||
note = "[Online; cit 24-Zář-2025]"
|
||||
}
|
214
example.typ
214
example.typ
@@ -1,9 +1,9 @@
|
||||
#import "template/template.typ": *
|
||||
|
||||
#show: tultemplate.with(
|
||||
"classic", "fm", "cs",
|
||||
title: "Návod na použití Typst TUL šablony",
|
||||
author: "Ondřej Mekina",
|
||||
#show: tultemplate2.with(
|
||||
title: (cs: "Návod na použití Typst TUL šablony"),
|
||||
author: "Ondřej Mekina, Matěj Žucha",
|
||||
supervisor: "Ondřej Mekina",
|
||||
)
|
||||
|
||||
= Lehký úvod do Typstu a této šablony
|
||||
@@ -31,7 +31,6 @@ Pokud budete mít dotaz na fungování (vysvětlivky se snažím přidávat do t
|
||||
návrh, nebo budete chtít nahlásit chybu, využijte jeden z následujících komunikačních kanálů:
|
||||
- Můj e-mail: #link("mailto:ondrej@mekina.cz", "ondrej@mekina.cz")
|
||||
- Issues na gitu šablony: https://git.zumepro.cz/tul/tultemplate2
|
||||
- E-maily dalších maintainerů: #todo("přidat e-maily")
|
||||
|
||||
= První krůčky, aneb jak rozchodit šablonu
|
||||
|
||||
@@ -72,7 +71,7 @@ ale i dodatečné funkce pro jednodušší práci se šablonou -- k těm se dost
|
||||
|
||||
Dále je potřeba funkci zavolat jako šablonu, abychom pod ní mohli psát obsah.
|
||||
```typst
|
||||
#show: tultemplate.with(<vzhled_sablony>, <fakulta>, <jazyk>)
|
||||
#show: tultemplate
|
||||
```
|
||||
A to je vše. Absolutní minimum pro rozchození šablony. Nebojte se, pokud neznáte názvy
|
||||
vzhledů šablony, zkratku fakulty, nebo zkratku pro jazyk. Šablona vás navede pomocí chybových
|
||||
@@ -83,7 +82,7 @@ hlášek (nebo se můžete podívat do zdrojového souboru pro toto PDF `example
|
||||
Nyní pojďme přidat nějaký obsah na titulní stránku. Jednoduše do volání šablony přidáme další
|
||||
parametry.
|
||||
```typst
|
||||
#show: tultemplate.with(..., title: "Můj úžasný dokument", author: "Já")
|
||||
#show: tultemplate.with(..., title: (cs: "Můj úžasný dokument"), author: "Já")
|
||||
```
|
||||
Všechny možné parametry by vám měl našeptávat váš editor (nebo LSP) -- poslouchejte takové nápovědy,
|
||||
opravdu hodně vám to usnadní práci.
|
||||
@@ -192,6 +191,26 @@ Tady je praktická ukázka jednoduchého vložení obrázku s popiskem:
|
||||
Logo *TUL*
|
||||
])
|
||||
|
||||
== Citace
|
||||
|
||||
Šablona podporuje správu citací pomocí standardního BibTeX @bibtex souboru, stejně jako
|
||||
například LaTeX. Citace ve vhodném formátu stačí přidat do souboru _citations.bib_, poté je možné se
|
||||
na ně odkazovat pomocí `@jmeno_citace`, nebo `#cite(<jmeno_citace>)`. Můžu se tak třeba odkázat na
|
||||
citaci Typstu #cite(<typst>).
|
||||
|
||||
Formát souboru _citations.bib_ je naprosto stejný jako pro LaTeX. Tyto citace lze přímo vložit
|
||||
třeba z webu https://www.citace.com ve formátu BibTeX -- Typst tento formát také umí přečíst.
|
||||
|
||||
Soubor, ze kterého se načtou citace lze změnit pomocí argumentu šablony:
|
||||
|
||||
```typst
|
||||
#show: tultemplate2.with(
|
||||
...
|
||||
citations: "jinysoubor.bib",
|
||||
...
|
||||
)
|
||||
```
|
||||
|
||||
== Vnitřní odkazy a kotvy
|
||||
|
||||
Trochu navážeme na Odkazy (@links).
|
||||
@@ -217,10 +236,6 @@ Kotvu dáte někam do souboru a můžete na ní odkazovat stejně jako na citace
|
||||
@nazev_kotvy
|
||||
```
|
||||
|
||||
== Citace
|
||||
|
||||
#todo("přidat ukázky citací")
|
||||
|
||||
== Pro pokročilé
|
||||
|
||||
Typst má spoustu dalších způsobů stylování (a i skriptování). Podívejte se třeba na zdrojový kód
|
||||
@@ -229,3 +244,180 @@ pro nadpis @chained_subheading.
|
||||
Tyto pokročilejší funkce v drtivé většině dokumentů vůbec není potřeba použít. Nicméně pro
|
||||
ty, kteří to chtějí vyzkoušet, nebo to opravdu potřebují: podívejte se buď do zdrojového kódu
|
||||
této šablony nebo na dokumentaci Typstu https://typst.app/docs/.
|
||||
|
||||
= Pracujeme se šablonou
|
||||
|
||||
V předchozí kapitole jsme se dozvěděli, jak pracovat s Typstem. Šablona je navržena tak, aby
|
||||
co nejvíce využívala základních funkcí Typstu -- například:
|
||||
- Když uděláte nadpis -- zobrazí se v tabulce obsahu
|
||||
- Když zvýrazníte text pomocí funkce `highlight` -- zvýraznění bude v barvách vaší fakulty
|
||||
- Když přidáte citaci, zobrazí se v bibliografii na konci dokumentu
|
||||
- Nadpis první úrovně bude na nové stránce
|
||||
- ...
|
||||
|
||||
V této kapitole se naučíme vymaxovat využití této šablony za pomocí dalších funkcí a syntaxe.
|
||||
|
||||
#pagebreak(weak: true)
|
||||
== Parametry této šablony
|
||||
|
||||
Šablonu standardně použijete takto:
|
||||
```typst
|
||||
#show: tultemplate2.with(
|
||||
<název_parametru>: <hodnota_parametru>,
|
||||
<nazev_dalšího_parametru>: "<hodnota_dalšího_parametru>",
|
||||
...
|
||||
)
|
||||
```
|
||||
|
||||
Funkce `tultemplate2` přijímá následující parametry.
|
||||
Zvýrazněné hodnoty jsou základní -- pokud vynecháte parametr, pak bude použita tato hodnota.
|
||||
|
||||
#line()
|
||||
- `style` (vizuální styl dokumentu)
|
||||
- *`"classic"`* - Klasický vizuální styl. Tento styl je neblíže klasické formální
|
||||
podobě dokumentů. _(doporučeno pro nováčky této šablony)_
|
||||
#line()
|
||||
- `faculty` (zkratka fakulty)
|
||||
- *`"tul"`* - barvy a logomarky univerzity
|
||||
- `"fs"` - fakulta strojní
|
||||
- `"ft"` - fakulta textilní
|
||||
- `"fp"` - fakulta přírodovědně-humanitní a pedagogická
|
||||
- `"ef"` - ekonomická fakulta
|
||||
- `"fua"` - fakulta umění a architektury
|
||||
- `"fm"` - fakulta mechatroniky, informatiky a mezioborových studií
|
||||
- `"fzs"` - fakulta zdravotnických studií
|
||||
- `"cxi"` - ústav pro nanomateriály, pokročilé technologie a inovace
|
||||
#line()
|
||||
- `lang` (základní jazyk dokumentu)
|
||||
- *`"cs"`* - čeština
|
||||
- `"en"`
|
||||
#line()
|
||||
- `document` (typ dokumentu)
|
||||
- *`"other"`* - nespecifikovaný (neformální) typ dokumentu
|
||||
- `bp` - Bakalářská práce
|
||||
#line()
|
||||
- `title` (nadpis dokumentu)
|
||||
- Ve formátu `(<zkratka_jazyka>: "<nadpis>")`, například `(cs: "Můj nadpis")`
|
||||
#line()
|
||||
- `author` (autor/autoři dokumentu)
|
||||
- Příklad: `"Pavel Novák"` nebo `"Petra Velká, Jindřich Peterka"` (oddělujte jména `", "`)
|
||||
#line()
|
||||
- `author_gender` (rod autora v českém jazyce - není potřeba pro angličtinu)
|
||||
- `"male"` - Mužský rod
|
||||
- `"female"` - Ženský rod
|
||||
#line()
|
||||
- `supervisor` (vedoucí práce)
|
||||
- Příklad: `"prof. Jindřich Jindřich"`
|
||||
#line()
|
||||
- `programme` (studijní program autora)
|
||||
- Příklad: `"4242 - Odborná tvorba a zpracování krásných šablon"`
|
||||
#line()
|
||||
- `abstract` (abstrakt)
|
||||
- Ve formátu `(<zkratka_jazyka>: [<abstrakt>])`, například `(cs: [Můj *krásný* abstrakt.])`
|
||||
#line()
|
||||
- `keywords` (klíčová slova zobrazovaná pod abstraktem)
|
||||
- Ve formátu `("slovo1", "slovo2", ...)`
|
||||
#line()
|
||||
- `assignment` (PDF soubor se zadáním)
|
||||
- Ve formě cesty k souboru, například: `"zadani.pdf"`. Pokud je tento argument vynechán, bude
|
||||
vložena hláška "vložte zadání" na příslušné místo v dokumentu -- tu stranu můžete pak nahradit
|
||||
originálem zadání.
|
||||
#line()
|
||||
- `citations` (BibTex soubor s citacemi)
|
||||
- Ve formě cesty k souboru, například: `"citace.bib"`. Pokud není specifikován, bude použit
|
||||
výchozí (`"citations.bib"`).
|
||||
|
||||
#pagebreak(weak: true)
|
||||
== Zkratky
|
||||
|
||||
LaTeX TUL šablona má k začátku dokumentu seznam zkratek. Proto jsme ho přidali i do této šablony.
|
||||
Seznam zkratek je v této šabloně nastaven tak, aby se zobrazoval pouze pokud je v něm alespoň jedna
|
||||
zkratka (přišlo nám to poměrně logické).
|
||||
|
||||
Zkratku #abbr("ABC", "Abeceda") vytvoříte (definujete) pomocí:
|
||||
|
||||
```typst
|
||||
#abbr("ABC", "Abeceda")
|
||||
```
|
||||
|
||||
Potom zkratku #abbr("ABC") už můžete použít přímo (bez opakované definice):
|
||||
|
||||
```typst
|
||||
#abbr("ABC")
|
||||
```
|
||||
|
||||
Šablona zajistí následující věci:
|
||||
- Zkratka se zobrazí v seznamu zkratek
|
||||
- Při prvním použití zkratky vás šablona donutí zkratku definovat
|
||||
- Definice zkratky bude použita právě jednou (poprvé)
|
||||
|
||||
Při prvním použití zkratky (při definici) bude zkratka v textu vypadat takto:
|
||||
#abbr("ZK", "Zkratka").
|
||||
Při dalších použití bude vypadat takto: #abbr("ZK").
|
||||
|
||||
#highlight[
|
||||
Tedy zkratku _nepřidáváte_ přímo do seznamu zkratek, ale elegantně jí používáte přímo v textu.
|
||||
]
|
||||
|
||||
= Workflow a jak si zjednoduššit práci
|
||||
|
||||
Tyhle věci používat _nemusíte_, aby vám šablona fungovala. Nicméně často jsou poměrně fajn.
|
||||
|
||||
== Protypování
|
||||
|
||||
=== Profily
|
||||
|
||||
Šablona disponuje funkcí `profile`. Funkce na prototypování šablony jsou nastaveny tak, aby
|
||||
při zapnutí profilu pro finální verzi buď vrátily čistou verzi dokumentu, nebo vyhodily error.
|
||||
|
||||
K dispozici jsou profily:
|
||||
- `debug` - Prototypování je povoleno, výstupem bude verze dokumentu s poznámkami
|
||||
- `release` - Výstupem bude čistý výsledný dokument
|
||||
|
||||
Při generování výstupu je doporučeno hned za volání šablony na začátku souboru přidat:
|
||||
|
||||
```typst
|
||||
#profile("release")
|
||||
```
|
||||
|
||||
To vám pojistí, aby ve výstupu nebyly poznámky a todo.
|
||||
|
||||
Pokud funkci `profile` nezavoláte, pak šablone použije profil "debug".
|
||||
|
||||
=== Todo
|
||||
|
||||
Pomocí `todo` svému budoucímu já můžete připomenout, že je něco potřeba dodělat. Funkce todo obsah
|
||||
zvýrazní, a v případě, že je zvolený profil "release", při kompilaci vyhodí error. To vám
|
||||
vlastně zabrání použít funkci todo v profilu "release".
|
||||
|
||||
Zvýraznění také můžete vypnout (ale pak se vám `todo` bude hůř hledat - budete muset hledat v kódu).
|
||||
|
||||
Zde je ukázkové použití:
|
||||
#block([
|
||||
```typst
|
||||
#todo(
|
||||
"koupit vajíčka",
|
||||
accent: false // vypnout zvýraznění (pokud chcete)
|
||||
)
|
||||
```
|
||||
], breakable: false)
|
||||
|
||||
=== Lorem
|
||||
|
||||
Typst má funkci, která vám vygeneruje text Lorem Ipsum -- ten může sloužit na otestování délky
|
||||
paragrafů, počtu písmen, atd...
|
||||
|
||||
```typst
|
||||
#lorem(10)
|
||||
```
|
||||
|
||||
Výše volaná funkce vygeneruje deset slov Lorem Ipsum. Doporučuji `lorem` kombinovat s `todo`.
|
||||
|
||||
```typst
|
||||
#todo(lorem(10), accent: false)
|
||||
```
|
||||
|
||||
Takhle si můžete předpřipravit délku odstavců a vyzkoušet si, jestli se rozsahem práce trefíte
|
||||
do požadavků. Pak můžete postupně přepisovat/vyplňovat.
|
||||
|
||||
Funkce `todo` vám zároveň zabrání v tom, aby se text Lorem Ipsum vyskytl ve výsledném dokumentu.
|
||||
|
45
template/classic/bp.typ
Normal file
45
template/classic/bp.typ
Normal file
@@ -0,0 +1,45 @@
|
||||
#import "../lang.typ": get_lang_item
|
||||
#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(
|
||||
// general settings
|
||||
faculty_id, faculty_color, language, assignment_document, citation_file,
|
||||
|
||||
// document info
|
||||
title, author, author_gender, supervisor, study_programme, abstract_content, keywords,
|
||||
|
||||
content
|
||||
) = {
|
||||
let force_langs = ("cs", "en");
|
||||
assert_dict_has(force_langs, title, "title");
|
||||
assert_not_none(abstract_content, "abstract");
|
||||
assert_dict_has(force_langs, abstract_content, "abstract");
|
||||
if not is_none(keywords) {
|
||||
assert_dict_has(force_langs, keywords, "keywords");
|
||||
}
|
||||
if language == "cs" {
|
||||
assert_not_none(author_gender, "author gender");
|
||||
}
|
||||
|
||||
mainpage(faculty_id, language, none, title, author, supervisor, study_programme);
|
||||
assignment(language, assignment_document);
|
||||
default_styling(false, faculty_color, {
|
||||
disclaimer(language, faculty_id, "bp", author, author_gender);
|
||||
abstract("cs", title, abstract_content, keywords);
|
||||
abstract("en", title, abstract_content, keywords);
|
||||
toc(language);
|
||||
abbrlist(language);
|
||||
content
|
||||
bibliogr(citation_file);
|
||||
});
|
||||
}
|
41
template/classic/classic.typ
Normal file
41
template/classic/classic.typ
Normal file
@@ -0,0 +1,41 @@
|
||||
// tools & utils
|
||||
#import "../theme.typ": faculty_logotype, tul_logomark, faculty_color
|
||||
#import "../lang.typ": lang_id, get_lang_item
|
||||
#import "../utils.typ": assert_in_dict, assert_in_arr, map_none
|
||||
|
||||
// thesis types
|
||||
#import "bp.typ": bp
|
||||
#import "other.typ": other
|
||||
|
||||
#let template_classic(
|
||||
// general settings
|
||||
language, faculty_id, document_type, citation_file, assignment_document,
|
||||
|
||||
// document info
|
||||
title, author, author_gender, supervisor, study_programme, abstract, keywords,
|
||||
|
||||
// content
|
||||
content,
|
||||
) = {
|
||||
let document_types = (
|
||||
"bp": bp,
|
||||
"other": other,
|
||||
)
|
||||
assert_in_dict(document_type, document_types, "document type");
|
||||
|
||||
document_types.at(document_type)(
|
||||
faculty_id,
|
||||
faculty_color(faculty_id),
|
||||
language,
|
||||
assignment_document,
|
||||
map_none(citation_file, (v) => "../../" + v),
|
||||
title,
|
||||
author,
|
||||
author_gender,
|
||||
supervisor,
|
||||
study_programme,
|
||||
abstract,
|
||||
keywords,
|
||||
content,
|
||||
);
|
||||
}
|
263
template/classic/common.typ
Normal file
263
template/classic/common.typ
Normal file
@@ -0,0 +1,263 @@
|
||||
#import "../theme.typ": faculty_logotype, tul_logomark, faculty_color
|
||||
#import "../lang.typ": get_lang_item
|
||||
#import "../utils.typ": is_none
|
||||
|
||||
#let base_font = "Inter";
|
||||
#let mono_font = "Noto Sans Mono";
|
||||
#let serif_font = "Merriweather";
|
||||
#let tul_logomark_size = 6.5em;
|
||||
|
||||
// TYPST ELEMENT STYLING
|
||||
|
||||
#let default_styling(flip_bonding, faculty_color, content) = {
|
||||
// page
|
||||
set page(
|
||||
margin: if flip_bonding {
|
||||
(inside: 4cm, top: 3cm, bottom: 3cm)
|
||||
} else {
|
||||
(left: 4cm, top: 3cm, bottom: 3cm)
|
||||
},
|
||||
numbering: "1", footer: {
|
||||
context {
|
||||
let page = counter(page).get().at(0);
|
||||
if flip_bonding {
|
||||
align(str(page), if calc.rem(page, 2) == 1 { right } else { left });
|
||||
} else {
|
||||
align(str(page), right);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// text
|
||||
set text(font: serif_font);
|
||||
set par(justify: true);
|
||||
|
||||
// heading
|
||||
set heading(numbering: "1.1.1 ");
|
||||
show heading: it => {
|
||||
set par(justify: false);
|
||||
block(
|
||||
above: 2em,
|
||||
below: 2em,
|
||||
text(it, faculty_color, font: "TUL Mono", size: 1.2em)
|
||||
);
|
||||
};
|
||||
show heading.where(level: 1): it => {
|
||||
pagebreak(weak: true);
|
||||
v(2cm);
|
||||
it
|
||||
};
|
||||
|
||||
// other
|
||||
show raw: set text(font: mono_font);
|
||||
show raw.where(block: true): it => {
|
||||
block(it, fill: rgb("#eee"), inset: 1em)
|
||||
};
|
||||
set highlight(fill: faculty_color.lighten(90%));
|
||||
set image(width: 80%);
|
||||
|
||||
content
|
||||
}
|
||||
|
||||
|
||||
#let header(faculty_id, language) = {
|
||||
let logotype = faculty_logotype(faculty_id, language);
|
||||
grid(
|
||||
block(logotype, width: 100%),
|
||||
block(align(right, block(tul_logomark(faculty_id), height: tul_logomark_size))),
|
||||
columns: 2
|
||||
);
|
||||
}
|
||||
|
||||
// DOCUMENT INFO
|
||||
|
||||
#let info(
|
||||
faculty_id,
|
||||
language,
|
||||
document_type,
|
||||
title, author, supervisor, study_programme,
|
||||
) = {
|
||||
let info_name_value_padding = 5em;
|
||||
let info_name_min_width = 10em;
|
||||
|
||||
// document type
|
||||
if type(document_type) != type(none) {
|
||||
text(get_lang_item(language, document_type), weight: "bold", font: base_font);
|
||||
v(0em);
|
||||
}
|
||||
|
||||
// title
|
||||
text(
|
||||
title, weight: "bold", size: 2em,
|
||||
faculty_color(faculty_id), font: base_font,
|
||||
);
|
||||
v(0em);
|
||||
|
||||
// other info
|
||||
// [field_name, field_value, bold]
|
||||
let info_fields = (
|
||||
("study_programme", study_programme, false),
|
||||
(if author.contains(", ") { "authors" } else { "author" }, author, true),
|
||||
("supervisor", supervisor, false),
|
||||
)
|
||||
context {
|
||||
let max_field_name_width = calc.max(..info_fields.map((v) => {
|
||||
if type(v.at(1)) == type(none) {
|
||||
0pt
|
||||
} else {
|
||||
measure(get_lang_item(language, v.at(0)) + ":").width
|
||||
}
|
||||
}), info_name_min_width.to-absolute());
|
||||
grid(
|
||||
columns: 2,
|
||||
rows: (auto, 1.2em),
|
||||
..info_fields.filter((v) => { type(v.at(1)) != type(none) }).map((v) => {
|
||||
(
|
||||
block(
|
||||
text(get_lang_item(language, v.at(0)) + ":", style: "italic", font: base_font),
|
||||
width: max_field_name_width + info_name_value_padding,
|
||||
),
|
||||
text(v.at(1), font: base_font, weight: if v.at(2) { "bold" } else { "regular" })
|
||||
)
|
||||
}).flatten(),
|
||||
);
|
||||
v(1em);
|
||||
h(max_field_name_width + info_name_value_padding);
|
||||
text(get_lang_item(language, "city") + " " + str(datetime.today().year()), font: base_font);
|
||||
}
|
||||
}
|
||||
|
||||
// MAINPAGE
|
||||
|
||||
#let mainpage(
|
||||
faculty_id,
|
||||
language,
|
||||
document_type,
|
||||
title, author, supervisor, study_programme,
|
||||
) = {
|
||||
import "../utils.typ": has_all_none
|
||||
let nonetype = type(none);
|
||||
page({
|
||||
if has_all_none((
|
||||
document_type, title, author, supervisor, study_programme,
|
||||
)) {
|
||||
place(center + horizon, align(left, faculty_logotype(faculty_id, language)));
|
||||
} else {
|
||||
header(faculty_id, language);
|
||||
align({
|
||||
info(
|
||||
faculty_id, language, document_type, title.at(language),
|
||||
author, supervisor, study_programme,
|
||||
);
|
||||
v(5em);
|
||||
}, bottom);
|
||||
}
|
||||
}, margin: 2cm);
|
||||
}
|
||||
|
||||
// ASSIGNMENT PAGE
|
||||
|
||||
#let assignment(language, document) = {
|
||||
if type(document) == type(none) {
|
||||
page(
|
||||
place(center + horizon, text(
|
||||
get_lang_item(language, "place_assignment"),
|
||||
fill: red,
|
||||
size: 3em,
|
||||
font: base_font,
|
||||
weight: "bold",
|
||||
)),
|
||||
margin: 0em,
|
||||
footer: none,
|
||||
);
|
||||
return;
|
||||
}
|
||||
import "@preview/muchpdf:0.1.1": muchpdf
|
||||
set page(margin: 0em);
|
||||
muchpdf(read(document, encoding: none));
|
||||
}
|
||||
|
||||
// DISCLAIMER PAGE
|
||||
|
||||
#let disclaimer(language, faculty_id, disclaimer_type, author, author_gender) = {
|
||||
import "../lang.typ": disclaimer
|
||||
heading(get_lang_item(language, "disclaimer"), numbering: none, outlined: false);
|
||||
par(
|
||||
text(disclaimer(language, disclaimer_type, author_gender))
|
||||
);
|
||||
v(5em);
|
||||
grid(
|
||||
columns: 2,
|
||||
gutter: 1em,
|
||||
block(
|
||||
text(datetime.today().display(get_lang_item(language, "date")), lang: "cs"), width: 100%
|
||||
),
|
||||
text(author),
|
||||
);
|
||||
}
|
||||
|
||||
// ABSTRACT
|
||||
|
||||
#let abstract(language, title, content, keywords) = {
|
||||
heading(text(title.at(language), font: base_font), numbering: none, outlined: false);
|
||||
v(2em);
|
||||
heading(
|
||||
level: 2,
|
||||
get_lang_item(language, "abstract"),
|
||||
numbering: none,
|
||||
outlined: false,
|
||||
);
|
||||
text(content.at(language));
|
||||
if not is_none(keywords) and type(keywords.at(language)) != type(none) {
|
||||
linebreak();
|
||||
linebreak();
|
||||
text(get_lang_item(language, "keywords") + ": ", weight: "bold", font: base_font);
|
||||
text(keywords.at(language).join(", "));
|
||||
}
|
||||
}
|
||||
|
||||
// ABBREVIATION LIST
|
||||
|
||||
#let abbrlist(language) = {
|
||||
import "../abbreviations.typ": abbrlist
|
||||
context {
|
||||
let abbrs = abbrlist();
|
||||
let max_abbr_width = if abbrs.len() > 0 {
|
||||
calc.max(abbrs.keys().map((v) => measure(v).width)).at(0)
|
||||
} else { return };
|
||||
pagebreak(weak: true);
|
||||
heading(get_lang_item(language, "abbrs"), numbering: none);
|
||||
align(center, grid(
|
||||
columns: 2,
|
||||
gutter: 1em,
|
||||
..abbrs.pairs().map((a) => {
|
||||
(
|
||||
align(left, block(text(a.at(0), weight: "bold"), width: max_abbr_width + 1em)),
|
||||
text(a.at(1))
|
||||
)
|
||||
}).flatten()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
// TABLE OF CONTENTS
|
||||
|
||||
#let toc(language) = {
|
||||
show outline.entry.where(level: 1): it => {
|
||||
show repeat: none;
|
||||
block(text(it, weight: "bold", size: 1.2em), above: 1.5em);
|
||||
};
|
||||
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 + "'");
|
||||
}
|
||||
}
|
25
template/classic/other.typ
Normal file
25
template/classic/other.typ
Normal file
@@ -0,0 +1,25 @@
|
||||
#import "../lang.typ": get_lang_item
|
||||
#import "common.typ": mainpage, default_styling, assignment, disclaimer, abstract, toc, abbrlist
|
||||
#import "../utils.typ": is_none
|
||||
|
||||
#let other(
|
||||
// general settings
|
||||
faculty_id, faculty_color, language, assignment_document, citation_file,
|
||||
|
||||
// document info
|
||||
title, author, _, supervisor, study_programme, abstract_content, keywords,
|
||||
|
||||
content
|
||||
) = {
|
||||
mainpage(faculty_id, language, none, title, author, supervisor, study_programme);
|
||||
default_styling(true, faculty_color, {
|
||||
toc(language);
|
||||
abbrlist(language);
|
||||
|
||||
pagebreak(to: "even", weak: true);
|
||||
content
|
||||
|
||||
// bibliography
|
||||
bibliography(citation_file, style: "../tul_citace.csl");
|
||||
});
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,93 +1,93 @@
|
||||
Copyright 2018 The Cabin Project Authors (https://github.com/impallari/Cabin.git)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://openfontlicense.org
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Copyright 2018 The Cabin Project Authors (https://github.com/impallari/Cabin.git)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://openfontlicense.org
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
template/fonts/inter/Inter-Black.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-Black.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-BlackItalic.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-BlackItalic.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-Bold.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-Bold.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-BoldItalic.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-BoldItalic.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-ExtraBold.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-ExtraBold.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-ExtraBoldItalic.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-ExtraBoldItalic.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-ExtraLight.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-ExtraLight.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-ExtraLightItalic.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-ExtraLightItalic.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-Italic.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-Italic.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-Light.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-Light.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-LightItalic.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-LightItalic.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-Medium.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-Medium.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-MediumItalic.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-MediumItalic.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-Regular.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-Regular.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-SemiBold.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-SemiBold.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-SemiBoldItalic.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-SemiBoldItalic.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-Thin.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-Thin.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/inter/Inter-ThinItalic.otf
(Stored with Git LFS)
Normal file
BIN
template/fonts/inter/Inter-ThinItalic.otf
(Stored with Git LFS)
Normal file
Binary file not shown.
93
template/fonts/inter/OFL.txt
Normal file
93
template/fonts/inter/OFL.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://openfontlicense.org
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
template/fonts/merriweather/Merriweather-Bold.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/merriweather/Merriweather-Bold.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/merriweather/Merriweather-BoldIt.ttf
(Stored with Git LFS)
Executable file
BIN
template/fonts/merriweather/Merriweather-BoldIt.ttf
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
template/fonts/merriweather/Merriweather-Italic.ttf
(Stored with Git LFS)
Executable file
BIN
template/fonts/merriweather/Merriweather-Italic.ttf
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
template/fonts/merriweather/Merriweather-Light.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/merriweather/Merriweather-Light.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/merriweather/Merriweather-LightIt.ttf
(Stored with Git LFS)
Executable file
BIN
template/fonts/merriweather/Merriweather-LightIt.ttf
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
template/fonts/merriweather/Merriweather-Regular.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/merriweather/Merriweather-Regular.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/merriweather/Merriweather-UltraBdIt.ttf
(Stored with Git LFS)
Executable file
BIN
template/fonts/merriweather/Merriweather-UltraBdIt.ttf
(Stored with Git LFS)
Executable file
Binary file not shown.
BIN
template/fonts/merriweather/Merriweather-UltraBold.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/merriweather/Merriweather-UltraBold.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
48
template/fonts/merriweather/OFL.txt
Normal file
48
template/fonts/merriweather/OFL.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
Copyright (c) 2010, 2011 by Eben Sorkin (eben@eyebytes.com),
|
||||
with Reserved Font Name "Merriweather".
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
template/fonts/noto_sans_mono/NotoSansMono-Black.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/noto_sans_mono/NotoSansMono-Black.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/noto_sans_mono/NotoSansMono-Bold.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/noto_sans_mono/NotoSansMono-Bold.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/noto_sans_mono/NotoSansMono-ExtraBold.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/noto_sans_mono/NotoSansMono-ExtraBold.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/noto_sans_mono/NotoSansMono-ExtraLight.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/noto_sans_mono/NotoSansMono-ExtraLight.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/noto_sans_mono/NotoSansMono-Light.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/noto_sans_mono/NotoSansMono-Light.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/noto_sans_mono/NotoSansMono-Medium.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/noto_sans_mono/NotoSansMono-Medium.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/noto_sans_mono/NotoSansMono-Regular.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/noto_sans_mono/NotoSansMono-Regular.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/noto_sans_mono/NotoSansMono-SemiBold.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/noto_sans_mono/NotoSansMono-SemiBold.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
template/fonts/noto_sans_mono/NotoSansMono-Thin.ttf
(Stored with Git LFS)
Normal file
BIN
template/fonts/noto_sans_mono/NotoSansMono-Thin.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
93
template/fonts/noto_sans_mono/OFL.txt
Normal file
93
template/fonts/noto_sans_mono/OFL.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://openfontlicense.org
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
Binary file not shown.
73
template/lang.json
Normal file
73
template/lang.json
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"cs": {
|
||||
"author": "Autor",
|
||||
"authors": "Autoři",
|
||||
"supervisor": "Vedoucí práce",
|
||||
"study_programme": "Studijní program",
|
||||
|
||||
"bp": "Bakalářská práce",
|
||||
"dp": "Diplomová práce",
|
||||
"dis": "Disertační práce",
|
||||
|
||||
"city": "Liberec",
|
||||
|
||||
"toc": "Obsah",
|
||||
|
||||
"disclaimer": "Prohlášení",
|
||||
"disclaimer_content": "Prohlašuji, že {svůj} {práce:tu} jsem vypracoval{a} samostatně jako původní dílo s použitím uvedené literatury a na základě konzultací s vedoucím mé bakalářské práce a konzultantem.\n\nJsem si vědom{a} toho, že na {moji} {práce:tu} se plně vztahuje zákon č. 121/2000 Sb., o právu autorském, zejména § 60 – školní dílo.\n\nBeru na vědomí, že Technická univerzita v Liberci nezasahuje do mých autorských práv užitím {mé} {práce:té} pro vnitřní potřebu Technické univerzity v Liberci.\n\nUžiji-li {práce:tu} nebo poskytnu-li licenci k {jejímu} využití, jsem si vědom{a} povinnosti informovat o této skutečnosti Technickou univerzitu v Liberci; v tomto případě má Technická univerzita v Liberci právo ode mne požadovat úhradu nákladů, které vynaložila na vytvoření díla, až do jejich skutečné výše.\n\nSoučasně čestně prohlašuji, že text elektronické podoby práce vložený do IS/STAG se shoduje s textem tištěné podoby práce.\n\nBeru na vědomí, že {můj} {práce:ta} bude {zveřejněn} Technickou univerzitou v Liberci v souladu s § 47b zákona č. 111/1998 Sb., o vysokých školách a o změně a doplnění dalších zákonů (zákon o vysokých školách), ve znění pozdějších předpisů.\n\nJsem si vědom{a} následků, které podle zákona o vysokých školách mohou vyplývat z porušení tohoto prohlášení.",
|
||||
|
||||
"disclaimer_replace": {
|
||||
"bp": {
|
||||
"práce:ta": "bakalářská práce",
|
||||
"práce:tu": "bakalářskou práci",
|
||||
"práce:té": "bakalářské práce",
|
||||
"moji": "moji",
|
||||
"mé": "mé",
|
||||
"můj": "moje",
|
||||
"svůj": "svoji",
|
||||
"jejímu": "jejímu",
|
||||
"zveřejněn": "zveřejněna"
|
||||
}
|
||||
},
|
||||
|
||||
"date": "[day]. [month]. [year]",
|
||||
|
||||
"abstract": "Abstrakt",
|
||||
"keywords": "Klíčová slova",
|
||||
"abbrs": "Seznam zkratek",
|
||||
|
||||
"place_assignment": "Sem vložte zadání"
|
||||
},
|
||||
|
||||
"en": {
|
||||
"author": "Author",
|
||||
"authors": "Authors",
|
||||
"supervisor": "Supervisor",
|
||||
"study_programme": "Study programme",
|
||||
|
||||
"bp": "Bachelor thesis",
|
||||
"dp": "Diploma thesis",
|
||||
"dis": "Dissertation thesis",
|
||||
|
||||
"city": "Liberec",
|
||||
|
||||
"toc": "Contents",
|
||||
|
||||
"disclaimer": "Declaration",
|
||||
"disclaimer_content": "I hereby certify, I, myself, have written my {thesis} as an original and primary work using the literature listed below and consulting it with my thesis supervisor and my thesis counsellor.\n\nI acknowledge that my {thesis} is fully governed by Act No. 121/2000 Coll., the Copyright Act, in particular Article 60 – School Work.\n\nI acknowledge that the Technical University of Liberec does not infringe my copyrights by using my {thesis} for internal purposes of the Technical University of Liberec.\n\nI am aware of my obligation to inform the Technical University of Liberec on having used or granted license to use the results of my {thesis}; in such a case the Technical University of Liberec may require reimbursement of the costs incurred for creating the result up to their actual amount.\n\nAt the same time, I honestly declare that the text of the printed version of my {thesis} is identical with the text of the electronic version uploaded into the IS STAG.\n\nI acknowledge that the Technical University of Liberec will make my {thesis} public in accordance with paragraph 47b of Act No. 111/1998 Coll., on Higher Education Institutions and on Amendment to Other Acts (the Higher Education Act), as amended.\n\nI am aware of the consequences which may under the Higher Education Act result from a breach of this declaration.",
|
||||
|
||||
"disclaimer_replace": {
|
||||
"bp": {
|
||||
"thesis": "bachelor thesis"
|
||||
}
|
||||
},
|
||||
|
||||
"date": "[year]-[month]-[day]",
|
||||
|
||||
"abstract": "Abstract",
|
||||
"keywords": "Keywords",
|
||||
"abbrs": "List of abbreviations",
|
||||
|
||||
"place_assignment": "Insert your assignment here"
|
||||
}
|
||||
}
|
@@ -9,3 +9,34 @@
|
||||
assert_in_dict(lang_abbr, lang_ids, "language abbreviation");
|
||||
return lang_ids.at(lang_abbr);
|
||||
};
|
||||
|
||||
// Typst will usually cache this - so we don't have to re-read the file each time
|
||||
#let fetch_lang_items() = {
|
||||
return json("lang.json");
|
||||
}
|
||||
|
||||
#let get_lang_item(lang_abbr, item_name) = {
|
||||
assert_in_dict(lang_abbr, lang_ids, "language abbreviation");
|
||||
let lang_items = fetch_lang_items();
|
||||
return lang_items.at(lang_abbr).at(item_name);
|
||||
}
|
||||
|
||||
#let disclaimer(language, document_type, author_gender) = {
|
||||
let disclaimer = get_lang_item(language, "disclaimer_content");
|
||||
let replacements = get_lang_item(language, "disclaimer_replace").at(document_type);
|
||||
if language == "cs" {
|
||||
let gender_transforms = (
|
||||
male: "",
|
||||
female: "a",
|
||||
);
|
||||
assert_in_dict(author_gender, gender_transforms, "author gender");
|
||||
disclaimer = disclaimer.replace("{a}", gender_transforms.at(author_gender));
|
||||
}
|
||||
for (key, value) in replacements.pairs() {
|
||||
disclaimer = disclaimer.replace("{" + key + "}", value);
|
||||
}
|
||||
if disclaimer.contains("{") or disclaimer.contains("}") {
|
||||
panic("invalid language file");
|
||||
}
|
||||
disclaimer
|
||||
}
|
||||
|
@@ -1,6 +1,13 @@
|
||||
#let todos = state("todos", "0");
|
||||
#let is_prod = state("is_prod", "false");
|
||||
|
||||
// Set a build profile.
|
||||
//
|
||||
// This can be:
|
||||
// - debug (debug comments and todos are displayed)
|
||||
// - release (document will be ready for release)
|
||||
//
|
||||
// - profile (str): The target profile
|
||||
#let profile(profile) = {
|
||||
let profiles = ("debug", "release");
|
||||
if profile not in profiles {
|
||||
@@ -10,7 +17,12 @@
|
||||
)
|
||||
}
|
||||
context {
|
||||
is_prod.update(is_prod => "true");
|
||||
is_prod.update(is_prod => {
|
||||
if eval(is_prod) and profile == "debug" {
|
||||
panic("refusing to unset release profile - this is a safety measure");
|
||||
}
|
||||
if profile == "release" { "true" } else { "false" };
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,13 +40,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
#let todo(content, do_highlight: true) = {
|
||||
// Sets an item that should be done later.
|
||||
//
|
||||
// This will cause an error when compiling with a release profile.
|
||||
//
|
||||
// - content (str): What should you do?
|
||||
// - accent (bool): Whether to highlight the todo
|
||||
#let todo(content, accent: true) = {
|
||||
context {
|
||||
todos.update(todos => {
|
||||
str(eval(todos) + 1)
|
||||
});
|
||||
}
|
||||
if do_highlight {
|
||||
if accent {
|
||||
highlight(text(content, fill: white), fill: red, radius: .25em, extent: .25em);
|
||||
} else {
|
||||
text(content);
|
||||
|
@@ -1,27 +1,89 @@
|
||||
// +---------------+
|
||||
// | TULTemplate 2 |
|
||||
// +---------------+
|
||||
//
|
||||
// Unofficial TUL template for all kinds of documents.
|
||||
//
|
||||
// Git: https://git.zumepro.cz/tul/tultemplate2
|
||||
|
||||
#import "prototyping.typ": todo, profile
|
||||
|
||||
#let tultemplate(
|
||||
template_id,
|
||||
faculty_abbreviation,
|
||||
language,
|
||||
document_type: none,
|
||||
title: none, author: none, supervisor: none, study_programme: none,
|
||||
// TUL Template 2
|
||||
//
|
||||
// Use this at the beginning of a Typst file:
|
||||
// ```typst
|
||||
// #import "template/template.typ": *
|
||||
//
|
||||
// #show: tultemplate2.with(
|
||||
// "classic", "fm", "cs", ...
|
||||
// )
|
||||
// ```
|
||||
//
|
||||
// - style (str): Visual style to use. This can be "classic".
|
||||
// - faculty (str): Factulty abbreviation. One of "fs", "ft", "fp", "ef", "fua", "fm", "fzs", "cxi".
|
||||
// - lang (str): Language code. This can be "cs" or "en".
|
||||
// - document (str): Type of document. This can be "bp" or "other".
|
||||
// - title (str): The title of the document.
|
||||
// - author (str): The name of the document's author.
|
||||
// - author_gender (str): The gender of the document's author. Needed only for the `cs` language.
|
||||
// - supervisor (str): The name of the document's supervisor.
|
||||
// - programme (str): Study programme.
|
||||
// - abstract (content): The abstract.
|
||||
// - keywords (array): The abstract keywords.
|
||||
// - assignment (str): Filepath of the assignment document/page.
|
||||
// - citations (str): The location of the citation file.
|
||||
// - content (content): The content of the document
|
||||
//
|
||||
//-> none
|
||||
#let tultemplate2(
|
||||
// general settings
|
||||
style: "classic", faculty: "tul", lang: "cs", document: "other",
|
||||
|
||||
// document info
|
||||
title: none, keywords: none, abstract: none, author: none, author_gender: none,
|
||||
supervisor: none, programme: none,
|
||||
|
||||
// links
|
||||
assignment: none, citations: "citations.bib",
|
||||
|
||||
// content
|
||||
content,
|
||||
) = {
|
||||
import "template_classic.typ": template_classic
|
||||
import "utils.typ": assert_in_dict
|
||||
import "utils.typ": assert_in_dict, assert_type_signature
|
||||
|
||||
// argument checking
|
||||
assert_type_signature(style, "string", "visual style argument");
|
||||
assert_type_signature(faculty, "string", "faculty id argument");
|
||||
assert_type_signature(lang, "string", "language abbreviation argument");
|
||||
assert_type_signature(document, "string | none", "document kind argument");
|
||||
assert_type_signature(title, "dictionary[string : string] | none", "title argument");
|
||||
assert_type_signature(keywords, "dictionary[string : array[string]] | none", "keywords argument");
|
||||
assert_type_signature(abstract, "dictionary[string : string] | none", "abstract argument");
|
||||
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(
|
||||
programme, "dictionary[string : string] | none", "study programme argument"
|
||||
);
|
||||
assert_type_signature(assignment, "string | none", "assignment document argument");
|
||||
assert_type_signature(citations, "string", "citations file argument");
|
||||
|
||||
// templates
|
||||
import "classic/classic.typ": template_classic
|
||||
let templates = (
|
||||
classic: template_classic,
|
||||
);
|
||||
assert_in_dict(template_id, templates, "template name");
|
||||
assert_in_dict(style, templates, "template name");
|
||||
|
||||
// global set-up
|
||||
// language set-up
|
||||
import "lang.typ": lang_ids
|
||||
assert_in_dict(language, lang_ids, "language abbreviation");
|
||||
set text(lang: language);
|
||||
templates.at(template_id)(
|
||||
faculty_abbreviation, language, document_type,
|
||||
title, author, supervisor, study_programme,
|
||||
assert_in_dict(lang, lang_ids, "language abbreviation");
|
||||
set text(lang: lang);
|
||||
|
||||
// template call
|
||||
templates.at(style)(
|
||||
lang, faculty, document, citations, assignment,
|
||||
title, author, author_gender, supervisor, programme, abstract, keywords,
|
||||
content
|
||||
);
|
||||
|
||||
@@ -29,6 +91,10 @@
|
||||
assert_release_ready();
|
||||
}
|
||||
|
||||
// Make a new abbreviation
|
||||
//
|
||||
// - abbreviation (str): The abbreviation
|
||||
// - text (str): Optionally, the text - the meaning of the abbreviation.
|
||||
#let abbr(abbreviation, ..text) = {
|
||||
import "abbreviations.typ": abbr
|
||||
return abbr(abbreviation, if text.pos().len() == 0 { none } else { text.pos().at(0) });
|
||||
|
@@ -1,151 +0,0 @@
|
||||
#import "theme.typ": faculty_logotype, tul_logomark, faculty_color
|
||||
#import "lang.typ": lang_id
|
||||
#import "utils.typ": assert_in_dict
|
||||
|
||||
#let base_font = "Cabin";
|
||||
|
||||
#let classic_header(faculty_id, language) = {
|
||||
let logotype = faculty_logotype(faculty_id, language);
|
||||
grid(
|
||||
logotype,
|
||||
block(align(right, block(tul_logomark(faculty_id), height: 5em)), width: 100%),
|
||||
columns: 2
|
||||
);
|
||||
}
|
||||
|
||||
#let classic_info(
|
||||
faculty_id,
|
||||
language,
|
||||
document_type,
|
||||
title, author, supervisor, study_programme,
|
||||
) = {
|
||||
let lang_id = lang_id(language);
|
||||
|
||||
// document type
|
||||
if type(document_type) != type(none) {
|
||||
let document_types = (
|
||||
bp: ("Bakalářská práce", "Bachelor thesis"),
|
||||
dp: ("Diplomová práce", "Diploma thesis"),
|
||||
ds: ("Disertační práce", "Dissertation thesis"),
|
||||
);
|
||||
assert_in_dict(document_type, document_types, "document type abbreviation");
|
||||
text(document_types.at(document_type).at(lang_id), weight: "bold", font: base_font);
|
||||
v(0em);
|
||||
}
|
||||
|
||||
// title
|
||||
text(
|
||||
title, weight: "bold", size: 2em,
|
||||
faculty_color(faculty_id), font: base_font,
|
||||
);
|
||||
v(0em);
|
||||
|
||||
// other info
|
||||
// [field_name, field_value, bold]
|
||||
let info_fields = (
|
||||
(("Studijní program", "Study programme"), study_programme, false),
|
||||
(("Autor", "Author"), author, true),
|
||||
(("Vedoucí práce", "Supervisor"), supervisor, false),
|
||||
);
|
||||
context {
|
||||
let max_field_name_width = calc.max(..info_fields.map((v) => {
|
||||
if type(v.at(1)) == type(none) {
|
||||
0pt
|
||||
} else {
|
||||
measure(v.at(0).at(lang_id) + ":").width
|
||||
}
|
||||
}));
|
||||
grid(
|
||||
columns: 2,
|
||||
rows: (auto, 1.2em),
|
||||
..info_fields.filter((v) => { type(v.at(1)) != type(none) }).map((v) => {
|
||||
(
|
||||
block(
|
||||
text(v.at(0).at(lang_id) + ":", style: "italic", font: base_font),
|
||||
width: max_field_name_width + 5em,
|
||||
),
|
||||
text(v.at(1), font: base_font, weight: if v.at(2) { "bold" } else { "regular" })
|
||||
)
|
||||
}).flatten()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#let abbrlist(language) = {
|
||||
import "abbreviations.typ": abbrlist
|
||||
context {
|
||||
let abbrs = abbrlist();
|
||||
let max_abbr_width = if abbrs.len() > 0 {
|
||||
calc.max(abbrs.keys().map((v) => measure(v).width)).at(0)
|
||||
} else { return };
|
||||
pagebreak(weak: true);
|
||||
heading(("Seznam zkratek", "List of abbreviations").at(language), numbering: none);
|
||||
align(center, grid(
|
||||
columns: 2,
|
||||
..abbrs.pairs().map((v) => {
|
||||
(block(text(v.at(0), weight: "bold"), width: max_abbr_width + 1em), text(v.at(1)))
|
||||
}).flatten()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
#let template_classic(
|
||||
faculty_id,
|
||||
language,
|
||||
document_type,
|
||||
title, author, supervisor, study_programme,
|
||||
content,
|
||||
) = {
|
||||
// intro page
|
||||
page({
|
||||
classic_header(faculty_id, language);
|
||||
align({
|
||||
classic_info(faculty_id, language, document_type, title, author, supervisor, study_programme);
|
||||
v(5em);
|
||||
}, bottom);
|
||||
}, margin: 2cm);
|
||||
|
||||
// styling
|
||||
let faculty_color = faculty_color(faculty_id);
|
||||
set par(justify: true);
|
||||
set heading(numbering: "1.1.1 ");
|
||||
set page(margin: (outside: 4cm, top: 3cm, bottom: 3cm), numbering: "1", footer: {
|
||||
context {
|
||||
let page = counter(page).get().at(0);
|
||||
align(str(page), if calc.rem(page, 2) == 0 { right } else { left })
|
||||
}
|
||||
});
|
||||
show heading: it => {
|
||||
set par(justify: false);
|
||||
block(
|
||||
above: 2em,
|
||||
below: 2em,
|
||||
text(it, faculty_color, font: "TUL Mono", size: 1.2em)
|
||||
);
|
||||
};
|
||||
show heading.where(level: 1): it => {
|
||||
pagebreak();
|
||||
v(2cm);
|
||||
it
|
||||
};
|
||||
show raw.where(block: true): it => {
|
||||
block(it, fill: rgb("#eee"), inset: 1em)
|
||||
}
|
||||
set image(width: 80%);
|
||||
|
||||
let language = lang_id(language);
|
||||
|
||||
// toc
|
||||
show outline.entry.where(level: 1): it => {
|
||||
show repeat: none;
|
||||
block(text(it, weight: "bold", size: 1.2em), above: 1.5em);
|
||||
};
|
||||
outline(title: ("Obsah", "Contents").at(language));
|
||||
|
||||
// abbreviation list
|
||||
abbrlist(language);
|
||||
|
||||
// content
|
||||
pagebreak(to: "even", weak: true);
|
||||
content
|
||||
}
|
@@ -3,11 +3,19 @@
|
||||
|
||||
#let faculty_themes = (
|
||||
|
||||
tul: (
|
||||
cmyk(80%, 81%, 0%, 0%),
|
||||
(
|
||||
"TECHNICKÁ UNIVERZITA V LIBERCI&",
|
||||
"TECHNICAL UNIVERSITY OF LIBEREC&",
|
||||
),
|
||||
),
|
||||
|
||||
fs: (
|
||||
cmyk(45%, 35%, 30%, 10%),
|
||||
(
|
||||
"FAKULTA STROJNÍ TUL&",
|
||||
"FACULTY OF MECHANICAL ENGINEERING TUL&"
|
||||
"FACULTY OF MECHANICAL ENGINEERING TUL&",
|
||||
),
|
||||
),
|
||||
|
||||
@@ -38,8 +46,8 @@
|
||||
fua: (
|
||||
cmyk(96%, 2%, 80%, 47%),
|
||||
(
|
||||
"FUA\nTUL&",
|
||||
"FAA\nTUL&",
|
||||
"FAKULTA UMĚNÍ A ARCHITEKTURY TUL&",
|
||||
"FACULTY OF ARTS AND ARCHITECTURE TUL&",
|
||||
),
|
||||
),
|
||||
|
||||
|
497
template/tul_citace.csl
Normal file
497
template/tul_citace.csl
Normal file
@@ -0,0 +1,497 @@
|
||||
<?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">
|
||||
<info>
|
||||
<title>TUL ISO-690</title>
|
||||
<id>-----</id>
|
||||
<link href="" rel="self"/>
|
||||
<link href="" rel="documentation"/>
|
||||
<author>
|
||||
<name>-----</name>
|
||||
<email>-----</email>
|
||||
</author>
|
||||
<category citation-format="numeric"/>
|
||||
<category field="generic-base"/>
|
||||
<summary>Style based on ISO 690:2010(E), V1.1</summary>
|
||||
<updated>2025-03-30T14:14:00+00:00</updated>
|
||||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
||||
</info>
|
||||
<locale>
|
||||
<terms>
|
||||
<term name="no date">[žádné datum]</term>
|
||||
<term name="in">v</term>
|
||||
<term name="online">online</term>
|
||||
<term name="accessed">citováno</term>
|
||||
<term name="retrieved">Dostupné</term>
|
||||
<term name="from">z</term>
|
||||
</terms>
|
||||
</locale>
|
||||
<macro name="author">
|
||||
<names variable="author">
|
||||
<name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never">
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="editor">
|
||||
<names variable="editor">
|
||||
<name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never">
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
<label prefix=" (" form="short" suffix=".)"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="translator">
|
||||
<names variable="translator">
|
||||
<name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never">
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
<label prefix=" (" form="short" suffix=".)"/>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="responsability">
|
||||
<choose>
|
||||
<if variable="author editor translator" match="any">
|
||||
<choose>
|
||||
<if variable="author">
|
||||
<text macro="author"/>
|
||||
</if>
|
||||
<else-if variable="editor">
|
||||
<text macro="editor"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text macro="translator"/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="container-author">
|
||||
<names variable="container-author">
|
||||
<name and="text" name-as-sort-order="all" sort-separator=", " delimiter=", " delimiter-precedes-last="never">
|
||||
<name-part name="family" text-case="uppercase"/>
|
||||
<name-part name="given"/>
|
||||
</name>
|
||||
</names>
|
||||
</macro>
|
||||
<macro name="container-responsability">
|
||||
<choose>
|
||||
<if variable="container-author editor translator" match="any">
|
||||
<choose>
|
||||
<if variable="container-author">
|
||||
<text macro="container-author"/>
|
||||
</if>
|
||||
<else-if variable="editor">
|
||||
<text macro="editor"/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text macro="translator"/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="year-date">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<date variable="issued">
|
||||
<date-part name="year" form="long"/>
|
||||
</date>
|
||||
</if>
|
||||
<else>
|
||||
<text term="no date"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="title">
|
||||
<choose>
|
||||
<if type="book thesis map motion_picture song manuscript" match="any">
|
||||
<text variable="title" font-style="italic" suffix=". "/>
|
||||
</if>
|
||||
<else-if type="paper-conference speech chapter article-journal article-magazine article-newspaper entry entry-dictionary entry-encyclopedia post-weblog post webpage broadcast" match="any">
|
||||
<text variable="title" suffix=". "/>
|
||||
<choose>
|
||||
<if type="chapter paper-conference" match="any">
|
||||
<text term="in" text-case="capitalize-first" suffix=" : "/>
|
||||
</if>
|
||||
</choose>
|
||||
<choose>
|
||||
<if variable="container-author editor translator" match="any">
|
||||
<text macro="container-responsability"/>
|
||||
<choose>
|
||||
<if variable="container-title event" match="any">
|
||||
<text value=", "/>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
<choose>
|
||||
<if variable="container-title">
|
||||
<text variable="container-title" font-style="italic" suffix="."/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="event" font-style="italic" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
</else-if>
|
||||
<else-if type="report">
|
||||
<text variable="number" suffix=": "/>
|
||||
<text variable="title" font-style="italic"/>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<text variable="title" suffix="."/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text variable="title" font-style="italic" suffix="."/>
|
||||
</else>
|
||||
</choose>
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<text term="online" text-case="capitalize-first" prefix=" "/>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="number">
|
||||
<text variable="number"/>
|
||||
</macro>
|
||||
<macro name="medium">
|
||||
<text variable="medium" prefix=" [" suffix="]"/>
|
||||
</macro>
|
||||
<macro name="version">
|
||||
<text variable="version"/>
|
||||
</macro>
|
||||
<macro name="genre">
|
||||
<choose>
|
||||
<if type="map">
|
||||
<choose>
|
||||
<if variable="genre">
|
||||
<text variable="genre" prefix="[" suffix="]"/>
|
||||
</if>
|
||||
<else>
|
||||
<text value="map" prefix="[" suffix="]"/>
|
||||
</else>
|
||||
</choose>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="genre"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="date">
|
||||
<choose>
|
||||
<if variable="issued">
|
||||
<date variable="issued">
|
||||
<date-part name="day" suffix=" "/>
|
||||
<date-part name="month" suffix=" "/>
|
||||
<date-part name="year"/>
|
||||
</date>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="edition">
|
||||
<text variable="edition" form="long"/>
|
||||
</macro>
|
||||
<macro name="publisher-group">
|
||||
<group delimiter=" : ">
|
||||
<text variable="publisher-place"/>
|
||||
<text variable="publisher"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="issue">
|
||||
<group delimiter=", ">
|
||||
<text variable="volume" prefix="Vol. "/>
|
||||
<choose>
|
||||
<if variable="volume">
|
||||
<text variable="issue" prefix="no. "/>
|
||||
<text variable="page" prefix="p. "/>
|
||||
</if>
|
||||
<else-if variable="issue">
|
||||
<text variable="issue" prefix="No. "/>
|
||||
<text variable="page" prefix="p. "/>
|
||||
</else-if>
|
||||
<else>
|
||||
<text variable="page" prefix="P. "/>
|
||||
</else>
|
||||
</choose>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="accessed">
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<group prefix=" [" suffix="]">
|
||||
<text term="accessed" suffix=" "/>
|
||||
<date variable="accessed">
|
||||
<date-part name="year"/>
|
||||
<date-part name="month" form="numeric-leading-zeros" prefix="-"/>
|
||||
<date-part name="day" form="numeric-leading-zeros" prefix="-"/>
|
||||
</date>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="collection">
|
||||
<group delimiter=", ">
|
||||
<text variable="collection-title"/>
|
||||
<text variable="collection-number"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="page">
|
||||
<choose>
|
||||
<if type="book thesis manuscript" match="any">
|
||||
<text variable="number-of-pages" suffix=" p"/>
|
||||
</if>
|
||||
<else-if type="chapter paper-conference article-newspaper" match="any">
|
||||
<text variable="page" prefix="p. "/>
|
||||
</else-if>
|
||||
<else-if type="report patent" match="any">
|
||||
<text variable="page" suffix=" p"/>
|
||||
</else-if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="isbn">
|
||||
<text variable="ISBN" prefix="ISBN "/>
|
||||
</macro>
|
||||
<macro name="doi">
|
||||
<text variable="DOI" prefix="DOI "/>
|
||||
</macro>
|
||||
<macro name="url">
|
||||
<choose>
|
||||
<if variable="DOI" match="none">
|
||||
<choose>
|
||||
<if variable="URL">
|
||||
<group>
|
||||
<text term="retrieved" suffix=" " text-case="capitalize-first"/>
|
||||
<text term="from" suffix=": "/>
|
||||
<text variable="URL" suffix=" "/>
|
||||
</group>
|
||||
</if>
|
||||
</choose>
|
||||
</if>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="archive">
|
||||
<group delimiter=": ">
|
||||
<text variable="archive"/>
|
||||
<text macro="archive_location"/>
|
||||
</group>
|
||||
</macro>
|
||||
<macro name="archive_location">
|
||||
<choose>
|
||||
<if variable="archive_location">
|
||||
<text variable="archive_location"/>
|
||||
</if>
|
||||
<else>
|
||||
<text variable="call-number"/>
|
||||
</else>
|
||||
</choose>
|
||||
</macro>
|
||||
<macro name="abstract">
|
||||
<text variable="abstract"/>
|
||||
</macro>
|
||||
<macro name="note">
|
||||
<text variable="note"/>
|
||||
</macro>
|
||||
<citation collapse="citation-number" after-collapse-delimiter="; ">
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout prefix="(" suffix=")" delimiter=", ">
|
||||
<group delimiter=", ">
|
||||
<text variable="citation-number"/>
|
||||
<group>
|
||||
<label variable="locator" suffix=". " form="short" strip-periods="true"/>
|
||||
<text variable="locator"/>
|
||||
</group>
|
||||
</group>
|
||||
</layout>
|
||||
</citation>
|
||||
<bibliography>
|
||||
<sort>
|
||||
<key variable="citation-number"/>
|
||||
</sort>
|
||||
<layout>
|
||||
<text variable="citation-number" display="left-margin" suffix=". "/>
|
||||
<choose>
|
||||
<if type="book map" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</if>
|
||||
<else-if type="article-journal article-magazine" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="issue" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="doi" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="article-newspaper">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="chapter entry entry-dictionary entry-encyclopedia" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" font-style="normal" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="speech">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="paper-conference">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="doi" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="thesis">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="post-weblog post webpage" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="broadcast motion_picture song" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="medium" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="report" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="manuscript" match="any">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=", "/>
|
||||
<text macro="year-date" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else-if type="patent">
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="number" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else-if>
|
||||
<else>
|
||||
<group display="right-inline">
|
||||
<text macro="responsability" suffix=". "/>
|
||||
<text macro="title" suffix=". "/>
|
||||
<text macro="version" suffix=". "/>
|
||||
<text macro="medium" suffix=". "/>
|
||||
<text macro="genre" suffix=". "/>
|
||||
<text macro="date" suffix=". "/>
|
||||
<text macro="edition" suffix=". "/>
|
||||
<text macro="publisher-group" suffix=". "/>
|
||||
<text macro="number" suffix=". "/>
|
||||
<text macro="accessed" suffix=". "/>
|
||||
<text macro="collection" suffix=". "/>
|
||||
<text macro="page" suffix=". "/>
|
||||
<text macro="isbn" suffix=". "/>
|
||||
<text macro="url"/>
|
||||
</group>
|
||||
</else>
|
||||
</choose>
|
||||
<group display="right-inline">
|
||||
<text macro="archive"/>
|
||||
</group>
|
||||
<group display="right-inline">
|
||||
<text macro="abstract"/>
|
||||
</group>
|
||||
<group display="right-inline">
|
||||
<text macro="note"/>
|
||||
</group>
|
||||
</layout>
|
||||
</bibliography>
|
||||
</style>
|
@@ -1,8 +1,311 @@
|
||||
#let assert_in_dict(needle, dict, item_name) = {
|
||||
if str(needle) not in dict {
|
||||
panic(
|
||||
"unknown " + item_name + " '" + str(needle) +
|
||||
"', expected one of: " + dict.keys().map((k) => { "'" + str(k) + "'" }).join(", ")
|
||||
#let join(a, b) = {
|
||||
let res = ();
|
||||
if type(a) == array {
|
||||
for a in a {
|
||||
res.push(a);
|
||||
}
|
||||
} else {
|
||||
res.push(a);
|
||||
}
|
||||
if type(b) == array {
|
||||
for b in b {
|
||||
res.push(b);
|
||||
}
|
||||
} else {
|
||||
res.push(b);
|
||||
}
|
||||
res
|
||||
}
|
||||
|
||||
#let serialize_array(arr) = {
|
||||
arr.map((v) => { "'" + str(v) + "'" }).join(", ")
|
||||
}
|
||||
|
||||
// Assumes a valid type signature
|
||||
#let decompose_type_signature(signature) = {
|
||||
let parse_variants(raw) = {
|
||||
let tmp = "";
|
||||
let res = ();
|
||||
for char in raw {
|
||||
if char == ":" {
|
||||
let trimmed = tmp.trim();
|
||||
tmp = "";
|
||||
if trimmed.len() != 0 {
|
||||
res.push(trimmed);
|
||||
}
|
||||
res.push(":");
|
||||
} else if char == "|" {
|
||||
let trimmed = tmp.trim();
|
||||
tmp = "";
|
||||
if trimmed.len() != 0 {
|
||||
res.push(trimmed);
|
||||
}
|
||||
} else {
|
||||
tmp += char;
|
||||
}
|
||||
}
|
||||
if tmp.len() != 0 {
|
||||
res.push(tmp.trim());
|
||||
}
|
||||
res
|
||||
};
|
||||
let parse_groups(raw) = {
|
||||
let tmp = "";
|
||||
let groups = ();
|
||||
let found_nested = false;
|
||||
let nested = 0;
|
||||
for char in raw {
|
||||
if nested == 2 {
|
||||
found_nested = true;
|
||||
}
|
||||
if char == "[" {
|
||||
if nested > 0 {
|
||||
tmp += char;
|
||||
} else {
|
||||
groups = join(groups, parse_variants(tmp));
|
||||
tmp = "";
|
||||
found_nested = false;
|
||||
}
|
||||
nested += 1;
|
||||
} else if char == "]" {
|
||||
if nested > 1 {
|
||||
tmp += char;
|
||||
} else {
|
||||
groups.push(if found_nested { parse_groups(tmp) } else { parse_variants(tmp) });
|
||||
tmp = "";
|
||||
found_nested = false;
|
||||
}
|
||||
nested -= 1;
|
||||
} else {
|
||||
tmp += char;
|
||||
}
|
||||
}
|
||||
if tmp.len() != 0 {
|
||||
groups = join(groups, parse_variants(tmp));
|
||||
}
|
||||
groups
|
||||
};
|
||||
let parse_nested(grouped) = {
|
||||
if type(grouped) != array or grouped.len() == 0 {
|
||||
return grouped;
|
||||
}
|
||||
let first = grouped.at(0);
|
||||
if type(first) == str and first == "dictionary" {
|
||||
let body = grouped.at(1);
|
||||
let key = ();
|
||||
for group in body {
|
||||
if group == ":" {
|
||||
break;
|
||||
}
|
||||
key.push(group);
|
||||
}
|
||||
let val = body.slice(key.len() + 1);
|
||||
join((("dictionary", parse_nested(key), parse_nested(val)),), parse_nested(grouped.slice(2)))
|
||||
} else if type(first) == str and first == "array" {
|
||||
join((("array", parse_nested(grouped.at(1))),), parse_nested(grouped.slice(2)))
|
||||
} else {
|
||||
join(parse_nested(first), parse_nested(grouped.slice(1)))
|
||||
}
|
||||
};
|
||||
let grouped = parse_groups(signature);
|
||||
parse_nested(grouped)
|
||||
}
|
||||
|
||||
#let serialize_type_signature(value) = {
|
||||
let serialize_type(value, array_serializer, dict_serializer) = {
|
||||
if type(value) == dictionary {
|
||||
dict_serializer(value, array_serializer)
|
||||
} else if type(value) == array {
|
||||
array_serializer(value)
|
||||
} else {
|
||||
str(type(value))
|
||||
}
|
||||
}
|
||||
|
||||
let serialize_multi_type(values, array_serializer, dict_serializer) = {
|
||||
let signatures = ().to-dict();
|
||||
for value in values {
|
||||
signatures.insert(serialize_type(value, array_serializer, dict_serializer), none);
|
||||
}
|
||||
signatures.keys().join(" | ")
|
||||
}
|
||||
|
||||
let serialize_dict_type(dict, array_serializer) = {
|
||||
(
|
||||
"dictionary[" +
|
||||
serialize_multi_type(dict.keys(), array_serializer, serialize_dict_type) +
|
||||
" : " +
|
||||
serialize_multi_type(dict.values(), array_serializer, serialize_dict_type) +
|
||||
"]"
|
||||
)
|
||||
}
|
||||
|
||||
let serialize_array_type(arr) = {
|
||||
"array[" + serialize_multi_type(arr, serialize_array_type, serialize_dict_type) + "]"
|
||||
}
|
||||
|
||||
serialize_type(value, serialize_array_type, serialize_dict_type);
|
||||
}
|
||||
|
||||
#let is_subset_of(subset, of) = {
|
||||
let has_value(value, target, matcher) = {
|
||||
for target in target {
|
||||
if matcher(value, target) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
false
|
||||
};
|
||||
let is_subset(subset, of, matcher) = {
|
||||
for item in subset {
|
||||
if not has_value(item, of, matcher) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
true
|
||||
};
|
||||
let matches(a, b) = {
|
||||
if type(a) == array {
|
||||
if a.at(0) != b.at(0) {
|
||||
return false;
|
||||
}
|
||||
let a_type = a.at(0);
|
||||
if a_type == "dictionary" {
|
||||
is_subset(a.at(1), b.at(1), matches) and is_subset(a.at(2), b.at(2), matches)
|
||||
} else if a_type == "array" {
|
||||
is_subset(a.at(1), b.at(1), matches)
|
||||
} else {
|
||||
panic("invalid signature");
|
||||
}
|
||||
} else if type(a) != array and type(b) != array {
|
||||
a == b
|
||||
} else {
|
||||
false
|
||||
}
|
||||
};
|
||||
is_subset(subset, of, matches)
|
||||
}
|
||||
|
||||
|
||||
#let assert_in_arr(needle, arr, item_name) = {
|
||||
if str(needle) not in arr {
|
||||
let panic_message = (
|
||||
"unknown " + item_name + " '" + str(needle) + "', expected one of: " + serialize_array(arr)
|
||||
);
|
||||
panic(panic_message);
|
||||
}
|
||||
}
|
||||
|
||||
#let assert_in_dict(needle, dict, item_name) = {
|
||||
assert_in_arr(needle, dict.keys(), item_name);
|
||||
}
|
||||
|
||||
#let assert_dict_has(needles, dict, item_name) = {
|
||||
for needle in needles {
|
||||
if not needle in dict {
|
||||
let panic_message = item_name + " does not contain an entry for '" + needle + "'";
|
||||
panic(panic_message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#let matches_type(value, expected_types) = {
|
||||
return type(value) in expected_types;
|
||||
}
|
||||
|
||||
#let assert_type(value, expected_types, value_name) = {
|
||||
if not matches_type(value, expected_types) {
|
||||
let panic_message = (
|
||||
"unexpected type for " + value_name + " '" + str(type(value)) + "', expected one of: " +
|
||||
serialize_array(expected_types)
|
||||
);
|
||||
panic(panic_message);
|
||||
}
|
||||
}
|
||||
|
||||
#let matches_array_type(arr, expected_item_types) = {
|
||||
for item in arr {
|
||||
if not matches_type(item, expected_item_types) { return false; }
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
#let assert_array_type(arr, expected_types, array_name) = {
|
||||
assert_type(arr, (array), array_name);
|
||||
for item in arr {
|
||||
assert_type(item, expected_types, array_name + " item");
|
||||
}
|
||||
}
|
||||
|
||||
#let matches_dict_type(dict, expected_key_types, expected_value_types) = {
|
||||
if type(dict) != dictionary {
|
||||
return false;
|
||||
}
|
||||
for (key, value) in dict.pairs() {
|
||||
if not (matches_type(key, expected_key_types) and matches_type(value, expected_value_types)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
#let assert_dict_type(dict, expected_key_types, expected_value_types, dict_name) = {
|
||||
assert_type(dict, (dictionary), dict_name);
|
||||
for (key, value) in dict.items() {
|
||||
assert_type(key, expected_key_types, dict_name + " key");
|
||||
assert_type(value, expected_value_types, dict_name + " value");
|
||||
}
|
||||
}
|
||||
|
||||
#let assert_type_signature(value, expected_type_signature, value_name) = {
|
||||
let type_signature = serialize_type_signature(value);
|
||||
if not is_subset_of(
|
||||
decompose_type_signature(type_signature),
|
||||
decompose_type_signature(expected_type_signature)
|
||||
) {
|
||||
let panic_message = (
|
||||
"unexpected " + value_name + " type '" + type_signature +
|
||||
"' expected at least a subset of '" + expected_type_signature + "'"
|
||||
);
|
||||
panic(panic_message);
|
||||
}
|
||||
}
|
||||
|
||||
#let is_none(thing) = {
|
||||
if type(thing) == type(none) {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
#let assert_not_none(thing, item_name) = {
|
||||
if is_none(thing) {
|
||||
let panic_message = "missing " + item_name;
|
||||
panic(panic_message);
|
||||
}
|
||||
}
|
||||
|
||||
#let ok_or(thing, fallback) = {
|
||||
if is_none(thing) {
|
||||
fallback
|
||||
} else {
|
||||
thing
|
||||
}
|
||||
}
|
||||
|
||||
#let has_all_none(arr) = {
|
||||
for item in arr {
|
||||
if not is_none(item) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
#let map_none(value, mapper) = {
|
||||
if is_none(value) {
|
||||
return none;
|
||||
}
|
||||
mapper(value)
|
||||
}
|
||||
|
40
tests/citations.bib
Normal file
40
tests/citations.bib
Normal 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 Alzheimer’s 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 Beginner’s 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/},
|
||||
}
|
7
tests/citations_cs.typ
Normal file
7
tests/citations_cs.typ
Normal file
@@ -0,0 +1,7 @@
|
||||
@Wang2025
|
||||
@csl
|
||||
@linux
|
||||
@Satrapa2011
|
||||
|
||||
#set text(lang: "cs")
|
||||
#bibliography("citations.bib", title: "Bibliography - CZ", style: "../template/tul_citace.csl")
|
6
tests/citations_en.typ
Normal file
6
tests/citations_en.typ
Normal file
@@ -0,0 +1,6 @@
|
||||
@Wang2025
|
||||
@csl
|
||||
@linux
|
||||
@Satrapa2011
|
||||
|
||||
#bibliography("citations.bib", title: "Bibliography - EN", style: "iso-690-author-date")
|
59
tests/fonts.typ
Normal file
59
tests/fonts.typ
Normal file
@@ -0,0 +1,59 @@
|
||||
#let display_font(family, weight) = {
|
||||
if type(family) == type(none) {
|
||||
block(
|
||||
spacing: 2em,
|
||||
text("Příšerně žluťoučký kůn úpěl ďábelské ódy. " + lorem(25), weight: weight)
|
||||
)
|
||||
} else {
|
||||
block(
|
||||
spacing: 2em,
|
||||
text("Příšerně žluťoučký kůn úpěl ďábelské ódy. " + lorem(25), font: family, weight: weight)
|
||||
)
|
||||
}
|
||||
}
|
||||
#show heading.where(level: 1): it => {
|
||||
v(3em);
|
||||
it;
|
||||
}
|
||||
|
||||
= #highlight[TUL Mono]
|
||||
|
||||
== Regular
|
||||
|
||||
#display_font("tul mono", "regular")
|
||||
|
||||
= #highlight[Inter]
|
||||
|
||||
== Regular
|
||||
|
||||
#display_font("inter", "regular")
|
||||
|
||||
== Light
|
||||
|
||||
#display_font("inter", "light")
|
||||
|
||||
== Bold
|
||||
|
||||
#display_font("inter", "bold")
|
||||
|
||||
#pagebreak()
|
||||
|
||||
= #highlight[Default]
|
||||
|
||||
== Regular
|
||||
|
||||
#display_font(none, "regular")
|
||||
|
||||
= #highlight[Merriweather]
|
||||
|
||||
== Regular
|
||||
|
||||
#display_font("merriweather", "regular")
|
||||
|
||||
== Light
|
||||
|
||||
#display_font("merriweather", "light")
|
||||
|
||||
== Bold
|
||||
|
||||
#display_font("merriweather", "bold")
|
6
tests/make.mk
Normal file
6
tests/make.mk
Normal file
@@ -0,0 +1,6 @@
|
||||
.PHONY: test_%
|
||||
test_%: tests/%.pdf
|
||||
xdg-open $<
|
||||
|
||||
tests/%.pdf: tests/%.typ
|
||||
typst compile --root . --font-path template/fonts $<
|
Reference in New Issue
Block a user