156 Commits
v0.1 ... v1.3

Author SHA1 Message Date
f588ea1e3f add sp to templategen bundles 2025-11-18 18:17:52 +01:00
f79fcd51e1 corrections for thesis example content in cs and en 2025-11-17 23:01:40 +01:00
5694c95042 add non-breaking term 2025-11-17 22:53:40 +01:00
26f8326782 fix outline and bookmarking display logic 2025-11-17 22:21:03 +01:00
4562048de0 corrections for sp examples 2025-11-17 21:51:39 +01:00
6fbe20abfd update readme 2025-11-17 21:43:13 +01:00
c881b53ac6 add default nix build target 2025-11-17 21:38:34 +01:00
76cf70ec0c make no longer removes the target PDF when running thesis_% target 2025-11-17 20:57:26 +01:00
b4406bfd77 add nix build 2025-11-17 16:00:29 +01:00
24fbf789b9 change readme wording 2025-11-17 15:23:23 +01:00
cda7245997 fix datetime issues in nix envs 2025-11-17 15:22:08 +01:00
69272f6a35 add pdf embedding to documentation attachements examples 2025-11-17 14:16:06 +01:00
d038c7de14 switch to own pdf embedding implementation 2025-11-17 14:16:05 +01:00
a4643419ef implement tests for multipage pdf embedding 2025-11-17 14:16:05 +01:00
ab0c992dc0 add multipage pdf embedding 2025-11-17 14:16:02 +01:00
Matěj Žucha
5f17ee6f5c Fix title in English examples 2025-11-15 09:13:55 +01:00
Matěj Žucha
5b610ebd75 Add seminar thesis examples 2025-11-15 09:13:29 +01:00
3e5da83b08 remove nix build from readme 2025-11-14 19:03:10 +01:00
fc32808531 further detail the 'Building your own thesis' in readme 2025-11-14 19:00:05 +01:00
ae65a19a99 add makefile for packed builds 2025-11-14 18:52:50 +01:00
e77cc73f14 update thesis examples in readme 2025-11-14 18:43:58 +01:00
4d4f227a4f deduplicate content for example theses 2025-11-14 18:38:33 +01:00
6a187d775a clean up the build system 2025-11-14 17:44:47 +01:00
8c3fbce8a0 implement sp 2025-11-14 17:02:50 +01:00
da23dd94fc allow generating documents without abstract or disclaimer 2025-11-14 17:02:23 +01:00
b846fb2b7d Revert improved argument checking
It should not be in master yet (in an incomplete state).

This reverts commits d19a30a24a, 071696a786 and 7a2290c00e.
2025-11-11 21:37:04 +01:00
f8971eabe6 update makefile to bundle new thesis types 2025-11-11 21:22:53 +01:00
74df4253ca do some polishing on example documents 2025-11-11 21:21:12 +01:00
Matej-Zucha-TUL
aca613995e Update theses example content 2025-11-11 19:06:51 +01:00
d19a30a24a add automatically generated argument list to documentation 2025-11-11 18:38:23 +01:00
9c954f4f9c allow content for many new fields 2025-11-11 13:39:09 +01:00
071696a786 add documentation generation for type signatures 2025-11-11 12:05:03 +01:00
7a2290c00e add base for improved argument checking 2025-11-10 23:34:51 +01:00
62d398c807 make readme more accurate 2025-11-10 10:31:27 +01:00
0be681b0f0 add build for documentation pdf 2025-11-10 10:30:00 +01:00
30fed8c158 fix formatting issue 2025-11-09 23:00:05 +01:00
4a293f7405 add env zip dependency 2025-11-09 18:08:21 +01:00
1dfefea074 update readme 2025-11-09 18:06:37 +01:00
0f4d928172 add nix flake 2025-11-09 17:55:05 +01:00
6ce51e199f add prj document type 2025-11-06 13:55:32 +01:00
c755d36d44 fix assignment fallback calling logic 2025-11-06 13:51:25 +01:00
b9f91512cb remove unnecessary imports 2025-11-06 13:49:26 +01:00
a951de2391 delete assignment source files 2025-11-06 13:48:35 +01:00
3f824c6fbe remove bibliography and toc if there is no entry 2025-11-06 13:47:57 +01:00
8442e269b9 prepare for merging assignment and these example generation 2025-11-06 13:40:00 +01:00
6f7c8210b3 update readme 2025-11-06 13:31:03 +01:00
Matěj Žucha
544e3aeca1 Add blank files for all remaining theses types 2025-11-06 13:24:09 +01:00
434e01e80d small citation style fixes for cs 2025-11-04 22:19:01 +01:00
8ea283d4ea update citation styles 2025-11-01 16:19:35 +01:00
1d98975e81 add more citations tests 2025-11-01 16:19:01 +01:00
242eca8755 add other recommended non-breaking terms 2025-10-22 13:09:27 +02:00
a295b9b419 remove spaces at the end of lines 2025-10-21 22:18:45 +02:00
378bd509c9 improve auto-nbsp detection algorithm 2025-10-21 22:17:48 +02:00
bdbda1189f improve README wording a little 2025-10-21 20:46:14 +02:00
13465c8d78 expand documentation in README 2025-10-21 20:36:48 +02:00
7193b648f2 add remark that underline should not be used to examples 2025-10-20 19:20:32 +02:00
0c1f227c7f separate title pages in theses examples 2025-10-20 19:18:12 +02:00
e8796c7809 fallback to default pronouns in english 2025-10-20 19:15:25 +02:00
49320f1e02 disable font compensation for raw blocks 2025-10-20 18:30:29 +02:00
8d2dfb146d change the default text font to inter 2025-10-20 18:26:32 +02:00
f9cf4491eb remove first line indent for paragraphs 2025-10-17 11:53:45 +02:00
255ff918be add real author names to example assignment 2025-10-17 11:16:22 +02:00
425730c619 enable release profile for documentation 2025-10-16 22:49:31 +02:00
cea0718719 fix bibliography example and test files 2025-10-16 22:31:26 +02:00
5e7f5f92b2 rename citation styles folder 2025-10-16 22:29:07 +02:00
3bd64ec2b1 remove hayagriva 2025-10-16 22:25:40 +02:00
02de1672d3 add assignment example for bp cs 2025-10-16 22:21:04 +02:00
f33129f809 implement generation of assignment 2025-10-16 22:20:26 +02:00
dd6ecb5c9b add type signature type 2025-10-16 22:17:41 +02:00
9dcb466d84 add more citation tests
Co-authored-by: Michal Procházka <michal@prochazkaml.eu>
2025-10-16 20:39:48 +02:00
2916234223 update citation style file structure 2025-10-16 20:32:08 +02:00
b63706a8a5 adjust chapter citing and author names to better match čsn 690:2022 citation norm 2025-10-16 19:55:42 +02:00
eb60a4bb89 export title pages generation support 2025-10-16 19:53:06 +02:00
a2b749e43d start switching to hayagriva 2025-10-12 23:33:18 +02:00
c8d42664a9 switch to relative font sizing 2025-10-10 23:04:00 +02:00
497dbd270d adjust noto sans mono's size to match merriweather 2025-10-10 22:43:33 +02:00
c63864159a make abbreviations clickable 2025-10-10 20:17:55 +02:00
0ae7db2cd3 call bp/dp definitions only where necessary 2025-10-10 19:53:40 +02:00
79df0d4dd9 make bp and dp definitions cleaner 2025-10-10 19:41:12 +02:00
6e5604705e extract arguments and add title pages disabling 2025-10-10 17:42:03 +02:00
3822ce3a98 add footnote example 2025-10-10 14:45:22 +02:00
bfa2fedefb change to square brackets for citations according to consultation 2025-10-10 11:58:55 +02:00
8666604e8c change bundling system to allow for different language example theses 2025-10-10 09:04:31 +02:00
a0eb5f4ed0 remove breaks for certain terms 2025-10-10 09:04:23 +02:00
5397c85397 allow content in acknowledgement 2025-10-08 10:06:53 +02:00
72f5dd8372 make acknowledgement optional for bp and dp 2025-10-08 09:44:51 +02:00
Matej-Zucha-TUL
72c450c547 Add WIP English template for bp 2025-10-08 09:17:24 +02:00
Matej-Zucha-TUL
c398485af8 Develop cs template 2025-10-08 09:17:23 +02:00
Matej-Zucha-TUL
bcb3882254 Fix abstract language order for different lang settings 2025-10-08 09:17:23 +02:00
d9ab5e8ab1 include citation examples for templategen 2025-10-08 08:30:37 +02:00
b8502b5466 fix naming for study specialization 2025-10-07 22:34:19 +02:00
ca46ff32a8 update bp and dp examples 2025-10-07 22:23:29 +02:00
f7737687db prepare for tultemplategen bundling 2025-10-07 21:54:18 +02:00
6850224e84 stop versioning pdfs directly in git 2025-10-07 21:30:43 +02:00
Matej-Zucha-TUL
08bcc0672b Develop templates 2025-10-07 21:09:04 +02:00
211bdc54db Made DP and BP lowercase 2025-10-07 19:13:30 +02:00
Matej-Zucha-TUL
f8ebdfe1f8 Add makeshift command to run BP and DP example using the --root hack 2025-10-07 18:19:39 +02:00
Matej-Zucha-TUL
b5e1f1d663 Add BP and DP example in Czech 2025-10-07 18:12:23 +02:00
d8dc47e3b0 improve compliance with guidelines 2025-10-07 17:52:31 +02:00
3beac874c1 add dp to documentation 2025-10-07 14:05:05 +02:00
0dc0ed4249 make study branch optional for dp 2025-10-07 14:03:24 +02:00
5d763827e8 chagne document identifier for dp 2025-10-07 14:01:06 +02:00
7b3831f5fb add language entries for dp 2025-10-07 13:59:50 +02:00
89c3be0bf0 add base for dp 2025-10-07 13:56:16 +02:00
6e17d96b8b improve building and add example watcher to bundle 2025-10-07 12:57:00 +02:00
6d27bd5df5 add non-zipped bundling for templategen 2025-10-07 12:25:52 +02:00
178be2e174 colorize external links 2025-10-06 18:32:36 +02:00
a90543cdbd compensate mono font size 2025-10-06 18:21:55 +02:00
aeb112f5a1 give example.typ a better name 2025-10-06 18:02:36 +02:00
bf63657df3 add font tip to readme 2025-10-06 17:34:42 +02:00
3f53ed89ba minify data files 2025-10-06 17:26:57 +02:00
da11cd88fa rename author gender to author pronouns 2025-10-06 13:16:01 +02:00
d915b8cf27 add year of study to document info 2025-10-06 11:52:28 +02:00
afc1ee372f add author to acknowledgement 2025-10-06 11:24:25 +02:00
d478d63812 implement acknowledgement 2025-10-06 11:12:00 +02:00
527534f885 update example.typ 2025-10-03 21:19:37 +02:00
5c35389dca add attachments to example.typ 2025-10-03 19:28:00 +02:00
f22b16a803 add optional institute for supervisor and consultant entries 2025-10-03 19:02:31 +02:00
Matej-Zucha-TUL
f66f36d560 Add missing argument describtions 2025-10-03 12:01:14 +02:00
011ef2c950 add absolute url for mirror repo 2025-10-03 11:34:14 +02:00
2787bed48d fix Matěj damage 2025-10-03 11:09:23 +02:00
a691d84e1b implement attachments 2025-10-03 11:07:22 +02:00
Matej-Zucha-TUL
a0c75deba0 Change example document signature to reflect reality better 2025-10-03 09:26:49 +02:00
Matej-Zucha-TUL
1a7418d2cd Add optional consultant parameter 2025-10-03 09:25:37 +02:00
2e300ded3c add pronouns picking for english 2025-10-02 23:28:07 +02:00
0e9fbcdc93 update doc comment for the tultemplate2 function 2025-10-02 23:27:43 +02:00
bfe08ac9b4 fix some image/table list problems 2025-10-02 23:26:48 +02:00
8a76ee9e1e update documentation 2025-10-02 20:57:37 +02:00
d954a0e687 classic template fixes 2025-10-02 20:57:22 +02:00
eba0ec7826 add image and table listings 2025-10-02 20:39:26 +02:00
768ba54856 classic template fixes 2025-10-02 15:26:55 +02:00
85a6ed8d44 add study branch to info page 2025-10-02 14:11:14 +02:00
afe325da0a fix error on no author 2025-10-02 13:45:22 +02:00
cc079dd87d fix no bp document type on info page 2025-10-02 13:40:56 +02:00
08c7123041 fix incorrect panic message on supported genders 2025-10-02 13:39:20 +02:00
c786ec2a4a allow content abstract type 2025-10-02 13:34:15 +02:00
5773e9785b expand czech disclaimer genders 2025-10-02 13:31:14 +02:00
f31bcaddec fix some build mistakes 2025-10-02 12:11:34 +02:00
26d861b72a improve bibliography a bit 2025-10-01 22:34:31 +02:00
6bebe41d6e add citation tests 2025-10-01 22:25:35 +02:00
4e634e6ff9 document other arguments 2025-10-01 21:31:57 +02:00
b03978a2c0 add disclaimer base and bachelor to english 2025-10-01 21:31:34 +02:00
c41ac4bc77 prepare for more thesis types 2025-10-01 19:19:17 +02:00
1f75a74f61 disable not yet supported document types 2025-10-01 13:11:50 +02:00
5d17fa8fe3 add assignment page 2025-10-01 13:08:55 +02:00
Matej-Zucha-TUL
9657f4b75b Fix typo in Makefile 2025-10-01 13:07:13 +02:00
Matej-Zucha-TUL
cae85646e6 Add all faculties, add watch_example target 2025-10-01 13:04:51 +02:00
a5be430777 add abstract and disclaimer page 2025-10-01 09:40:18 +02:00
fd397003ba tests: add base and font tests 2025-09-26 11:36:52 +02:00
35cc041d6e classic: add disclaimer for bp 2025-09-26 11:17:10 +02:00
4dd974278a docs: extend documentation 2025-09-26 09:09:43 +02:00
8ef9bfb7ef classic: improve abbreviation spacing 2025-09-26 09:09:23 +02:00
ae84cdaeac remove unnecessary parameters from example file 2025-09-26 08:25:50 +02:00
5347a16cf1 improve title page layout and extract natural language to separate file 2025-09-26 08:25:12 +02:00
1faa0c6c93 add merriweather font and fix ofl files 2025-09-26 08:23:11 +02:00
438ca6d5c3 make the latex template style a bit more correct 2025-09-25 12:45:17 +02:00
100 changed files with 4875 additions and 353 deletions

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
*.ttf filter=lfs diff=lfs merge=lfs -text
*.otf filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
/*.pdf
/pack
/result
/target

190
Makefile
View File

@@ -1,38 +1,162 @@
.PHONY: view_example
view_example: example.pdf
xdg-open $<
.PHONY: example
example: example.pdf
BUILD_DIR := target
PACKS_ROOT := $(BUILD_DIR)/pack
PACKDIR := $(PACKS_ROOT)/tultemplate2
BUNDLEDIR := $(PACKS_ROOT)/bundle
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 $< $@
BUNDLE_THESES := bp_cs bp_en dp_cs dp_en prj_cs prj_en sp_cs sp_en
BUNDLE_TARGETS := $(TO_PACK:%=$(BUNDLEDIR)/%) $(BUNDLEDIR)/citations.bib $(BUNDLEDIR)/bp_cs.typ \
$(BUNDLE_THESES:%=$(BUNDLEDIR)/%.typ) $(BUNDLEDIR)/Makefile
PACK_TARGETS := $(TO_PACK:%=$(PACKDIR)/%) $(PACKDIR)/documentation.typ \
$(PACKDIR)/documentation.pdf $(PACKDIR)/citations.bib $(PACKDIR)/Makefile
TEMPLATE_SRCS := $(shell find template -type f)
%.pdf: %.typ $(TEMPLATE_SRCS)
typst compile --font-path template/fonts $<
# == MAIN TARGETS ==
.PRECIOUS: $(BUILD_DIR)/%.pdf
.PHONY: view_documentation
view_documentation: $(BUILD_DIR)/documentation.pdf
xdg-open $<
.PHONY: pack
pack: $(PACKDIR)/tultemplate2.zip
.PHONY: bundle
bundle: $(BUNDLE_TARGETS)
@echo "!! Bundles are made for tultemplategen and not for direct use !!"
.PHONY: watch_documentation
watch_documentation: $(BUILD_DIR)/documentation.pdf
xdg-open $< & typst watch --font-path template/fonts documentation.typ $<
.PHONY: thesis_%
thesis_%: $(BUILD_DIR)/%.pdf
xdg-open $<
.PHONY: documentation
documentation: $(BUILD_DIR)/documentation.pdf
.PHONY: clean
clean:
rm -rf target
# == ROOTS ==
$(BUILD_DIR):
mkdir $@
$(PACKS_ROOT): | $(BUILD_DIR)
mkdir $@
$(PACKDIR): | $(PACKS_ROOT)
mkdir $@
$(BUNDLEDIR): | $(PACKS_ROOT)
mkdir $@
# == UTILS ==
define minify_csl
cat $(1) | sed 's/^\s*\(.*\)$$/\1/' | tr -d '\n' > $(2)
endef
define minify_json
cat $(1) | jq -c > $(2)
endef
define replace_with_file_line
sed "s/$(1)/$$(sed '$(3)q;d' $(2))/g"
endef
# == DOCUMENTATION ==
$(BUILD_DIR)/documentation.pdf: documentation.typ $(TEMPLATE_SRCS) | $(BUILD_DIR)
typst compile --font-path template/fonts $< $@
# == THESES EXAMPLES ==
$(BUILD_DIR)/subs_%.txt: theses/%.typ | $(BUILD_DIR)
awk 'BEGIN{RS=""; ORS="\n\n"} NR>2{print}' $< > $@
$(BUILD_DIR)/header_%.txt: theses/%.typ
awk 'BEGIN{RS=""; ORS="\n\n"} NR<3{print}' $< > $@
$(BUILD_DIR)/content_%_cs.txt: $(BUILD_DIR)/subs_%_cs.txt theses/content_cs.typ
cat theses/content_cs.typ | \
$(call replace_with_file_line,{{ta}},$<,1) | $(call replace_with_file_line,{{tou}},$<,2) | \
awk 'BEGIN{RS=""; ORS="\n\n"} NR>2{print}' > $@
$(BUILD_DIR)/content_%_en.txt: $(BUILD_DIR)/subs_%_en.txt theses/content_en.typ
cat theses/content_en.typ | \
$(call replace_with_file_line,{{what}},$<,1) | \
awk 'BEGIN{RS=""; ORS="\n\n"} NR>2{print}' > $@
$(BUILD_DIR)/%.typ: $(BUILD_DIR)/header_%.txt $(BUILD_DIR)/content_%.txt | $(BUILD_DIR)
cat $^ > $@
$(BUILD_DIR)/%.pdf: $(BUILD_DIR)/%.typ $(TEMPLATE_SRCS) | $(BUILD_DIR)
typst compile --font-path template/fonts --root . $< $@
# == PACKS - clean builds for direct use ==
$(PACKDIR)/%: % | $(PACKDIR)
ln -f $< $@
$(PACKDIR)/template: | $(PACKDIR)
mkdir $@
$(PACKDIR)/template/LICENSE: LICENSE | $(PACKDIR)/template
ln -f $< $@
$(PACKDIR)/Makefile: packed.mk | $(PACKDIR)
ln -f $< $@
$(PACKDIR)/template/tul_citace.csl: template/tul_citace.csl | $(PACKDIR)/template
$(call minify_csl,$<,$@)
$(PACKDIR)/template/lang.json: template/lang.json | $(PACKDIR)/template
$(call minify_json,$<,$@)
$(PACKDIR)/template/%: template/% | $(PACKDIR)/template
@mkdir -p $(@D)
ln -f $< $@
$(PACKDIR)/%.pdf: $(BUILD_DIR)/%.pdf | $(PACKDIR)
ln -f $< $@
$(PACKDIR)/tultemplate2.zip: $(PACK_TARGETS) | $(PACKDIR)
rm -f $@
cd $(PACKS_ROOT) && zip -r tultemplate2.zip tultemplate2
# == BUNDLES - packs for tultemplategen ==
$(BUNDLEDIR)/template: | $(BUNDLEDIR)
mkdir $@
$(BUNDLEDIR)/template/LICENSE: LICENSE | $(BUNDLEDIR)/template
ln -f $< $@
$(BUNDLEDIR)/Makefile: templategen.mk | $(BUNDLEDIR)
ln -f $< $@
$(BUNDLEDIR)/template/tul_citace.csl: template/tul_citace.csl | $(BUNDLEDIR)/template
$(call minify_csl,$<,$@)
$(BUNDLEDIR)/template/lang.json: template/lang.json | $(BUNDLEDIR)/template
$(call minify_json,$<,$@)
$(BUNDLEDIR)/citations.bib: citations.bib | $(BUNDLEDIR)
ln -f $< $@
$(BUNDLEDIR)/template/%: template/% | $(BUNDLEDIR)/template
@mkdir -p $(@D)
ln -f $< $@
$(BUNDLEDIR)/%.typ: $(BUILD_DIR)/content_%.txt | $(BUNDLEDIR)
sed 's/\.\.\/template\//template\//' $< > $@
# == TESTS ==
include tests/make.mk

136
README.md
View File

@@ -1,17 +1,145 @@
# tultemplate2
Easy Typst template for TUL documents. Begin by compiling `example.typ` and reading it.
Easy Typst template for TUL documents. Begin by compiling `documentation.typ` and reading it.
## How to compile
## Recommended usage
It is recommended to use either:
- The on-line Typst editor (https://typst.app/play/) - use some zip build from releases
(https://git.zumepro.cz/tul/tultemplate2/releases).
- The `typst` CLI tool (available in Arch repos and Snap)
On Linux, with the `typst` command available, you can just run:
## Contributing
The development is done on our own Gitea instance
(over at https://git.zumepro.cz/tul/tultemplate2). We have a GitHub mirror, but don't actively
monitor it. We're sorry for this inconvenience, Gitea just gives us so many useful features.
If you wish to help with the development (or just want to ask us something), feel free to reach out
to the maintainer:
Ondřej Mekina <ondrej@mekina.cz>
## The goals of this template
We dream of a simple way for students to make documents. Of a workflow revolving not around
citations, fonts, paragraphs and other formal nonsense, but around the actual content of the
document.
We aim to provide a robust (but simple) framework to build official documents at TUL.
We want to check as much as we can on behalf of the user and stop the compilation of the document if
any formal rules could be broken. Our opinion is that the average user should not even have the
opportunity to break formal rules. And if they want to - they will have to dig a bit (or set
additional parameters in the template).
When we started developing this template, we cosmically underestimated the amount of effort we'd
have to put into this project. Since then we consulted teachers, executives, typographers and
previous TUL template developers. But even now we feel like we're far from perfect. So if you
think you could help us or give us any advice to make this project thrive, please **reach out**.
This project was inspired by Pavel Satrapa's TUL LaTeX bundle
(https://www.nti.tul.cz/~satrapa/vyuka/latex-tul/).
Our project aims to be a modern and more robust alternative. By rewriting in Typst, we have access
to scripting. So we can programmatically pull up some information, translation and abort the
compilation when necessary.
Oh and also... it's hella fast.
## How to build in CLI
> [!IMPORTANT]
> This repo uses git lfs to pull fonts. Please set it up (or download a packed build from releases).
> When running in CLI - you'll want to include the embedded fonts (or run using make):
> `typst compile --font-path template/fonts example.typ`
### Dependencies
- Standard `bash` for Makefile commands (`mkdir`, `rm`, `xdg-open`, `echo`, `cd`, `ln`, `awk`, `sed`, `cat`)
- `jq` for processing JSON files (is pretty standard on most GNU/Linux distros)
- `GNU Make` for Makefiles
- Typst command (`typst` on Snap / `typst` package on Arch-based repos - AUR not required)
- `zip` if you want to make packed builds (perhaps for the on-line editor)
or
- Nix (use `nix develop` to enter the development shell and you can skip dependency installation)
### Building your own thesis
> [!TIP]
> We **strongly** recommend to use the template package generator available at
> https://tulsablona.zumepro.cz/
The generator will help you generate the necessary headers (so you don't have to go error-by-error -
sadly, Typst does not yet support emitting multiple errors or warnings at once).
It will also give you some tips (like to upload the assignment PDF from STAG) on how to structure
the thesis. And at the end, it will generate a whole example document for you.
Now, if you don't want to use the generator, drop into the repo directory and run:
```sh
make pack
```
This will generate outputs at `target/pack/tultemplate2` and `target/pack/tultemplate2.zip`.
We recommend copying the files (either from the zip or the directory) somewhere else and (in there)
running:
```sh
make view_documentation
```
After you have created your own `filename.typ` you can run:
```sh
make view_filename
```
or
```sh
make watch_filename
```
The `Makefile` provided in the packed build is just an example... feel free to adjust it according
to your needs.
The packed builds also provide `documentation.pdf` such that you can jump into it straight away
or keep it around during the writing of your own thesis.
### Building documentation
The documentation PDF explains different concepts in Typst and in this template.
It's source code can be found in `documentation.typ`.
You can build (and view) it by running:
```sh
make
```
That will compile the example document and view it.
This will compile it once and open it using `xdg-open`.
### Building thesis examples
Thesis examples are in `theses`. In the files with names like `bp_en.typ` you can find the example
header for each thesis (and after that some spelling substitutions for the build system).
And in `theses/content_cs.typ` and `theses/content_en.typ` is the content for the theses.
Using:
```sh
make thesis_bp_cs
```
Will make and view an example bachelor's thesis in czech.
We also have (at the moment):
- `bp_en`
- `dp_cs`
- `dp_en`
- `prj_cs`
- `prj_en`

View File

@@ -3,7 +3,7 @@
title = "Q117858460 --- Wikidata{,} ",
year = "2025",
url = "https://www.wikidata.org/w/index.php?title=Q117858460&oldid=2404700455",
note = "[Online; cit. 24-Zář-2025]"
urldate = {2025-09-24},
}
@misc{ bibtex,
@@ -11,5 +11,5 @@
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]"
urldate = {2025-09-24},
}

View File

@@ -1,11 +1,13 @@
#import "template/template.typ": *
#show: tultemplate2.with(
"latex", "fm", "cs",
title: "Návod na použití Typst TUL šablony",
author: "Ondřej Mekina",
title: (cs: [Návod na použití Typst TUL šablony]),
author: [Ondřej Mekina, Matěj Žucha],
supervisor: [Ondřej Mekina],
)
#profile("release")
= Lehký úvod do Typstu a této šablony
Typst je profesionální sázecí nástroj podobný markdownu, LaTeXu/TeXu, groffu, atd.
@@ -31,7 +33,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 +73,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 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 +84,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.
@@ -92,7 +93,7 @@ opravdu hodně vám to usnadní práci.
// tohle je podnadpis :)
#heading(
level: 3,
level: 2,
range(1, 6).map((v) => range(1, v).map((_) => "pod").join("") + "nadpisy").join(", ") + ", ..."
)<chained_subheading>
@@ -101,11 +102,14 @@ Velmi jednoduché. Stačí na začátek řádku dát znak `=` kolikrát chcete.
= Nadpis
== Podnadpis
=== Podpodnadpis
==== už tomu asi rozumíte ...
A pak obsah
```
#highlight[
V rámci šablony classic lze použít nadpisy *maximálně* třetí úrovně -- jinak šablona vyhodí chybu.
]
== Zvýrazňování textu
Syntaxe je velmi podobná například markdownu. Stačí:
@@ -169,8 +173,7 @@ A některé funkce berou klasický obsah -- v těch je možné psát obsah jako
== Obrázky
Obrázky je možné vkládat samotné i třeba s popiskem.
Obrázek se vloží pomocí funkce `image`:
Obrázek se vloží pomocí funkce `image`.
Přidání popisku a zároveň zalistování obrázku v indexu (aby se na třeba dalo odkazovat) lze
udělat pomocí funkce `figure`.
@@ -192,6 +195,47 @@ Tady je praktická ukázka jednoduchého vložení obrázku s popiskem:
Logo *TUL*
])
Obrázky se zobrazí na začátku dokumentu v seznamu (pokud to daný typ dokumentu vyžaduje).
== Tabulky
Tabulky lze vytvářet takto:
```typst
#figure(table(
columns: 3,
table.header([], [*Sloupec 1*], [*Sloupec 2*]),
[*Řádek 1*], [a], [b],
[*Řádek 2*], [c], [d],
), caption: "Moje krásná tabulka")
```
#highlight[Hlavičku tabulky (první řádek) je dobré zabalit do funkce header (viz. výše)], to je
kvůli tomu, že Typst do vygenerovaného PDF souboru poté přidá metadata (například pro osoby se
zrakovým postižením).
#figure(table(
columns: 3,
table.header([], [*Sloupec 1*], [*Sloupec 2*]),
[*Řádek 1*], [a], [b],
[*Řádek 2*], [c], [d],
), caption: "Moje krásná tabulka")
Tabulky se zobrazí na začátku dokumentu v seznamu (pokud to daný typ dokumentu vyžaduje).
== Poznámky pod čarou
Poznámky pod čarou jsou způsob sdělení dodatečných informácí, které pro čtenáře běžně nebudou velmi
podstatné. Mohou sloužit například k upřesnění informací. #footnote[Nebo k doplnění technikálií]
Poznámka pod čarou se vytvoří následovně:
```typst
#footnote[Moje poznámka]
```
Šablona automaticky vytvoří čáru s barvou vaší fakulty a pod vloží poznámky na dané straně.
== Citace
Šablona podporuje správu citací pomocí standardního BibTeX @bibtex souboru, stejně jako
@@ -246,6 +290,79 @@ Tyto pokročilejší funkce v drtivé většině dokumentů vůbec není potřeb
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.
== Zkratky
LaTeX TUL šablona 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") 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ě používáte přímo v textu.
]
== Přílohy
V některých typech dokumentů budete chtít přidat přílohy. Přílohy se přikládají v různých podobách:
- Jako odkaz (URL/URI adresa)
- Zmínka externího souboru (například další soubor nahraný do systému)
- Přiložený obsah (vygenerovaný Typstem v tomto dokumentu -- je tedy součástí tohoto kódu)
- Externí PDF soubor přiložený jako obsah (jiný PDF dokument, vložený do příloh v kompletní
podobě -- to je dobré například do tisku, kde můžete přílohy vytisknout s dokumentem)
#highlight[
Přílohy lze definovat *pouze na jednom* místě v dokumentu, aby se zabránilo omylnému opakování
příloh. Přílohy doporučujeme definovat *na konci* souboru pro přehlednost.
]
Zde je ukázka definice příloh (je také použita na konci tohoto ukázkového souboru):
```typst
#attachments(
attach_link(
"Zdrojový kód této šablony",
"https://git.zumepro.cz/tul/tultemplate2"
),
attach_content(
"Testovací obsah vygenerovaný Typstem",
[Sem lze psát _stylovaný_ obsah.]
),
)
```
= 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.
@@ -273,11 +390,11 @@ Pokud funkci `profile` nezavoláte, pak šablone použije profil "debug".
=== Todo
Pomocí todo svému budoucímu můžete připomenout, že je něco potřeba dodělat. Funkce todo obsah
Pomocí `todo` svému budoucímu 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).
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([
@@ -308,3 +425,9 @@ Takhle si můžete předpřipravit délku odstavců a vyzkoušet si, jestli se r
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.
#attachments(
attach_link("Zdrojový kód této šablony", "https://git.zumepro.cz/tul/tultemplate2"),
attach_content("Testovací obsah vygenerovaný Typstem", [Sem lze psát _stylovaný_ obsah.]),
attach_pdf("Ukázkový PDF soubor s dvěma stranami", "tests/pdf_embedding_02.pdf"),
)

61
flake.lock generated Normal file
View File

@@ -0,0 +1,61 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1762482733,
"narHash": "sha256-g/da4FzvckvbiZT075Sb1/YDNDr+tGQgh4N8i5ceYMg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e1ebeec86b771e9d387dd02d82ffdc77ac753abc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

64
flake.nix Normal file
View File

@@ -0,0 +1,64 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
buildInputs = with pkgs; [ typst gnumake jq xdg-utils zip ];
name = "tultemplate2";
envSetup = ''
unset SOURCE_DATE_EPOCH
'';
build = target: pkgs.stdenv.mkDerivation {
inherit buildInputs target;
name = name + "-" + target;
src = ./.;
buildPhase = ''
${envSetup}
make target/$target
'';
installPhase = ''
mkdir $out
cp target/$target $out
'';
};
in
{
devShell = with pkgs; mkShell {
inherit buildInputs;
shellHook = envSetup;
};
} // (
with pkgs;
let
merge = buildInputs: name: stdenv.mkDerivation {
inherit name buildInputs;
dontUnpack = true;
installPhase = ''
mkdir $out
for input in $buildInputs
do
cp -R $input/. $out
done
'';
};
documentation = build "documentation.pdf";
theses = merge (builtins.map (v: build v) [
"bp_cs.pdf" "bp_en.pdf"
"dp_cs.pdf" "dp_en.pdf"
"prj_cs.pdf" "prj_en.pdf"
"sp_cs.pdf" "sp_en.pdf"
]) (name + "-" + "theses");
in
{
packages.documentation = documentation;
packages.theses = theses;
packages.default = merge [documentation theses] name;
}
)
);
}

13
packed.mk Normal file
View File

@@ -0,0 +1,13 @@
TYPST_FONTPATH := --font-path template/fonts
.PHONY: watch_%
watch_%: %.pdf
xdg-open $< & typst watch $(TYPST_FONTPATH) $*.typ
.PHONY: view_%
view_%: %.pdf
xdg-open $<
.PHONY: %.pdf
%.pdf: %.typ
typst compile $(TYPST_FONTPATH) $<

View File

@@ -18,10 +18,11 @@
}
"(" + abbrs.pairs().map((v) => { v.at(0) + ":\"" + v.at(1) + "\"" }).join(",") + ")"
});
let target_label = label("abbr_" + abbreviation);
if type(text) != type(none) {
text + " (" + abbreviation + ")";
link(target_label, text + " (" + abbreviation + ")");
} else {
abbreviation;
link(target_label, abbreviation)
}
}

189
template/arguments.typ Normal file
View File

@@ -0,0 +1,189 @@
#import "utils.typ": assert_type_signature, is_none, map_none, deref, assert_dict_has
#let arguments_structure = (
document: (
visual_style: "string",
faculty: "string",
language: "string",
type: "string",
),
title_pages: "string | boolean | none",
title: "dictionary[string : string | content] | none",
author: (
name: "string | content | none",
pronouns: "string | none",
programme: "dictionary[string : string | content] | none",
specialization: "dictionary[string : string | content] | none",
year_of_study: "string | content | none",
),
project: (
supervisor: "string | content | dictionary[string : string | content] | none",
consultant: "string | content | dictionary[string : string | content] | none",
),
abstract: (
content: "dictionary[string : string | content] | none",
keywords: "dictionary[string : string | content | array[string]] | none",
),
acknowledgement: "dictionary[string : string | content] | none",
assignment: "dictionary[string : any] | content | string | none",
citations: "string",
);
#let assignment_structure = (
personal_number: "string | content",
department: "string | content",
academical_year: "string | content",
content: "content",
);
#let check_arguments(args, structure: arguments_structure, namespace: none) = {
let check_arguments_dict(structure, args, argument_path) = {
for (key, value) in structure.pairs() {
argument_path.push(str(key).replace("_", " "));
if not key in args {
panic("invalid arguments definition");
}
let arg = args.at(key);
if type(value) == dictionary {
check_arguments_dict(value, arg, argument_path);
} else if type(value) == str {
assert_type_signature(arg, value, argument_path.join(" "));
} else {
panic("invalid arguments definition");
}
let _ = argument_path.pop();
}
}
check_arguments_dict(structure, args, if is_none(namespace) { () } else { (namespace,) });
}
#let get_arg_single(args, path) = {
let args = args;
for segment in path.split(".") {
if segment not in args {
panic("invalid argument query path: " + str(path));
}
args = args.at(segment);
}
args
}
#let get_arg(args, path) = {
if type(path) == array {
let res = ();
for path in path {
res.push(get_arg_single(args, path));
}
res
} else if type(path) == str {
get_arg_single(args, path)
} else {
panic("invalid argument path");
}
}
#let req_arg_single(args, path) = {
let arg = get_arg_single(args, path);
if is_none(arg) {
let panic_message = path.split(".").join(" ").replace("_", " ") + " is missing";
panic(panic_message);
}
arg
}
#let req_arg(args, path) = {
if type(path) == array {
let res = ();
for path in path {
res.push(req_arg_single(args, path));
}
res
} else if type(path) == str {
req_arg_single(args, path)
} else {
panic("invalid argument path");
}
}
#let map_arg_single(args, path, mapper) = {
let arg = get_arg(args, path);
map_none(arg, mapper)
}
#let map_arg(args, path, mapper) = {
if type(path) == array {
let res = ();
for path in path {
res.push(map_arg_single(args, path, mapper));
}
res
} else if type(path) == str {
map_arg_single(args, path, mapper)
} else {
panic("invalid argument path");
}
}
#let assignment_info(assignment) = {
if type(assignment) == dictionary {
assert_dict_has(assignment_structure.keys(), assignment, "assignment");
check_arguments(assignment, structure: assignment_structure, namespace: "assignment");
}
assignment
}
#let arguments(
document_info,
title_pages,
title,
author_info,
project_info,
abstract_info,
acknowledgement,
assignment,
citations,
) = {
(
document: document_info,
title_pages: title_pages,
title: title,
author: author_info,
project: project_info,
abstract: abstract_info,
acknowledgement: acknowledgement,
assignment: assignment_info(assignment),
citations: citations,
)
}
#let document_info(visual_style, faculty_abbreviation, language_abbreviation, document_type) = {
(
visual_style: visual_style,
faculty: faculty_abbreviation,
language: language_abbreviation,
type: document_type,
)
}
#let author_info(name, pronouns, programme, specialization, year_of_study) = {
(
name: name,
pronouns: pronouns,
programme: programme,
specialization: specialization,
year_of_study: year_of_study,
)
}
#let project_info(supervisor, consultant) = {
(supervisor: supervisor, consultant: consultant)
}
#let abstract_info(abstract, keywords) = {
(content: abstract, keywords: keywords)
}

171
template/attachments.typ Normal file
View File

@@ -0,0 +1,171 @@
#import "utils.typ": assert_type_signature, is_none
#import "lang.typ": get_lang_item
#let attachment_data = state("attachment_data");
#let attach_link(name, link) = {
assert_type_signature(link, "string", "attach link argument");
assert_type_signature(name, "string", "attach link name argument");
("link", link, name)
}
#let attach_content(name, inner_content) = {
assert_type_signature(inner_content, "content", "attach content argument");
assert_type_signature(name, "string", "attach content name argument");
("content", inner_content, name)
}
#let attach_pdf(name, filepath) = {
assert_type_signature(filepath, "string", "attach pdf argument");
assert_type_signature(name, "string", "attach pdf name argument");
("pdf", filepath, name)
}
#let attach_file_reference(name, filename) = {
assert_type_signature(filename, "string", "attach file reference filename argument");
assert_type_signature(name, "string", "attach file reference name argument");
("ref", filename, name)
}
#let make_content_anchor(idx) = {
"attachment_" + str(idx + 1)
}
#let generate_attachment_content(attachment, idx) = {
let attachment_type = attachment.at(0);
if attachment_type == "content" {
let anchor = make_content_anchor(idx);
[#metadata(attachment.at(1)) #label(anchor)];
}
}
#let generate_attachment_info(attachment, idx) = {
let attachment_type = attachment.at(0);
if type(attachment_type) != str {
panic("invalid attachment - wrap the attach using: attach_content, attach_pdf, ...");
}
if attachment_type == "content" {
let anchor = make_content_anchor(idx);
"(\"content\",\"" + anchor + "\",\"" + attachment.at(2) + "\")"
} else if attachment_type == "pdf" {
"(\"pdf\",\"" + attachment.at(1) + "\",\"" + attachment.at(2) + "\")"
} else if (
attachment_type == "pdf" or
attachment_type == "link" or
attachment_type == "ref"
) {
"(" + attachment.map((v) => { "\"" + v + "\"" }).join(",") + ",)"
} else {
panic("unknown attachment type '" + attachment_type + "'");
}
}
#let attachments(..attachments) = {
let attachments = attachments.pos();
assert_type_signature(
attachments, "array[array[string | content]] | array[string | content]", "attachments"
);
context {
if not is_none(attachment_data.get()) {
panic("re-definition of attachments - attachments must only be defined once");
}
if attachments.len() == 0 {
attachment_data.update("false");
} else {
attachment_data.update({
"(" + if type(attachments) == array and type(attachments.at(0)) == array {
for (idx, attachment) in attachments.enumerate() {
(generate_attachment_info(attachment, idx),)
}.join(", ")
} else {
generate_attachment_info(attachments, 0)
} + ",)"
})
if type(attachments) == array and type(attachments.at(0)) == array {
for (idx, attachment) in attachments.enumerate() {
generate_attachment_content(attachment, idx);
}
} else {
generate_attachment_content(attachments, 0);
}
}
}
}
#let list_entry(language, entry, is_embedded) = {
let entry_type = entry.at(0);
entry.at(2);
if entry_type == "link" {
": ";
link(entry.at(1));
} else if entry_type == "ref" {
": soubor ";
raw(entry.at(1));
}
if is_embedded {
text(
" (" + get_lang_item(language, "attached_bellow") + ")",
style: "italic",
fill: black.lighten(50%),
);
}
}
#let attachment_list(language) = {
context {
let data = attachment_data.get();
if is_none(data) {
return;
}
let data = eval(data);
if data == false {
return;
}
heading(get_lang_item(language, "attachments"), numbering: none);
// listing
let has_embedded = false;
let enum_items = ();
for attachment in data {
let attachment_type = attachment.at(0);
let is_embedded = false;
if attachment_type == "content" or attachment_type == "pdf" {
has_embedded = true;
is_embedded = true;
}
enum_items.push(list_entry(language, attachment, is_embedded));
}
enum(..enum_items.map((v) => { enum.item(v) }), spacing: 1em);
if has_embedded {
pagebreak(weak: true);
}
// embedded
set page(footer: none);
for (idx, attachment) in data.enumerate() {
let attachment_type = attachment.at(0);
if attachment_type == "content" {
heading(
level: 2,
get_lang_item(language, "attachment") + " " + str(idx + 1),
numbering: none,
outlined: false,
);
query(label(attachment.at(1))).at(0).value;
} else if attachment_type == "pdf" {
import "./pdf.typ": embed_full
page(place(center + horizon, heading(
level: 2,
get_lang_item(language, "attachment") + " " +
str(idx + 1) + " " +
get_lang_item(language, "next_page_attachment"),
numbering: none,
outlined: false,
)), margin: 0em);
set page(margin: 0em);
embed_full(read("../" + attachment.at(1), encoding: none));
}
}
}
}

View File

@@ -1,28 +1,28 @@
<?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>ISO-690 (numeric, Czech)</title>
<id>-----</id>
<link href="" rel="self"/>
<link href="" rel="documentation"/>
<title>ISO-690 (numeric, English)</title>
<id>http://www.zotero.org/styles/iso690-numeric-en</id>
<link href="https://git.zumepro.cz/tul/tultemplate2/src/branch/master/template/citation_styles/iso690-numeric-square_brackets" rel="self"/>
<link href="http://www.zotero.org/styles/iso690-numeric-en" rel="template"/>
<author>
<name>-----</name>
<email>-----</email>
<name>Ondřej Mekina</name>
<email>ondrej@mekina.cz</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>
<summary>Style based on ISO 690:2010(E), V1.1, square brackets</summary>
<updated>2025-10-16T20:31:00+01: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="no date">[no date]</term>
<term name="in">in</term>
<term name="online">online</term>
<term name="accessed">citováno</term>
<term name="retrieved">Dostupné</term>
<term name="from">z</term>
<term name="accessed">accessed</term>
<term name="retrieved">Available</term>
<term name="from">from</term>
</terms>
</locale>
<macro name="author">
@@ -221,11 +221,11 @@
<choose>
<if variable="URL">
<group prefix=" [" suffix="]">
<text term="accessed" suffix=" "/>
<text term="accessed" text-case="capitalize-first"/>
<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-part name="day" prefix="&#160;"/>
<date-part name="month" prefix="&#160;"/>
<date-part name="year" prefix="&#160;"/>
</date>
</group>
</if>
@@ -297,7 +297,7 @@
<sort>
<key variable="citation-number"/>
</sort>
<layout prefix="(" suffix=")" delimiter=", ">
<layout prefix="[" suffix="]" delimiter=", ">
<group delimiter=", ">
<text variable="citation-number"/>
<group>
@@ -312,7 +312,7 @@
<key variable="citation-number"/>
</sort>
<layout>
<text variable="citation-number" display="left-margin" suffix=". "/>
<text variable="citation-number" display="left-margin" prefix="[" suffix="]"/>
<choose>
<if type="book map" match="any">
<group display="right-inline">
@@ -486,9 +486,6 @@
<group display="right-inline">
<text macro="archive"/>
</group>
<group display="right-inline">
<text macro="abstract"/>
</group>
<group display="right-inline">
<text macro="note"/>
</group>

View 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>ČSN ISO 690:2022 (TUL)</title>
<id>https://git.zumepro.cz/tul/tultemplate2/src/branch/master/template/tul_citace.csl</id>
<link href="https://git.zumepro.cz/tul/tultemplate2/src/branch/master/template/citation_styles/tul-csn690-numeric-square_brackets" rel="self"/>
<link href="http://www.zotero.org/styles/iso690-numeric-en" rel="template"/>
<author>
<name>Ondřej Mekina</name>
<email>ondrej@mekina.cz</email>
</author>
<category citation-format="numeric"/>
<category field="generic-base"/>
<summary>Citační styl založen na ČSN ISO 690:2022 (numeric, hranaté závorky), upraven pro použití na Technické Univerzitě v Liberci</summary>
<updated>2025-10-16T20:31:00+01: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">[bez data]</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="first" 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="always">
<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=". " font-style="italic"/>
<choose>
<if variable="URL">
<text term="online" text-case="capitalize-first" suffix=". "/>
</if>
</choose>
<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" 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" font-style="italic" suffix="."/>
</else-if>
<else>
<text variable="title" font-style="italic" suffix="."/>
</else>
</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=".&#160;"/>
<date-part name="month" form="numeric" suffix=".&#160;"/>
<date-part name="year"/>
</date>
</if>
</choose>
</macro>
<macro name="edition">
<text variable="edition" form="long"/>
</macro>
<macro name="publisher-group">
<group delimiter=":&#160;">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
</macro>
<macro name="issue">
<group delimiter=", ">
<text variable="volume" prefix="Svazek&#160;"/>
<choose>
<if variable="volume">
<text variable="issue" prefix="č.&#160;"/>
<text variable="page" prefix="s.&#160;"/>
</if>
<else-if variable="issue">
<text variable="issue" prefix="Č.&#160;"/>
<text variable="page" prefix="s.&#160;"/>
</else-if>
<else>
<text variable="page" prefix="S.&#160;"/>
</else>
</choose>
</group>
</macro>
<macro name="accessed">
<choose>
<if variable="URL">
<group prefix=" [" suffix="]">
<text term="accessed"/>
<date variable="accessed">
<date-part name="year" prefix="&#160;"/>
<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="&#160;p"/>
</if>
<else-if type="chapter paper-conference article-newspaper" match="any">
<text variable="page" prefix="str.&#160;"/>
</else-if>
<else-if type="report patent" match="any">
<text variable="page" suffix="&#160;p"/>
</else-if>
</choose>
</macro>
<macro name="isbn">
<text variable="ISBN" prefix="ISBN&#160;"/>
</macro>
<macro name="doi">
<text variable="DOI" prefix="DOI&#160;"/>
</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=":&#160;"/>
<text variable="URL"/>
</group>
</if>
</choose>
</if>
</choose>
</macro>
<macro name="archive">
<group delimiter=":&#160;">
<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=".&#160;" 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" prefix="[" 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="publisher-group" suffix=", "/>
<text macro="date" suffix=". "/>
<text macro="url" suffix=". "/>
<text macro="accessed" suffix=". "/>
</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="date" suffix=". "/>
<text macro="number" 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="note"/>
</group>
</layout>
</bibliography>
</style>

17
template/classic/bp.typ Normal file
View File

@@ -0,0 +1,17 @@
#import "../arguments.typ": req_arg, get_arg
#import "../utils.typ": assert_dict_has, is_none
#import "common.typ": mainpage, assignment, external_title_pages
#let bp(args) = {
let language = req_arg(args, "document.language");
let programme = req_arg(args, "author.programme");
assert_dict_has((language,), programme, "study programme");
let specialization = req_arg(args, "author.specialization");
assert_dict_has((language,), specialization, "study specialization");
if language == "cs" {
let _ = req_arg(args, "author.pronouns");
}
mainpage(args);
assignment(args);
}

View File

@@ -0,0 +1,71 @@
// 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, assert_dict_has, is_none
#import "../arguments.typ": req_arg, map_arg, get_arg
#import "common.typ": default_styling, external_title_pages
// thesis types
#import "bp.typ": bp
#import "dp.typ": dp
#import "prj.typ": prj
#import "sp.typ": sp
#import "other.typ": other_title_page, other_base
#import "thesis_base.typ": thesis_base, thesis_base_title_pages
#let document_types = (
"bp": (bp, thesis_base, thesis_base_title_pages),
"dp": (dp, thesis_base, thesis_base_title_pages),
"prj": (prj, thesis_base, thesis_base_title_pages),
"sp": (sp, thesis_base.with(
show_disclaimer: false,
require_abstract: false,
), thesis_base_title_pages),
"other": (other_title_page, other_base, (args) => {}),
)
#let prep_args(args) = {
let language = req_arg(args, "document.language");
// argument pre-checking
assert_in_dict(req_arg(args, "document.type"), document_types, "document type");
map_arg(args, "title", (v) => assert_dict_has((language,), v, "title"));
map_arg(args, "author.programme", (v) => assert_dict_has((language,), v, "study programme"));
map_arg(
args, "author.specialization", (v) => assert_dict_has((language,), v, "study specialization")
);
map_arg(
args, "acknowledgement", (v) => assert_dict_has((language,), v, "acknowledgement content")
);
args.assignment = map_arg(args, "assignment", (v) => {
if type(v) == str {
"../../" + v
} else {
v
}
});
args.citations = map_arg(args, "citations", (v) => "../../" + v);
args.title_pages = map_arg(args, "title_pages", (v) => "../../" + v);
args
}
#let template_classic(args, content) = {
let args = prep_args(args);
if not is_none(get_arg(args, "title_pages")) {
external_title_pages(req_arg(args, "title_pages"));
document_types.at(req_arg(args, "document.type")).at(1)(args, content);
} else {
document_types.at(req_arg(args, "document.type")).at(0)(args);
document_types.at(req_arg(args, "document.type")).at(1)(args, content);
}
}
#let title_pages_classic(args) = {
let args = prep_args(args);
document_types.at(req_arg(args, "document.type")).at(0)(args);
document_types.at(req_arg(args, "document.type")).at(2)(args);
}

519
template/classic/common.typ Normal file
View File

@@ -0,0 +1,519 @@
#import "../theme.typ": faculty_logotype, tul_logomark, faculty_color
#import "../lang.typ": get_lang_item, set_czech_nonbreakable_terms
#import "../utils.typ": is_none, assert_dict_has, has_all_none, map_none
#import "../arguments.typ": req_arg, get_arg
#let base_font = "Inter";
#let mono_font = "Noto Sans Mono";
#let serif_font = "Merriweather";
#let tul_logomark_size = 6.5em;
// COUNTERS
#let image_count = counter("image_count");
#let table_count = counter("table_count");
// TYPST ELEMENT STYLING
#let default_styling(flip_bonding, faculty_color, content, language) = {
// 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: base_font);
set par(justify: true);
if language == "cs" {
content = set_czech_nonbreakable_terms(content);
}
// figures
let figure_numbering(realcount, c) = {
context realcount.step();
context numbering("1. 1", counter(heading).get().at(0), c)
};
show figure.where(kind: image): set figure(numbering: figure_numbering.with(image_count));
show figure.where(kind: table): set figure(numbering: figure_numbering.with(table_count));
show figure.where(kind: table): set figure.caption(position: top);
show figure: it => {
block(it, above: 2em, below: 2em);
}
set image(width: 80%);
// 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 => {
// reset figure counters
context counter(figure.where(kind: image)).update(0);
context counter(figure.where(kind: table)).update(0);
pagebreak(weak: true);
v(2cm);
it
};
show heading.where(): it => {
if it.level > 3 {
panic("maximum allowed heading level is 3");
} else {
it
}
}
// other
show raw.where(block: false): set text(font: mono_font, size: 1.25em);
show raw.where(block: true): it => {
block(it, fill: rgb("#eee"), inset: 1em)
};
show link: it => {
if type(it.dest) == label or type(it.dest) == location {
it;
} else {
text(it, fill: faculty_color);
}
}
set highlight(fill: faculty_color.lighten(90%));
set line(stroke: (paint: faculty_color, thickness: .7pt), length: 100%);
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 person_info(record, item_name) = {
if is_none(record) {
none
} else if type(record) == str or type(record) == content {
record
} else if type(record) == dictionary {
if "name" in record {
record.at("name");
if "institute" in record {
text("\n " + record.at("institute"), style: "italic")
}
} else {
let panic_message = (
item_name + " name is required (or try not specifying " + item_name + " at all)"
);
panic(panic_message);
}
} else {
let panic_message = "invalid " + item_name + " - expected a string or a dictionary";
panic(panic_message);
}
}
#let info_base(
faculty_id,
language,
display_document_type,
title,
info_fields,
show_city: true,
) = {
let info_name_value_padding = 5em;
let info_name_min_width = 10em;
let gutter = .7em;
// document type
if display_document_type != "other" and display_document_type != "other_asgn" {
text(get_lang_item(language, display_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);
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,
gutter: gutter,
..info_fields.filter((v) => { type(v.at(1)) != type(none) }).map((v) => {
(
align(top, 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 + gutter);
if show_city {
text(get_lang_item(language, "city") + " " + str(datetime.today().year()), font: base_font);
}
}
}
#let info_mainpage(
faculty_id,
language,
document_type,
title, author, supervisor, consultant, study_programme, study_specialization, year_of_study,
) = {
info_base(faculty_id, language, document_type, title, (
("author", author, true),
("supervisor", person_info(supervisor, "supervisor"), false),
("consultant", person_info(consultant, "consultant"), false),
("study_programme", study_programme, false),
("study_specialization", study_specialization, false),
("year_of_study", year_of_study, false),
));
}
#let info_assignment(
faculty_id,
language,
document_type,
title, author, personal_number, study_programme, department, academical_year,
) = {
info_base(faculty_id, language, document_type + "_asgn", title, (
("names", author, true),
("personal_number", personal_number, false),
("study_programme", study_programme, false),
("assigning_department", department, false),
("academical_year", academical_year, false),
), show_city: false);
}
// MAINPAGE
#let mainpage(args) = {
let (
language, document_type, faculty,
title, author, supervisor, consultant, study_programme, study_specialization, year_of_study,
) = get_arg(args, (
"document.language",
"document.type",
"document.faculty",
"title",
"author.name",
"project.supervisor",
"project.consultant",
"author.programme",
"author.specialization",
"author.year_of_study",
));
set text(font: base_font);
set page(margin: 2cm);
pagebreak(weak: true);
if has_all_none((
document_type, title, author, supervisor, consultant, study_programme,
)) {
place(center + horizon, align(left, faculty_logotype(faculty_id, language)));
} else {
header(faculty, language);
align({
info_mainpage(
faculty, language, document_type, map_none(title, (v) => v.at(language)),
author, supervisor, consultant, map_none(study_programme, (v) => v.at(language)),
map_none(study_specialization, (v) => v.at(language)), year_of_study,
);
v(5em);
}, bottom);
}
}
#let assignmentpage(args, language, document_type, faculty, title, author, programme, content) = {
let (personal_number, department, academical_year) = req_arg(args, (
"personal_number", "department", "academical_year",
));
set heading(bookmarked: false, outlined: false);
set text(font: base_font);
set page(margin: 2cm);
pagebreak(weak: true);
header(faculty, language);
info_assignment(
faculty, language, document_type, title.at(language), author, personal_number,
programme.at(language), department, academical_year,
);
show heading: it => {
block(it, above: 1em, below: 1em);
}
content;
}
// _ EMBEDDED
#let pdfembed(path) = {
import "../pdf.typ": embed_full
embed_full(read(path, encoding: none));
}
// ASSIGNMENT PAGE
#let assignment(args, show_fallback: true) = {
if is_none(get_arg(args, "assignment")) {
if not show_fallback {
return;
}
page(
place(center + horizon, text(
get_lang_item(req_arg(args, "document.language"), "place_assignment"),
fill: red,
size: 3em,
font: base_font,
weight: "bold",
)),
margin: 0em,
footer: none,
);
return;
}
let assignment = req_arg(args, "assignment");
if type(assignment) == str {
pdfembed(req_arg(args, "assignment"));
} else if type(assignment) == content {
req_arg(args, "assignment");
} else if type(assignment) == dictionary {
assignmentpage(
assignment,
..req_arg(args, (
"document.language", "document.type", "document.faculty", "title", "author.name",
"author.programme",
)),
req_arg(assignment, "content"),
);
}
}
// EXTERNAL TITLE PAGES
#let external_title_pages(path) = {
pdfembed(path);
}
// DISCLAIMER PAGE
#let disclaimer(args) = {
import "../lang.typ": disclaimer
let (language, faculty, disclaimer_type, author) = req_arg(args, (
"document.language",
"document.faculty",
"document.type",
"author.name",
));
let author_pronouns = get_arg(args, "author.pronouns");
heading(get_lang_item(language, "disclaimer"), numbering: none, outlined: false);
par(
text(disclaimer(language, disclaimer_type, author_pronouns))
);
v(5em);
grid(
columns: 2,
gutter: 1em,
block(
text(datetime.today().display(get_lang_item(language, "date")), lang: "cs"), width: 100%
),
text(author),
);
}
// ACKNOWLEDGEMENT PAGE
#let acknowledgement(args) = {
let content = get_arg(args, "acknowledgement");
let (language, author) = req_arg(args, ("document.language", "author.name"));
if is_none(content) {
return;
}
heading(get_lang_item(language, "acknowledgement"), numbering: none, outlined: false);
par(content.at(language));
v(2em);
align(right, author);
}
// ABSTRACT
#let display_keywords(keywords) = {
if type(keywords) == array {
keywords.join(", ")
} else if type(keywords) == str or type(keywords) == content {
keywords
}
}
#let abstract(language, args, require: true) = {
if not require and is_none(get_arg(args, "abstract.content")) {
return;
}
heading(
text(req_arg(args, "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(req_arg(args, "abstract.content").at(language));
let keywords = get_arg(args, "abstract.keywords");
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);
display_keywords(keywords.at(language))
}
}
// _ OUTLINE FIGURE INNER
#let _outline_figure_inner(selector, title, body_mapper) = {
let entry(selector, element) = {
link(
element.location(),
grid(
columns: 3,
gutter: .5em,
stack(
dir: ltr,
text(numbering(
"1.1",
counter(heading).at(element.location()).at(0),
counter(selector).at(element.location()).at(0),
)),
h(.5em),
text(body_mapper(element)),
),
box(repeat([.], gap: 0.15em)),
str(element.location().page()),
),
)
}
heading(title, numbering: none);
for el in query(figure.where(kind: selector)) {
if is_none(el.caption) {
continue;
}
entry(figure.where(kind: selector), el);
}
}
// _ FIGURE OUTLINE
#let _figure_outline(realcount, target, title) = {
context {
if realcount.final().at(0) == 0 {
return;
}
_outline_figure_inner(target, title, (it) => it.caption.body);
}
}
// IMAGE LIST
#let imagelist(language) = {
_figure_outline(image_count, image, get_lang_item(language, "image_list"));
}
// TABLE LIST
#let tablelist(language) = {
_figure_outline(table_count, table, get_lang_item(language, "table_list"));
}
// 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)
#label("abbr_" + a.at(0))
]
}),
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);
};
context {
if query(heading.where(outlined: true)).len() > 0 {
outline(title: get_lang_item(language, "toc"));
}
}
}
// BIBLIOGRAPHY
#let bibliogr(args) = {
let (language, citations_file) = req_arg(args, ("document.language", "citations"));
let styles = (
"cs": "../citations/tul-csn690-numeric-square_brackets.csl",
"en": "../citations/iso690-numeric-square_brackets.csl",
);
let style = styles.at(language);
context {
if query(ref.where(element: none)).len() > 0 {
bibliography(
citations_file,
style: style,
title: get_lang_item(language, "bibliography"),
);
}
}
}

18
template/classic/dp.typ Normal file
View File

@@ -0,0 +1,18 @@
#import "../arguments.typ": req_arg, get_arg, map_arg
#import "../utils.typ": assert_dict_has, is_none
#import "common.typ": mainpage, assignment, external_title_pages
#let dp(args) = {
let language = req_arg(args, "document.language");
let programme = req_arg(args, "author.programme");
assert_dict_has((language,), programme, "study programme");
map_arg(args, "author.specialization", (v) => {
assert_dict_has((language,), v, "study specialization");
});
if language == "cs" {
let _ = req_arg(args, "author.pronouns");
}
mainpage(args);
assignment(args);
}

View File

@@ -0,0 +1,38 @@
#import "../lang.typ": get_lang_item
#import "common.typ": (
mainpage,
default_styling,
assignment,
disclaimer,
abstract,
toc,
abbrlist,
imagelist,
tablelist,
bibliogr,
)
#import "../attachments.typ": attachment_list
#import "../utils.typ": is_none, assert_not_none, assert_dict_has, assert_in_arr
#import "../arguments.typ": req_arg
#import "../theme.typ": faculty_color
#let other_title_page(args) = {
let (language, title) = req_arg(args, ("document.language", "title"));
assert_dict_has((language,), title, "title");
mainpage(args);
}
#let other_base(args, content) = {
let (language, title) = req_arg(args, ("document.language", "title"));
default_styling(true, faculty_color(req_arg(args, "document.faculty")), {
toc(language);
tablelist(language);
imagelist(language);
abbrlist(language);
pagebreak(to: "even", weak: true);
content;
bibliogr(args);
attachment_list(language);
}, language);
}

17
template/classic/prj.typ Normal file
View File

@@ -0,0 +1,17 @@
#import "../arguments.typ": req_arg, get_arg
#import "../utils.typ": assert_dict_has, is_none
#import "common.typ": mainpage, assignment, external_title_pages
#let prj(args) = {
let language = req_arg(args, "document.language");
let programme = req_arg(args, "author.programme");
assert_dict_has((language,), programme, "study programme");
let specialization = req_arg(args, "author.specialization");
assert_dict_has((language,), specialization, "study specialization");
if language == "cs" {
let _ = req_arg(args, "author.pronouns");
}
mainpage(args);
assignment(args, show_fallback: false);
}

19
template/classic/sp.typ Normal file
View File

@@ -0,0 +1,19 @@
#import "../arguments.typ": req_arg, get_arg, map_arg
#import "../utils.typ": assert_dict_has
#import "common.typ": mainpage, assignment
#let sp(args) = {
let language = req_arg(args, "document.language");
map_arg(args, "author.programme", (v) => {
assert_dict_has((language,), v, "study programme");
});
map_arg(args, "author.specialization", (v) => {
assert_dict_has((language,), v, "study specialization");
});
if language == "cs" {
let _ = req_arg(args, "author.pronouns");
}
mainpage(args);
assignment(args, show_fallback: false);
}

View File

@@ -0,0 +1,52 @@
#import "../theme.typ": faculty_color
#import "../arguments.typ": get_arg, req_arg
#import "../utils.typ": is_none, assert_dict_has
#import "common.typ": (
default_styling,
disclaimer,
abstract,
acknowledgement,
toc,
tablelist,
imagelist,
abbrlist,
bibliogr,
)
#import "../attachments.typ": attachment_list
#let force_langs = ("cs", "en");
#let thesis_base(args, content, show_disclaimer: true, require_abstract: true) = {
assert_dict_has(force_langs, req_arg(args, "title"), "title");
if require_abstract {
assert_dict_has(force_langs, req_arg(args, "abstract.content"), "abstract");
assert_dict_has(force_langs, req_arg(args, "abstract.keywords"), "keywords");
}
let language = req_arg(args, "document.language");
default_styling(false, faculty_color(req_arg(args, "document.faculty")), {
if show_disclaimer and is_none(get_arg(args, "title_pages")) {
disclaimer(args);
}
abstract("cs", args, require: require_abstract);
abstract("en", args, require: require_abstract);
acknowledgement(args);
toc(language);
tablelist(language);
imagelist(language);
abbrlist(language);
pagebreak(weak: true);
content;
bibliogr(args);
attachment_list(language);
}, language);
}
#let thesis_base_title_pages(args) = {
let language = req_arg(args, "document.language");
default_styling(false, faculty_color(req_arg(args, "document.faculty")), {
if is_none(get_arg(args, "title_pages")) {
disclaimer(args);
}
}, language);
}

Binary file not shown.

View File

@@ -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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

BIN
template/fonts/inter/Inter-ThinItalic.otf (Stored with Git LFS) Normal file

Binary file not shown.

View 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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

BIN
template/fonts/merriweather/Merriweather-UltraBold.ttf (Stored with Git LFS) Normal file

Binary file not shown.

View 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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

View 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.

168
template/lang.json Normal file
View File

@@ -0,0 +1,168 @@
{
"cs": {
"author": "Autor",
"authors": "Autoři",
"supervisor": "Vedoucí práce",
"consultant": "Konzultant práce",
"study_programme": "Studijní program",
"study_specialization": "Specializace",
"year_of_study": "Ročník",
"names": "Jméno a příjmení",
"assigning_department": "Zadávající katedra",
"personal_number": "Osobní číslo",
"academical_year": "Akademický rok",
"bp": "Bakalářská práce",
"bp_asgn": "Zadání bakalářské práce",
"dp": "Diplomová práce",
"dp_asgn": "Zadání diplomové práce",
"prj": "Projekt",
"prj_asgn": "Zadání projektu",
"sp": "Semestrální práce",
"sp_asgn": "Zadání semestrální práce",
"city": "Liberec",
"toc": "Obsah",
"bibliography": "Použitá literatura",
"disclaimer": "Prohlášení",
"disclaimer_content": "Prohlašuj{g:i|i|eme}, že {svůj} {práce:tu} js{g:em|em|me} vypracoval{g:|a|i} samostatně jako původní dílo s použitím uvedené literatury a na základě konzultací s vedoucím {{g:mé|mé|naší}} {práce:té} a konzultantem.\n\nJs{g:em|em|me} si vědom{g:|a|i} toho, že na {{g:moji|moji|naši}} {práce:tu} se plně vztahuje zákon č. 121/2000 Sb., o právu autorském, zejména § 60 školní dílo.\n\nBer{g:u|u|eme} na vědomí, že Technická univerzita v Liberci nezasahuje do {g:mých|mých|našich} autorských práv užitím {{g:mé|mé|naší}} {práce:té} pro vnitřní potřebu Technické univerzity v Liberci.\n\nUžij{g:i|i|eme}-li {práce:tu} nebo poskytn{g:u|u|eme}-li licenci k {jejímu} využití, js{g:em|em|me} si vědom{g:|a|i} povinnosti informovat o této skutečnosti Technickou univerzitu v Liberci; v tomto případě má Technická univerzita v Liberci právo od{g:e|e|} {g:mne|mne|nás} 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šuj{g:i|i|eme}, že text elektronické podoby práce vložený do IS/STAG se shoduje s textem tištěné podoby práce.\n\nBer{g:u|u|eme} na vědomí, že {{g:můj|můj|naše}} {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\nJs{g:em|em|me} si vědom{g:|a|i} 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",
"naše": "naše",
"naši": "naši",
"naší": "naší",
"mé": "mé",
"můj": "moje",
"svůj": "svoji",
"jejímu": "jejímu",
"zveřejněn": "zveřejněna"
},
"dp": {
"práce:ta": "diplomová práce",
"práce:tu": "diplomovou práci",
"práce:té": "diplomové práce",
"moji": "moji",
"naše": "naše",
"naši": "naši",
"naší": "naší",
"mé": "mé",
"můj": "moje",
"svůj": "svoji",
"jejímu": "jejímu",
"zveřejněn": "zveřejněna"
},
"prj": {
"práce:ta": "projekt",
"práce:tu": "projekt",
"práce:té": "projektu",
"moji": "můj",
"naše": "náš",
"naši": "náš",
"naší": "náš",
"mé": "mého",
"můj": "můj",
"svůj": "svůj",
"jejímu": "jeho",
"zveřejněn": "zveřejněn"
}
},
"date": "[day]. [month]. [year]",
"abstract": "Abstrakt",
"acknowledgement": "Poděkování",
"keywords": "Klíčová slova",
"abbrs": "Seznam zkratek",
"image_list": "Seznam obrázků",
"table_list": "Seznam tabulek",
"attachments": "Přílohy",
"attachment": "Příloha",
"next_page_attachment": "začíná na další straně",
"attached_bellow": "dále přiloženo",
"place_assignment": "Sem vložte zadání",
"break_rules": {
"space_after": [
"((?i)[kosuvzai])",
"(tj|tzv|tzn|např)\\."
],
"nonbreaking_terms": [
"(s\\. r\\. o|a\\. s|v\\. o\\. s)\\.",
"č\\. ([pe]|ev)\\.",
"ev?\\. č\\.",
"(?i)Technická univerzita v Liberci\\b",
"(?i)Česká republika\\b"
]
}
},
"en": {
"author": "Author",
"authors": "Authors",
"supervisor": "Supervisor",
"consultant": "Consultant",
"study_programme": "Study programme",
"study_specialization": "Specialization",
"year_of_study": "Year of study",
"names": "Name",
"assigning_department": "Assigning department",
"personal_number": "Personal number",
"academical_year": "Academical year",
"bp": "Bachelor thesis",
"bp_asgn": "Bachelor thesis assignment",
"dp": "Diploma thesis",
"dp_asgn": "Diploma thesis assignment",
"prj": "Project",
"prj_asgn": "Project assignment",
"sp": "Term paper",
"sp_asgn": "Term paper assignment",
"city": "Liberec",
"toc": "Contents",
"bibliography": "Bibliography",
"disclaimer": "Declaration",
"disclaimer_content": "{g:I|We} hereby certify, {g:I|we}, {g:myself|ourselves}, have written {g:my|our} {thesis} as an original and primary work using the literature listed below and consulting it with {g:my|our} thesis supervisor and {g:my|our} thesis counsellor.\n\n{g:I|We} acknowledge that {g:my|our} {thesis} is fully governed by Act No. 121/2000 Coll., the Copyright Act, in particular Article 60 School Work.\n\n{g:I|We} acknowledge that the Technical University of Liberec does not infringe {g:my|our} copyrights by using {g:my|our} {thesis} for internal purposes of the Technical University of Liberec.\n\n{g:I|We} {g:am|are} aware of {g:my|our} obligation to inform the Technical University of Liberec on having used or granted license to use the results of {g:my|our} {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, {g:I|we} honestly declare that the text of the printed version of {g:my|our} {thesis} is identical with the text of the electronic version uploaded into the IS STAG.\n\n{g:I|We} acknowledge that the Technical University of Liberec will make {g:my|our} {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\n{g:I|We} {g:am|are} aware of the consequences which may under the Higher Education Act result from a breach of this declaration.",
"disclaimer_replace": {
"bp": {
"thesis": "bachelor thesis"
},
"dp": {
"thesis": "diploma thesis"
},
"prj": {
"thesis": "project"
}
},
"date": "[year]-[month]-[day]",
"abstract": "Abstract",
"acknowledgement": "Acknowledgement",
"keywords": "Keywords",
"abbrs": "List of abbreviations",
"image_list": "List of images",
"table_list": "List of tables",
"attachments": "Attachments",
"attachment": "Attachment",
"next_page_attachment": "begins on the next page",
"attached_bellow": "attached bellow",
"place_assignment": "Insert your assignment here"
}
}

View File

@@ -1,4 +1,4 @@
#import "utils.typ": assert_in_dict
#import "utils.typ": assert_in_dict, assert_in_arr, map_none, ok_or
#let lang_ids = (
cs: 0,
@@ -9,3 +9,82 @@
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 replace_czech_gender(raw, gender) = {
let genders = (
feminine: 1,
masculine: 0,
we: 2,
);
assert_in_dict(gender, genders, "author gender");
raw.replace(regex("\{g:([^|]*)\|([^|]*)\|([^}]*)\}"), (match) => {
match.captures.at(genders.at(gender))
});
}
#let replace_english_pronounce(raw, pronounce) = {
let pronounce = ok_or(pronounce, "me");
let pronouns = (
me: 0,
we: 1,
);
assert_in_dict(pronounce, pronouns, "author gender");
raw.replace(regex("\{g:([^|]*)\|([^}]*)\}"), (match) => {
match.captures.at(pronouns.at(pronounce))
});
}
#let set_czech_nonbreakable_terms(content) = {
let rules = get_lang_item("cs", "break_rules");
let space_after = rules.at("space_after");
let nonbreaking_terms = rules.at("nonbreaking_terms");
let terms = "\b(" + nonbreaking_terms.join("|") + ")";
let chain = (
"\b((" + space_after.join("|") + ") )+" +
"(" + terms + "|\w+\b)"
);
let apply_rules(exprs: ("",), content) = {
let res = content;
for expr in exprs {
res = {
show regex(expr): box;
res;
};
}
res
}
show heading: apply_rules.with(exprs: (chain, terms));
show par: apply_rules.with(exprs: (chain, terms));
content
}
#let disclaimer(language, document_type, author_pronouns) = {
let disclaimer = get_lang_item(language, "disclaimer_content");
let replacements = get_lang_item(language, "disclaimer_replace").at(document_type);
if language == "cs" {
disclaimer = replace_czech_gender(disclaimer, author_pronouns);
} else if language == "en" {
disclaimer = replace_english_pronounce(disclaimer, author_pronouns);
}
for (key, value) in replacements.pairs() {
disclaimer = disclaimer.replace("{" + key + "}", value);
}
if disclaimer.contains("{") or disclaimer.contains("}") {
panic("invalid language file");
}
disclaimer
}

100
template/pdf.typ Normal file
View File

@@ -0,0 +1,100 @@
#let generate_jumptable(pat) = {
let jt = ();
let matched = 0;
for (idx, item) in pat.enumerate() {
jt.push(matched);
if idx != 0 and item == pat.at(matched) {
matched += 1;
} else {
matched = 0;
}
}
jt
}
#let advance(pat, jt, ptr, cur) = {
if ptr >= pat.len() {
return ptr;
}
if pat.at(ptr) == cur {
ptr + 1
} else {
if ptr == 0 {
0
} else {
advance(pat, jt, jt.at(ptr), cur)
}
}
}
#let find(pat, jt, haystack, start_from: 0) = {
let ptr = 0;
for idx in range(start_from, haystack.len()) {
let item = haystack.at(idx);
ptr = advance(pat, jt, ptr, item);
if ptr >= pat.len() {
return idx;
}
}
none
}
#let match(pat, haystack, start_at) = {
if start_at + pat.len() > haystack.len() {
return false;
}
for idx in range(start_at, start_at + pat.len()) {
if haystack.at(idx) != pat.at(idx - start_at) {
return false;
}
}
true
}
#let number_of_pages(haystack) = {
let pat_type = (47, 84, 121, 112, 101); // "/Type"
let pat_page = (47, 80, 97, 103, 101); // "/Page"
let space = 32; // " "
let ascii_chars = (
97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90
);
let jt_type = generate_jumptable(pat_type);
let skip_spaces(haystack, start_at) = {
for idx in range(start_at, haystack.len()) {
let item = haystack.at(idx);
if item != space {
return idx;
}
}
none
}
let res = 0;
let ptr = 0;
while ptr < haystack.len() and type(ptr) != type(none) {
ptr = find(pat_type, jt_type, haystack, start_from: ptr);
if type(ptr) == type(none) { break; }
// Matched: "/Type"
ptr = skip_spaces(haystack, ptr + 1);
if type(ptr) == type(none) { break; }
// Matched: "/Type", spaces
if not match(pat_page, haystack, ptr) { continue; }
ptr += pat_page.len();
// Matched: "/Type", spaces, "/Page"
if haystack.at(ptr) in ascii_chars { continue; }
// Matched: "/Type", spaces, "/Page", word_end
res += 1;
}
res
}
#let embed_full(src) = {
let page_count = number_of_pages(src);
for idx in range(0, page_count) {
page(image(src, page: idx + 1), margin: 0cm, footer: none, header: none);
}
}

View File

@@ -2,11 +2,14 @@
// | TULTemplate 2 |
// +---------------+
//
// Unofficial TUL template for all kinds of documents.
// Typst TUL template for all kinds of documents.
//
// Git: https://git.zumepro.cz/tul/tultemplate2
#import "prototyping.typ": todo, profile
#import "attachments.typ": (
attachments, attach_content, attach_pdf, attach_link, attach_file_reference
)
// TUL Template 2
//
@@ -19,49 +22,130 @@
// )
// ```
//
// - style (str): Visual style to use. This can be "latex".
// - 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", "dp", "ds".
// - title (str): The title of the document.
// - document (str): Type of document. This can be "bp" or "other".
// - title_pages (str): The title pages exported from STAG (supported for some document types)
// - title (dictionary): The title of the document.
// - author (str): The name of the document's author.
// - author_pronouns (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.
// - consultant (str): The name of the document's consultant.
// - programme (dictionary): Study programme.
// - specialization (disctionary): Study specialization
// - year_of_study (int): Year of study
// - abstract (dictionary): The abstract.
// - keywords (dictionary): 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(
style,
faculty,
lang,
document: none,
title: none, author: none, supervisor: none, programme: none,
citations: "citations.bib",
// general settings
style: "classic", faculty: "tul", lang: "cs", document: "other",
// document info
title_pages: none,
title: none, keywords: none, abstract: none, acknowledgement: none, author: none,
author_pronouns: none, supervisor: none, consultant: none, programme: none,
specialization: none, year_of_study: none,
// links
assignment: none, citations: "citations.bib",
// content
content,
) = {
import "template_classic.typ": template_classic
import "utils.typ": assert_in_dict
import "arguments.typ": (
arguments,
document_info,
author_info,
project_info,
abstract_info,
check_arguments,
req_arg,
)
let args = arguments(
document_info(style, faculty, lang, document),
title_pages,
title,
author_info(author, author_pronouns, programme, specialization, year_of_study),
project_info(supervisor, consultant),
abstract_info(abstract, keywords),
acknowledgement,
assignment,
citations,
);
check_arguments(args);
import "utils.typ": assert_in_dict, assert_type_signature
// templates
import "classic/classic.typ": template_classic
let templates = (
latex: template_classic,
classic: template_classic,
);
assert_in_dict(style, templates, "template name");
// global set-up
// language set-up
import "lang.typ": lang_ids
assert_in_dict(lang, lang_ids, "language abbreviation");
set text(lang: lang);
templates.at(style)(
faculty, lang, document,
title, author, supervisor, programme,
"../" + citations,
content
);
// template call
templates.at(style)(args, content);
import "prototyping.typ": assert_release_ready
assert_release_ready();
}
#let tultitlepages2(
style: "classic", faculty: "tul", lang: "cs", document: "other",
title: none, author: none,
author_pronouns: none, supervisor: none, consultant: none, programme: none,
specialization: none, year_of_study: none,
assignment: none,
) = {
import "arguments.typ": (
arguments,
document_info,
author_info,
project_info,
abstract_info,
check_arguments,
req_arg,
)
let args = arguments(
document_info(style, faculty, lang, document),
none,
title,
author_info(author, author_pronouns, programme, specialization, year_of_study),
project_info(supervisor, consultant),
abstract_info(none, none),
none,
assignment,
"",
);
check_arguments(args);
import "utils.typ": assert_in_dict, assert_type_signature
import "classic/classic.typ": title_pages_classic
let title_pages = (
classic: title_pages_classic,
);
assert_in_dict(style, title_pages, "template name");
import "lang.typ": lang_ids
assert_in_dict(lang, lang_ids, "language abbreviation");
set text(lang: lang);
title_pages.at(style)(args);
}
// Make a new abbreviation
//
// - abbreviation (str): The abbreviation

View File

@@ -1,155 +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,
citation_file,
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
// bibliography
bibliography(citation_file, style: "./tul_citace.csl")
}

View File

@@ -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&",
),
),

View File

@@ -1,8 +1,319 @@
#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) and not has_value("any", 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)
}
#let deref(arr) = {
if arr.len() == 0 {
arr.at(0)
} else {
arr
}
}

14
templategen.mk Normal file
View File

@@ -0,0 +1,14 @@
THESIS_FILE := thesis
TYPST_FONTPATH := --font-path template/fonts
.PHONY: watch
watch: $(THESIS_FILE).pdf
xdg-open $< & typst watch $(TYPST_FONTPATH) $(THESIS_FILE).typ
.PHONY: view
view: $(THESIS_FILE).pdf
xdg-open $<
.PHONY: %.pdf
%.pdf: %.typ
typst compile $(TYPST_FONTPATH) $<

343
tests/citations.bib Normal file
View File

@@ -0,0 +1,343 @@
@article{Wang2025,
author = {Wang, Erming and Yu, Kaiwen and Cao, Jiqing and Wang, Minghui and Katsel, Pavel and Song, Won-min and Wang, Zhen and Li, Yuxin and Wang, Xusheng and Wang, Qian and Xu, Peng and Yu, Gefei and Zhu, Li and Geng, Jia and Habibi, Parnian and Qian, Lu and Tuck, Tony and Li, Aiqun and TCW, Julia and Roussos, Panos and Brennand, Kristen J. and Haroutunian, Vahram and Johnson, Erik C.B. and Seyfried, Nicholas T. and Levey, Allan I. and Bennett, David A. and Peng, Junmin and Cai, Dongming and Zhang, Bin},
title = {Multiscale proteomic modeling reveals protein networks driving Alzheimers disease pathogenesis},
journal = {Cell},
year = {2025},
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},
urldate = {2025-06-10},
URL = {https://citationstyles.org/},
}
@misc{linux,
journal = {Blog | Linux Foundation},
title = {Classic SysAdmin: Vim 101: A Beginners Guide to Vim},
year = {2025},
urldate = {2025-06-10},
URL = {https://www.linuxfoundation.org/blog/blog/classic-sysadmin-vim-101-a-beginners-guide-to-vim},
}
@book{Satrapa2019,
author = {Pavel Satrapa},
title = {IPv6 - čtvrté vydání},
subtitle = {Internetový protokol verze 6},
publisher = {Edice CZ.NIC},
address = {Milešovská 5, 130 00 Praha 3},
year = {2019},
edition = {1. elektronické vydání},
isbn = {978-80-88168-43-0},
url = {https://www.bookport.cz/kniha/ipv6-ctvrte-vydani-5998/},
}
@unpublished{Mekina2025_Typst,
author = {Ondřej Mekina and Matěj Žucha},
title = {Návod na použití Typst TUL šablony},
subtitle = {Podnázev},
publisher = {Nakladatelství Zumepro},
address = {Liberec},
year = {2025},
edition = {1. vyd.},
url = {https://zumepro.cz},
}
@misc{Lhotka2011,
author = {Ladislav Lhotka and Pavel Satrapa},
title = {Networking studies V},
subtitle = {selected technical reports},
publisher = {Cesnet},
address = {Praha},
year = {2011},
edition = {2. vydání},
isbn = {978-80-904689-1-7},
issn = {1234-5678},
url = {https://www.cesnet.cz/},
}
@misc{k8VgnlxDB5OWBNwl,
title = {Nejlepší programovací jazyky na světě},
subtitle = {Rust},
publisher = {Zumepro},
address = {Jablonec nad Nisou},
year = {2025},
volume = {69},
number = {2},
issn = {1234-5678},
}
@article{Mekina2025_Rust,
author = {Ondřej Mekina},
journal = {Nejlepší programovací jazyky na světě: Rust},
title = {Programovací jazyk Rust},
subtitle = {Neexistuje dokonalý programovací jazyk},
publisher = {Zumepro},
address = {Jablonec nad Nisou},
year = {2025},
pages = {1-999},
volume = {69},
number = {2},
issn = {1234-5678},
url = {https://zumepro.cz},
}
@incollection{Satrapa2019_Part,
author = {Pavel Satrapa},
booktitle = {IPv6 - čtvrté vydání},
booksubtitle = {Internetový protokol verze 6},
title = {Linux},
subtitle = {Podnázev části},
publisher = {Edice CZ.NIC},
address = {Milešovská 5, 130 00 Praha 3},
year = {2019},
edition = {1. elektronické vydání},
pages = {355-366},
isbn = {978-80-88168-43-0},
url = {https://example.org},
}
@manual{Mizuno1995,
author = {Kazumi Mizuno and Asahi Higashiyama and Satoru Kuriyama},
title = {Controller for game machine},
subtitle = {Game console controller},
year = {1995},
url = {https://patents.google.com/patent/WO1995032777A1/en},
}
@thesis{Martinec2024,
author = {Tomáš Martinec},
title = {Problematika generování offline trajektorií průmyslových robotů při výrobě kompozitních konstrukcí},
subtitle = {Podnázev},
address = {Studentská 1402/2, 461 17 Liberec 1},
year = {2024},
school = {Technická univerzita v Liberci},
type = {Habilitační práce},
url = {https://dspace.tul.cz/handle/15240/176519},
}
@manual{pk1LquauFJ9DLrfE,
title = {IEEE Standard for Floating-Point Arithmetic},
subtitle = {Podnázev},
publisher = {IEEE Standards Association},
address = {New York, USA},
year = {2019},
edition = {754-2019},
url = {https://standards.ieee.org/ieee/754/6210/},
}
@article{grippin_sars-cov-2_2025,
title = {{SARS}-{CoV}-2 {mRNA} vaccines sensitize tumours to immune checkpoint blockade},
issn = {0028-0836, 1476-4687},
url = {https://www.nature.com/articles/s41586-025-09655-y},
doi = {10.1038/s41586-025-09655-y},
abstract = {Immune checkpoint inhibitors ({ICIs}) extend survival in many patients with cancer but are ineffective in patients without pre-existing immunity1-9. Although personalized {mRNA} cancer vaccines sensitize tumours to {ICIs} by directing immune attacks against preselected antigens, personalized vaccines are limited by complex and time-intensive manufacturing processes10-14. Here we show that {mRNA} vaccines targeting {SARS}-{CoV}-2 also sensitize tumours to {ICIs}. In preclinical models, {SARS}-{CoV}-2 {mRNA} vaccines led to a substantial increase in type I interferon, enabling innate immune cells to prime {CD}8+ T cells that target tumour-associated antigens. Concomitant {ICI} treatment is required for maximal efficacy in immunologically cold tumours, which respond by increasing {PD}-L1 expression. Similar correlates of vaccination response are found in humans, including increases in type I interferon, myeloid-lymphoid activation in healthy volunteers and {PD}-L1 expression on tumours. Moreover, receipt of {SARS}-{CoV}-2 {mRNA} vaccines within 100 days of initiating {ICI} is associated with significantly improved median and three-year overall survival in multiple large retrospective cohorts. This benefit is similar among patients with immunologically cold tumours. Together, these results demonstrate that clinically available {mRNA} vaccines targeting non-tumour-related antigens are potent immune modulators capable of sensitizing tumours to {ICIs}.},
journaltitle = {Nature},
shortjournal = {Nature},
author = {Grippin, Adam J. and Marconi, Christiano and Copling, Sage and Li, Nan and Braun, Chen and Woody, Cole and Young, Elliana and Gupta, Priti and Wang, Min and Wu, Annette and Jeong, Seong Dong and Soni, Dhruvkumar and Weidert, Frances and Xie, Chao and Goldenberg, Eden and Kim, Andrew and Zhao, Chong and DeVries, Anna and Castillo, Paul and Lohray, Rishabh and Rooney, Michael K. and Schrank, Benjamin R. and Wang, Yifan and Ma, Yifan and Chang, Enoch and Kouzy, Ramez and Dyson, Kyle and Jafarnia, Jordan and Nariman, Nina and Gladish, Gregory and New, Jacob and Argueta, Ada and Amaya, Diana and Thomas, Nagheme and Doty, Andria and Chen, Joe and Copling, Nikhil and Alatrash, Gabriel and Simon, Julie and Davies, Alicia Bea and Dennis, William and Liang, Richard and Lewis, Jeff and Wei, Xiong and Rinsurongkawong, Waree and Vaporciyan, Ara A. and Johns, Andrew and {D3CODE Team} and Aaroe, Ashley and Abraham, Sanu and Andrews, Lee and Badami, Kiran K. and Baganz, Janna A. and Bajwa, Pratibha and Barbosa, Gregory R. and Beird, Hannah C. and Brock, Kristy and Burton, Elizabeth M. and Cata, Juan and Chung, Caroline and Claussen, Catherine and Crommett, John and Cutherell, Michael and Dabaja, Bouthaina and Dagher, Hiba and Daniels, Kevin M. and Domask, Mary and Draetta, Giulio and Edelkamp, Paul and Fisher, Sarah and French, Katy Elizabeth and Futreal, Andrew and Gaeta, Maria and Godoy, Myrna and Goldstein, Drew and Gunther, Jillian and Hutcheson, Kate and Jaffray, David and Jin, Jeff and John, Teny Matthew and Kell, Trey and Knafl, Mark and Kwan, Rayson C. and Lee, J. Jack and Litton, Jennifer and McEnery, Kevin W. and McGuire, Mary and Mescher, Benjamin and Musunuru, Tejo and Muthu, Mayoora and Nates, Joseph and Owen, Craig S. and Padmakumar, Priyadharshini and Palaskas, Nicholas and Patel, Jay J. and Prabhakaran, Sabitha and Ramsey, Lucas and Ravi, Vinod and Hernandez, Cristhiam Rojas and Sajith, Bilja and Scheet, Paul A. and Schmidt, Stephanie and Shaw, Kenna R. and Shete, Sanjay and Shoenthal, Daniel P. and Stoltenberg, Lessley J. and Tawbi, Hussein and Turin, Anastasia and Unni, Samir and Vicknamparampil, Benju and Weber, Max C. and Weinstein, John and Woodman, Scott Eric and Wozny, Mark C. and Wu, Carol and Wu, Jia and Yao, James C. and Young, Chingyi and Yu, Emily and Zatorski, Steven and Aloia, Thomas A. and Trujillo, John Cuenca and Gibbons, Christopher and Kothari, Anai and Subbiah, Ishwaria and Thompson, Phillip and Lee, Jack and Lee, Ji-Hyun and Sun, Ryan and Sharma, Padmanee and Tran, Hai and Zhang, Jianjun and Gibbons, Don L. and Wargo, Jennifer and Kim, Betty Y. S. and Heymach, John V. and Mendez-Gomez, Hector R. and Jiang, Wen and Sayour, Elias J. and Lin, Steven H.},
urldate = {2025-11-01},
date = {2025-10-22},
langid = {english},
}
@article{wang_enabling_2025,
title = {Enabling Sustainable Cloud Computing With Low-Carbon Server Design},
volume = {45},
rights = {https://ieeexplore.ieee.org/Xplorehelp/downloads/license-information/{IEEE}.html},
issn = {0272-1732, 1937-4143},
url = {https://ieeexplore.ieee.org/document/11014506/},
doi = {10.1109/MM.2025.3572955},
abstract = {To combat climate change, we must reduce carbon emissions from hyperscale cloud computing. Compute servers cause the majority of a general-purpose clouds emissions. Thus, we are motivated to design carbon-efficient compute server stock keeping units ({SKUs}), or {GreenSKUs}, using recently available low-carbon components. We built three {GreenSKU} prototypes, integrating energy-efficient {CPUs}, reusing old dynamic {RAM} via compute express link, and reusing old solid-state drives. We reveal challenges that limit {GreenSKUs} carbon savings at scale and may prevent their adoption by cloud providers. To address these challenges, we developed a novel framework, {GSF} ({GreenSKU} Framework), that enables cloud providers to systematically evaluate {GreenSKUs} carbon savings at scale. By implementing {GSF} within Microsoft Azures production constraints, we demonstrate that {GreenSKUs} reduce net cloud emissions by 8\%, which is globally significant. This work is the first to demonstrate and quantify how carbon-efficient server designs translate to measurable cloud-scale emissions reductions, enabling meaningful contributions to cloud sustainability goals.},
pages = {19--28},
number = {4},
journaltitle = {{IEEE} Micro},
shortjournal = {{IEEE} Micro},
author = {Wang, Jaylen and Berger, Daniel S. and Kazhamiaka, Fiodar and Irvene, Celine and Zhang, Chaojie and Choukse, Esha and Frost, Kali and Fonseca, Rodrigo and Warrier, Brijesh and Bansal, Chetan and Stern, Jonathan and Bianchini, Ricardo and Sriraman, Akshitha},
urldate = {2025-11-01},
date = {2025-07},
}
@article{hurlburt_between_2025,
title = {Between the Lines: International {IT} Initiatives},
volume = {27},
rights = {https://ieeexplore.ieee.org/Xplorehelp/downloads/license-information/{IEEE}.html},
issn = {1520-9202, 1941-045X},
doi = {10.1109/MITP.2025.3613070},
shorttitle = {Between the Lines},
pages = {4--10},
number = {5},
journaltitle = {{IT} Professional},
shortjournal = {{IT} Prof.},
author = {Hurlburt, George F.},
urldate = {2025-11-01},
date = {2025-09},
}
@book{gjengset_rust_2022,
location = {San Francisco},
title = {Rust for rustaceans: idiomatic programming for experienced developers},
isbn = {978-1-7185-0185-0},
shorttitle = {Rust for rustaceans},
abstract = {"For developers who've mastered the basics, this book is the next step on your way to professional-level programming in Rust. It covers everything you need to build and maintain larger code bases, write powerful and flexible applications and libraries, and confidently expand the scope and complexity of your projects. Author Jon Gjengset takes you deep into the Rust programming language, dissecting core topics like ownership, traits, concurrency, and unsafe code. You'll explore key concepts like type layout and trait coherence, delve into the inner workings of concurrent programming and asynchrony with async/await, and take a tour of the world of no\_std programming. Gjengset also provides expert guidance on {API} design, testing strategies, and error handling, and will help develop your understanding of foreign function interfaces, object safety, procedural macros, and much more."--Publisher website},
pagetotal = {252},
publisher = {No Starch Press},
author = {Gjengset, Jon},
date = {2022},
keywords = {Handbooks and manuals, Instructional and educational works, Rust (Computer program language)},
}
@misc{vaswani_attention_2023,
title = {Attention Is All You Need},
url = {http://arxiv.org/abs/1706.03762},
doi = {10.48550/arXiv.1706.03762},
abstract = {The dominant sequence transduction models are based on complex recurrent or convolutional neural networks in an encoder-decoder configuration. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely. Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train. Our model achieves 28.4 {BLEU} on the {WMT} 2014 English-to-German translation task, improving over the existing best results, including ensembles by over 2 {BLEU}. On the {WMT} 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art {BLEU} score of 41.8 after training for 3.5 days on eight {GPUs}, a small fraction of the training costs of the best models from the literature. We show that the Transformer generalizes well to other tasks by applying it successfully to English constituency parsing both with large and limited training data.},
number = {{arXiv}:1706.03762},
publisher = {{arXiv}},
author = {Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and Uszkoreit, Jakob and Jones, Llion and Gomez, Aidan N. and Kaiser, Lukasz and Polosukhin, Illia},
urldate = {2025-11-01},
date = {2023-08-02},
eprinttype = {arxiv},
eprint = {1706.03762 [cs]},
keywords = {Computer Science - Computation and Language, Computer Science - Machine Learning},
}
@inproceedings{von_marttens_dark_2026,
title = {Dark energy and cosmic acceleration},
volume = {5},
url = {https://ui.adsabs.harvard.edu/abs/2026enap....5...33V},
doi = {10.1016/B978-0-443-21439-4.00104-8},
eventtitle = {Encyclopedia of Astrophysics},
pages = {33--53},
author = {von Marttens, Rodrigo and Alcaniz, Jailson},
urldate = {2025-11-01},
date = {2026-01-01},
note = {{ADS} Bibcode: 2026enap....5...33V},
}
@collection{culhane_ieee_2024,
location = {Piscataway, {NJ}},
title = {{IEEE} Quantum Week 2024: 15-20 September 2024, Montréal, Québec, Canada: proceedings},
isbn = {979-8-3315-4137-8},
shorttitle = {{IEEE} Quantum Week 2024},
pagetotal = {1},
publisher = {{IEEE}},
editor = {Culhane, Candace},
date = {2024},
doi = {10.1109/QCE60285.2024},
note = {Meeting Name: {IEEE} International Conference on Quantum Computing and Engineering},
}
@movie{kubrick_2001_1968,
title = {2001: A Space Odyssey},
publisher = {Metro-Goldwyn-Mayer},
author = {Kubrick, Stanley},
date = {1968-04-02},
langid = {english},
}
@online{gmannickg_why_2012,
title = {Why is processing a sorted array faster than processing an unsorted array?},
url = {https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-processing-an-unsorted-array},
publisher = {Stack Overflow},
author = {{GManNickG}},
urldate = {2025-11-01},
date = {2012-06-27},
langid = {english},
}
@letter{franklin_silence_1722,
title = {Silence Dogood, No. 1},
url = {https://web.archive.org/web/20080907231417/http://www.historycarper.com/resources/twobf1/sd1.htm},
type = {Letter},
author = {Franklin, Benjamin},
urldate = {2025-11-01},
date = {1722-04-02},
langid = {english},
}
@patent{page_method_2001,
title = {Method for node ranking in a linked database},
url = {https://patents.google.com/patent/US6285999B1/en},
holder = {Google {LLC}},
abstract = {A method assigns importance ranks to nodes in a linked database, such as any database of documents containing citations, the world wide web or any other hypermedia database. The rank assigned to a document is calculated from the ranks of documents citing it. In addition, the rank of a document is calculated from a constant representing the probability that a browser through the database will randomly jump to the document. The method is particularly useful in enhancing the performance of search engine results for hypermedia databases, such as the world wide web, whose documents have a large variation in quality.},
pages = {12},
type = {patentus},
number = { 6,285,999 B1},
author = {Page, Lawrence},
urldate = {2025-11-01},
date = {2001-09-04},
langid = {english},
}
@software{torvalds_linux_2025,
title = {Linux kernel},
url = {https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/?h=v6.17.6},
version = {6.17.6},
publisher = {The Linux Kernel Organization, Inc.},
author = {Torvalds, Linus},
urldate = {2025-11-01},
date = {2025-10-29},
}
@inreference{wikipedia_contributors_rust_2025,
title = {Rust (programming language)},
url = {https://en.wikipedia.org/w/index.php?title=Rust_(programming_language)&oldid=1318205510},
booktitle = {Wikipedia, The Free Encyclopedia.},
publisher = {Wikipedia, The Free Encyclopedia.},
author = {{Wikipedia contributors}},
urldate = {2025-11-01},
date = {2025-10-22},
langid = {english},
}
@letter{torvalds_re_2012,
title = {Re: [Regression w/ patch] Media commit causes user space to misbahave (was: Re: Linux 3.8-rc1)},
url = {https://lkml.org/lkml/2012/12/23/75},
type = {E-mail},
author = {Torvalds, Linus},
urldate = {2025-11-01},
date = {2012-12-23},
langid = {english},
}
@inreference{noauthor_citation_nodate,
title = {citation překlad z angličtiny do češtiny},
url = {https://slovnik.seznam.cz/preklad/anglicky_cesky/citation},
booktitle = {Seznam Slovník},
urldate = {2025-11-01},
}
@misc{lecun_mnist_2010,
title = {{MNIST} handwritten digit database},
url = {http://yann.lecun.com/exdb/mnist},
publisher = {{ATT} Labs},
author = {{LeCun}, Yann and Cortes, Corinna and Burges, {CJ}},
urldate = {2025-11-01},
date = {2010},
}
@artwork{smetana_vysehrad_nodate,
title = {Vyšehrad},
author = {Smetana, Bedřich},
}
@audio{presley_ghetto_1969,
location = {American Sound, Memphis},
title = {In the Ghetto},
url = {https://www.youtube.com/watch?v=FJ-r0bilzhU},
publisher = {{RCA} Victor},
author = {Presley, Elvis},
urldate = {2025-11-01},
date = {1969-01-20},
langid = {english},
}
@artwork{prokofiev_romeo_1938,
title = {Romeo and Juliet},
author = {Prokofiev, Sergei},
date = {1938},
}

7
tests/citations_cs.typ Normal file
View File

@@ -0,0 +1,7 @@
#set text(lang: "cs")
#bibliography(
"citations.bib",
title: "Bibliography - CZ",
style: "../template/citations/tul-csn690-numeric-square_brackets.csl",
full: true,
)

6
tests/citations_en.typ Normal file
View File

@@ -0,0 +1,6 @@
#bibliography(
"citations.bib",
title: "Bibliography - EN",
style: "../template/citations/iso690-numeric-square_brackets.csl",
full: true,
)

59
tests/fonts.typ Normal file
View 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
View File

@@ -0,0 +1,6 @@
.PHONY: test_%
test_%: tests/%.pdf
xdg-open $<
tests/%.pdf: tests/%.typ
typst compile --root . --font-path template/fonts $<

17
tests/pdf_embedding.typ Normal file
View File

@@ -0,0 +1,17 @@
#import "../template/pdf.typ": number_of_pages, embed_full
#let pdfinfo(src, target_pagecount) = {
let pdf = read(src, encoding: none);
let pagecount = number_of_pages(pdf);
[
= #src
Pagecount: #pagecount
];
place(bottom + right, [Starting on next page]);
assert(pagecount == target_pagecount);
embed_full(pdf);
}
#pdfinfo("./pdf_embedding_01.pdf", 1)
#pdfinfo("./pdf_embedding_02.pdf", 2)
#pdfinfo("./pdf_embedding_03.pdf", 1)

BIN
tests/pdf_embedding_01.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
tests/pdf_embedding_02.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
tests/pdf_embedding_03.pdf (Stored with Git LFS) Normal file

Binary file not shown.

0
theses/autoref_cs.typ Normal file
View File

0
theses/autoref_en.typ Normal file
View File

56
theses/bp_cs.typ Normal file
View File

@@ -0,0 +1,56 @@
#import "../template/template.typ": *
#show: tultemplate2.with(
style: "classic",
faculty: "fm",
lang: "cs",
document: "bp",
assignment: (
personal_number: [A00000007],
department: [Ústav šablon],
academical_year: [2025/2026],
content: [
= Zásady pro vypracování:
+ Seznamte se s možnostmi šablon
+ Navrhněte několik možných stylů šablon
+ Seznamte se s nástrojem Typst
+ Implementujte šablonu
+ Zkonzultujte šablonu
+ Opravte spoustu věcí
+ Zkonzultujte šablonu
+ Opravte spoustu věcí
+ Zkonzultujte šablonu
+ Snad nebude nic potřeba opravit
= Seznam odborné literatury:
_Přísně tajné_
],
),
title: (
cs: [Ukázka dokumentu typu Bakalářská práce pro FM TUL v češtině],
en: [Example document for a Bachelor's thesis for FM TUL in Czech],
),
author: [Matěj Žucha],
author_pronouns: "masculine",
programme: (cs: [MI6000000007 Přísně tajné]),
specialization: (cs: [Vytváření šablon]),
supervisor: [Ondřej Mekina],
abstract: (
cs: [
Tento dokument slouží jako praktická ukázka všech důležitých funkcí šablony _tultemplate2_,
s názornými příklady použítí a jejich podrobným popisem.
],
en: [
This document serves as a practical demonstration of all the important features of the
_tultemplate2_ template, with useful examples and their respective descriptions.
],
),
keywords: (
cs: [Ukázka, Klíčových, Slov, Česky],
en: [Example, Keywords, In, English],
),
acknowledgement: (cs: [Lorem ipsum dolor sit amet.]),
citations: "citations.bib",
)
Bakalářská práce
bakalářskou práci

55
theses/bp_en.typ Normal file
View File

@@ -0,0 +1,55 @@
#import "../template/template.typ": *
#show: tultemplate2.with(
style: "classic",
faculty: "fm",
lang: "en",
document: "bp",
assignment: (
personal_number: [A00000007],
department: [Department of templates],
academical_year: [2025/2026],
content: [
= Principles for drafting:
+ Familiarize yourself with available templates
+ Design several possible template styles
+ Learn to use Typst
+ Implement the template
+ Review the template
+ Fix many issues
+ Review the template
+ Fix many issues
+ Review the template
+ Hopefully nothing more needs fixing
= List of professional literature:
_Top secret_
],
),
title: (
cs: [Ukázka dokumentu typu Bakalářská práce pro FM TUL v angličtině],
en: [Example document for a Bachelor's thesis for FM TUL in English],
),
author: [Matěj Žucha],
author_pronouns: "me",
programme: (en: [MI6000000007 Top secret]),
specialization: (en: [Creation of templates]),
supervisor: [Ondřej Mekina],
abstract: (
cs: [
Tento dokument slouží jako praktická ukázka všech důležitých funkcí šablony _tultemplate2_,
s názornými příklady použítí a jejich podrobným popisem.
],
en: [
This document serves as a practical demonstration of all the important features of the
_tultemplate2_ template, with useful examples and their respective descriptions.
],
),
keywords: (
cs: [Ukázka, Klíčových, Slov, Česky],
en: [Example, Keywords, In, English],
),
acknowledgement: (en: [Lorem ipsum dolor sit amet.]),
citations: "citations.bib",
)
Bachelor thesis

292
theses/content_cs.typ Normal file
View File

@@ -0,0 +1,292 @@
#import "../template/template.typ": *
#show: tultemplate2
= Co najdete v této šabloně
Tato šablona sloužit jako ukázka práce typu `{{ta}}` v nástroji *Typst* a šabloně *tultemplate2*.
Může posloužit jako jednoduchý základ i pro vaši práci, stačí se naučit používat pár užitečných funkcí, jako např. vkládání obrázků, tabulek, citací nebo odkazů.
Na rozdíl od souboru _documentation.typ_, který je dostupný ke stažení na stránkách projektu, obsahuje tento dokument jenom to nejpotřebnější ze znalostí, co postačí k úspěšnému napsání práce.
Pokud vám budou nějaké funkce chybět, můžete se podívat do zmíněného souboru, anebo kontaktovat některého z autorů, kteří se vám pokusí pomoct.
Jen pro úplnost je zde ve zkratce něco málo o nástroji Typst a motivaci k tvorbě této šablony:
Typst je profesionální sázecí nástroj podobný Markdownu, LaTeXu/TeXu, Groffu, atd.
Typst je moderní obdobou starších nástrojů, které postrádají spoustu důležitých funkcí, bez kterých se v dnešní době prakticky nedá fungovat.
Uživatel často musí importovat nepřeberné množství balíčků, které poskytují (podle mě) naprosto základní funkcionalitu -- jako například správná podpora UTF-8 znaků, formátování prvků na základě jazykového lokálu, apod.
= Začínáme se šablonou
Tuto šablonu jste si pravděpodobně stáhli z generátoru na webu https://tulsablona.zumepro.cz a vložili ji do Typst online editoru.
Tím pádem vidíte kromě zdrojového kódu také výsledný PDF soubor.
Jak asi víte, hlavní rozdíl mezi tradičními textovými procesory jako Microsoft Word nebo LibreOffice Writer a mezi sázecími programy jako LaTeX nebo Typst je právě způsob, kterým se upravuje vzhled a obsah dokumentu.
Zatímco ve Wordu jsou uživatelé zvyklí, že pomocí tlačítek a klávesových zkratek mění dokument napřímo, Typst (a i LaTeX) používají tzv. zdrojový soubor, který není ničím jiným než obyčejným textovým souborem, a následně na vyžádání umí tento zdrojový soubor zkompilovat tj. proměnit na výsledný dokument, např. ve formátu PDF.
Proto zde najdete popis všech důležitých funkcí nikoliv jako galerii obrázků toho, na která tlačítka se klikat, nýbrž jako ukázka a návod všech speciálních sekvencí textu, které Typst podporuje a které šablona vyhodnocuje jinak než obsah zprávy.
== Odstavce
Jak jsou někteří z vás možná zvyklí z Markdownu, odstavce, nadpisy a vlastně pro přehlednost všechny logicky oddělené bloky se oddělují prázným řádkem.
Toho jste si jistě mohli při prohlížení tohoto souboru všimnout.
Můžete si vyzkoušet, co se stane, když
použijete jenom ukončení řádku enterem,
nebo když použijete zmíněný prázdný řádek,
anebo co se stane při použití dvou a více prázdných řádků. (spoiler: 1 a více prázdných řádků mají identické
chování, pouze ukončení řádku je interpretováno stejně jako např. mezerník nebo tabulátor)
Uživatel tím pádem svobodu v tom, jestli ve zdrojovém souboru používá dlouhé řádky plné textu,
nebo
raději
přehlednější
formátování
a sám si obsah dělí na řádky, protože ve výsledném PDF souboru se stejně spojí do jednoho celistvého odstavce.
Musí akorát ručně dbát na to, aby odstavce nebyly příliš krátké, ani příliš dlouhé.
V souvislosti s odstavci bych ještě zmínil, že Typst se za vás stará také o zarovnávání písma a slov do bloků
a dělení slov mezi řádky, když se na něj nevejdou.
== Klikatelný obsah
Pokud používáte oficiální Typst online editor, můžete jednoduše klepnout na jakýkoliv text v pravé části (náhledové PDF), který se měnit, a editor podle toho automaticky přesune váš kurzor na správné místo.
Je to sice drobná, ale zato velmi užitečná funkce.
== Nadpisy
První důležitá funkce kromě psaní samotného textu, k čemuž není zapotřebí žádná černá magie, jsou nadpisy.
Stejně jako v jiných programech, i Typst podporuje nadpisy více úrovní. Pro nadpis první úrovně se používá znaménko rovná se a mezera na začátku řádku, čili ve zdrojovém souboru Typstu je používán takto:
```typst
= Můj nadpis první úrovně
```
Pro nadpis druhé úrovně pak použijeme dvě rovná se, pro nadpis třetí úrovně tři rovná se.
Šablona *tultemplate2* Vám ovšem bohužel nedovolí nadpis čtvrté a další úrovně, protože by takový nadpis porušoval směrnice TUL o formátování dokumentů.
Ale nemusíte se bát. Pokud takový nadpis uděláte -- šablona vyhodí chybu, aby vás na to upozornila.
```typst
= Nadpis
== Podnadpis
=== Podpodnadpis
A pak obsah
```
== Číslování kapitol
Asi jste si všimli, že každý nadpis začíná číslem dané kapitoly.
Toto číslování provádí Typst automaticky, promítne se následně i v sekci *Obsah* na začátku souboru, nemusíte se tak opět o nic starat.
= Kontrola šablony při kompilaci
Tato šablona je vytvořena tak, že když se ji pokusíte zkompilovat s nesprávnou syntaxí nebo s nějakou chybějící důležitou částí hlavičky, nenechá vás to provést.
Vždy se podívejte na chybové hlášky, které šablona vypisuje, protože vás snadno navedou k opravě všech chyb.
Můžete to vyzkoušet tak, že smažete něco z hlavičky nebo že např. použijete funkci, která není nikde definovaná.
= Používání funkcí
Používání většiny funkcionalit Typstu je prováděno pomocí tzv. volání funkce. Je to velmi podobné předchozím ukázkám, akorát místo toho, aby se text obalil pouze jedním symbolem či podobnou jednoduchou značkou, obalíme text jménem dané funkce.
Syntaxe vypadá nějak takto:
```typst
#Název_funkce[samotný text nebo jiné parametry]
```
Pokud v editoru napíšete symbol hashtagu, začne vám automaticky našeptávat všechny možné funkce a jejich popisy.
Přejdeme rovnou k dalším praktickým příkladům.
== Zvýrazňování textu
Syntaxe základního zvýraznění je velmi podobná například Markdownu.
Stačí použít následující symboly:
```typst
*tučně*
_kurzívou_
#highlight[zvýrazněno]
```
Další stylování lze dělat právě přes funkce, viz třeba:
```typst
#strike[přeškrtnuto]
```
Pro úplnost a ukázku je zde přímo v textu *tučný text*, _text kurzívou_, #strike[přeškrtnutý text] a #highlight[text zvýrazněný podle barvy příslušící vaší fakultě].
Lze sázet také #underline[podtržený text] (ačkoli typografové doporučují podtržení nepoužívat).
== Odkazy<links>
Odkazy je možné dělat na URL/URI zdroje, emaily, telefony, atd...
Odkázat na URL (URI) je možné bez zavolání funkce, odkaz stačí prostě a jednodušše napsat:
https://git.zumepro.cz/tul/tultemplate2
```typst
https://git.zumepro.cz/tul/tultemplate2
```
Tohle interně volá funkci `link`.
Pokud odkazujeme na méně časté věci (jako emaily), můžeme použít funkci `link` přímo:
```typst
#link("mailto:ondrej@mekina.cz")[Email maintainera této šablony]
```
Funkci link nejprve v kulatých závorkách dáte cíl odkazu (například URL adresu) a dále v hranatých závorkách obsah, který se zobrazí v dokumentu.
Dalši předpony (URI schémata) můžete najít třeba na Wikipedii
https://en.wikipedia.org/wiki/List_of_URI_schemes.
== Obrázky
Obrázky je možné vkládat samotné, nebo i s popiskem.
Obrázek se vloží pomocí funkce `image`.
Přidání popisku a zároveň zalistování obrázku v indexu (aby se na ně třeba dalo odkazovat) lze udělat pomocí funkce `figure`.
#block([
```typst
#figure(
image("mujobrazek.jpg"),
caption: [
*Krásný* obrázek, který vypadá jako obrázek.
]
)
```
], breakable: false)
Tady je praktická ukázka jednoduchého vložení obrázku s popiskem:
#figure(image("../template/assets/tul_logo.svg", width: 25%), caption: [
Logo *TUL*
])
První parametr funkce je zobrazovaný obsah, v našem případě zmíněný `image`.
K němu můžeme psát různé parametry, v příkladu výše (kde zobrazujeme logomark TUL) máme třeba nastavení šířky obrázku v procentech -- tedy v procentech šířky stránky.
Jako poslední je parametr `caption`, s jehož pomocí můžeme nastavit popisek obrázku/figury.
Obrázky se zobrazí na začátku dokumentu v seznamu (pokud to daný typ dokumentu vyžaduje).
I toto za vás Typst dělá automaticky, vám tak stačí do textu přidávat obrázky, jak se to hodí, a všechny se poté korektně zobrazí v *Seznamu obrázků* s odkazem i správně uvedenou stránkou, na které se obrázek nachází.
Obrázky jsou také automaticky číslovány podle předepsaného způsobu, podobně jako kapitoly.
== Tabulky
Tabulky lze vytvářet takto:
```typst
#figure(table(
columns: 3,
table.header([], [*Sloupec 1*], [*Sloupec 2*]),
[*Řádek 1*], [a], [b],
[*Řádek 2*], [c], [d],
), caption: "Moje krásná tabulka")
```
Parametr `columns` udává počet sloupců tabulky.
Poté následuje libovolný počet buněk tabulky, pro lepší přehlednost jsou v příkladu jednotlivé řádky oddělené.
Nakonec je zde opět parametr `caption` sloužící k zadání popisku tabulky.
#highlight[Hlavičku tabulky (první řádek) je dobré zabalit do funkce header (viz. výše)], to je kvůli tomu, že Typst do vygenerovaného PDF souboru poté přidá metadata (například pro osoby se zrakovým postižením).
#figure(table(
columns: 3,
table.header([], [*Sloupec 1*], [*Sloupec 2*]),
[*Řádek 1*], [a], [b],
[*Řádek 2*], [c], [d],
), caption: "Moje krásná tabulka")
Tabulky se zobrazí na začátku dokumentu v seznamu (pokud to daný typ dokumentu vyžaduje).
Jak jste asi pochopili, i toto provede šablona automaticky.
== Citace
Šablona podporuje správu citací pomocí standardního BibLaTeX @bibtex souboru, stejně jako například LaTeX.
Generování citací v BibLaTeX zápisu umí téměř každá stránka nebo program, které mají pro citace podporu -- doporučujeme použít buď #link("https://www.zotero.org/")[Zotero] nebo #link("https://www.citacepro.com/")[Citace.com].
Kód takovéto citace ve vhodném formátu stačí přidat do souboru _citations.bib_, poté je možné se na 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 BibLaTeX -- Typst tento formát také umí přečíst.
Můžete se do souboru s příponou .bib podívat, zjistíte, že je to opravdu jen obyčejný textový soubor se specifickou strukturou.
V přiloženém ukázkovém souboru nějaké citace jsou - např. již použitá citace se jménem `typst`.
Soubor, ze kterého se načtou citace lze změnit pomocí argumentu šablony (tj. struktura na začátku souboru):
```typst
#show: tultemplate2.with(
...
citations: "jinysoubor.bib",
...
)
```
== Vnitřní odkazy a kotvy<ukazka_odkazu>
Trochu navážeme na *Odkazy* (@links).
Můžete dělat i vnitřní odkazy třeba na kapitoly, stránky nebo obrázky s popiskem (zabalené ve `figure`).
```typst
= Dobrá kapitola<dobra_kapitola>
Podívejme se na Dobrou kapitolu (@dobra_kapitola).
```
Takhle vypadá kotva:
```typst
<nazev_kotvy>
```
Kotvu dáte na zalistovaný obsah (například za nadpis nebo obrázek) a můžete na odkazovat stejně jako na citace:
```typst
@nazev_kotvy
```
Můžeme se podívat na názornou ukázku odkazu (@ukazka_odkazu).
== Zkratky
LaTeX TUL šablona na 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") 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
- Zkratka bude definována pouze jednou (poprvé), jinak na vás šablona začne červeně křičet
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ě používáte přímo v textu.
]
== Přílohy
Na konec souboru je také možné přidat seznam příloh.
Momentálně jsou podporované čtyři typy příloh: odkaz, obsah, PDF soubor vložený na konec dokumentu a odkaz na externí soubor (například přiložený do systému s {{tou}}).
Jako demonstrace by měla postačit praktická ukázka, která ve zdrojovém kódu následuje hned za tímto odstavcem, a která generuje přílohy tohoto dokumentu.
#attachments(
attach_link("Zdrojový kód této šablony", "https://git.zumepro.cz/tul/tultemplate2"),
attach_content("Testovací obsah vygenerovaný Typstem", [Sem lze psát _stylovaný_ obsah.]),
)

299
theses/content_en.typ Normal file
View File

@@ -0,0 +1,299 @@
#import "../template/template.typ": *
#show: tultemplate2
= A quick few words about this template
This template should serve as an example {{what}} written with the help of the tool *Typst* and the *tultemplate2* template.
It can be used as a starting point for your own report, you just have to learn a few of its useful functions, e.g. how to insert images, tables, citacions or links.
In contrast with the _documentation.typ_ file, which is available for download on the project's page, this document only contains the most necessary knowledge to complete most reports.
If you find this document lacking in features, you can look at the aforementioned docs or contact one of the authors, who will try to help you.
Just for the sake of completeness, here is a few words about the Typst programming language and about Typst, as well as about the motivation behind the creation of this template:
Typst is a professional typesetting language similar to Markdown, LaTeX/TeX, groff, etc.
Typst is the modern equivalent of older typesetting tools, which often lack a lot of important features, such that make it next to impossible to work without today.
The user must often import an incountable number of packages, which only provide only the most basic of functionalities --- for example proper UTF-8 character support, formatting of elements based on the set locale, etc.
= Getting Started with the Template
You have probably downloaded this template from the generator on the website https://tulsablona.zumepro.cz and inserted it into the Typst online editor.
Therefore, besides the source code, you can also see the resulting PDF file.
As you probably know, the main difference between traditional word processors like Microsoft Word or LibreOffice Writer and typesetting programs like LaTeX or Typst is the way in which the appearance and content of the document are edited.
While Word users are used to changing the document directly using buttons and keyboard shortcuts, Typst (and also LaTeX) use a so-called source file, which is nothing more than an ordinary text file, and can then, on request, compile this source file -- i.e., turn it into the final document, for example in PDF format.
That's why here you will find a description of all the important functions not as a gallery of images showing which buttons to click, but rather as an example and guide to all the special text sequences that Typst supports and that the template interprets differently from the main content of the report.
== Paragraphs
Some of you might know this concept from using Markdown, where paragraphs, headings and for the sake of clarity all logically coherent blocks are separated by an empty line.
You might have already spotted this while reading through this document.
You can try for yourself what happens when
you just end the line
or when you properly use an empty line,
or maybe what happens if you use two or more empty rows. (spoiler: 1 or more empty lines share identical behavior,
while newlining only is interpreted the same as using spaces or tabs)
Therefore, the user has freedom of choosing whether they use long lines full of text,
or
if
they
prefer
a
cleaner
formatting
and manage the separation of content to lines, because it all gets concatenated into a nice consice paragraph.
The user has to manually watch out for the length of the paragraphs, so that they are neither too short or too long.
In the context of paragraphs, it should be mentioned that Typst also manages the alignment of text and words into blocks and the division of words between lines when they don't fit.
== Clickable content
When using the official Typst online editor, you can simply click on any text in the right side (the preview PDF), and your cursor will jump directly to that text in the source file.
A small but very practical feature.
== Headings
The first important feature, apart from writing the text itself (which requires no black magic), is the usage of headings.
Just like in other programs, Typst also supports multi-level headings. For a first-level heading, an equals sign followed by a space is used at the beginning of a line, meaning that in a Typst source file it is written like this:
```typst
= My first level heading
```
For a second-level heading, we then use two equals signs; for a third-level heading, three equals signs...
However, the *tultemplate2* template will not allow a heading of fourth or deeper level, because such a heading would violate TUL's guidelines for writing reports.
But don't worry --- if you try to use fourth-level or deeper heading, the template will warn you not to do that and will refuse to compile until you fix this. More on this behavior later.
```typst
= Heading
== Subheading
=== Subsubheading
And then your content
```
== Chapter Numbering
You've probably noticed that each heading begins with the number of its respective chapter. Typst handles this numbering automatically, and it's also reflected in the *Contents* section at the start of the document, so you don't have to worry about it yourself.
== Template compile-time checks
This template is created in such a way that when you try to compile it with incorrect syntax or an imoportant part of the header missing, it won't let you.
Always see the error messages the template provides, as they will simply guide you to fix your mistakes.
You can try this by deleting something from the header, or by using e.g. a function that ins't defined anywhere.
= Using Functions
Most Typst features are used through what's called function calls.
This is quite similar to the previous examples, except that instead of wrapping text with a single symbol or a simple marker, we wrap it with the name of the function.
The syntax looks like this:
```typst
#Function_name[text itself or other parameters]
```
When you type the hashtag symbol in the editor, it will automatically start suggesting all available functions and their descriptions.
Let's move on to some practical examples.
== Text Highlighting
The syntax for basic highlighting is very similar to Markdown. You just need to use the following symbols:
```typst
*bold*
_italic_
#highlight[highlighted]
```
More styling options can be applied through functions, for example:
```typst
#strike[struck through]
```
For completeness and demonstration, here in the text we have *bold text*, _italic text_, #strike[struck-through text],
and #highlight[text highlighted with your faculty's color].
It's also possible to typeset #underline[underlined text] (although typographers generally advise against using underlining).
== Links<links>
You can create links to URLs/URIs, emails, phone numbers, and more.
A URL (URI) link can be written directly, without calling any function --- just type it in:
https://git.zumepro.cz/tul/tultemplate2
```typst
https://git.zumepro.cz/tul/tultemplate2
```
Internally, this automatically calls the `link` function.
If we want to link to less common things (like email addresses), we can call the `link` function explicitly:
```typst
#link("mailto:ondrej@mekina.cz")[Email of this template's maintainer]
```
First, you pass the link target (perhaps a URL address) in parentheses to the link function and then you follow up with the content that will be displayed in the document enclosed in brackets.
You can find other prefixes (URI schemes) on Wikipedia:
https://en.wikipedia.org/wiki/List_of_URI_schemes.
== Images
Images can be inserted either by themselves or with a caption.
An image is inserted using the `image` function:
To add a caption and also include the image in the index (so you can reference it later), use the `figure` function:
#block([
```typst
#figure(
image("myimage.jpg"),
caption: [
*A beautiful* picture that looks like a picture.
]
)
```
], breakable: false)
Here's a practical example of inserting an image with a caption:
#figure(image("../template/assets/tul_logo.svg", width: 25%), caption: [
Logo of *TUL*
])
The first parameter of the function is the displayed content --- in our case, the mentioned `image`.
You can then specify various parameters for it; in the example above (where we display the TUL logomark), we define the image width as a percentage --- a percentage of the page's width.
The last parameter is `caption`, which lets us set the figure's (or image's) caption text.
If the document type requires it, images will automatically appear in a list at the beginning of the document.
Typst handles this automatically for you --- all you need to do is add images wherever appropriate, and they'll show up correctly in the *List of images*, complete with references and page numbers.
Images are also numbered automatically according to the predefined style, similar to chapters.
== Tables
Tables can be created like this:
```typst
#figure(table(
columns: 3,
table.header([], [*Column 1*], [*Column 2*]),
[*Row 1*], [a], [b],
[*Row 2*], [c], [d],
), caption: "My beautiful table")
```
The `columns` parameter specifies the number of columns in the table.
Then comes any number of table cells --- for clarity, the rows are separated in the example.
Finally, there's again a `caption` parameter, used to provide a caption for the table.
#highlight[It's a good idea to wrap the table header (the first row) in the `header` function (as shown above)] --- this ensures Typst includes extra metadata in the generated PDF (for example, for people with visual impairments).
#figure(table(
columns: 3,
table.header([], [*Column 1*], [*Column 2*]),
[*Row 1*], [a], [b],
[*Row 2*], [c], [d],
), caption: "My beautiful table")
Tables also appear at the beginning of the document in a list (if required by the document type).
As you've probably noticed by now, this template takes care of this automatically too.
== Citations
The template supports citation management using a standard BibLaTeX file @bibtex, just like LaTeX.
Almost every website or program that supports citations can generate BibLaTeX-formatted entries --- we recommend using either #link("https://www.zotero.org/")[Zotero] or #link("https://www.citacepro.com/")[Citace.com].
You simply add the code for such a citation, in the proper format, to the file _citations.bib_.
Once added, you can reference it using `@citation_name` or `#cite(<citation_name>)`.
For example, I can reference the Typst citation as #cite(<typst>).
The format of the _citations.bib_ file is exactly the same as in LaTeX.
You can even copy entries directly from sites like in BibLaTeX format --- Typst understands that format, too.
If you open a `.bib` file, you'll see that it's simply a plain text file with a specific structure.
The provided sample file already contains several citations --- for instance, the one named `typst`, which was already used above.
You can change the file from which citations are loaded using a template argument (i.e., in the structure at the beginning of your Typst document):
```typst
#show: tultemplate2.with(
...
citations: "anotherfile.bib",
...
)
```
== Internal Links and Anchors<example_anchor>
Let's continue from the *Links* section (@links).
You can also create internal links --- for instance, to chapters, pages, or labeled images (those wrapped with the `figure` function).
```typst
= A Good Chapter<good_chapter>
Let's take a look at A Good Chapter (@good_chapter).
```
Here's what an anchor looks like:
```typst
<anchor_name>
```
You place the anchor on a listed item (after a heading or an image for example), and you can reference it the same way you reference citations:
```typst
@anchor_name
```
We can take a look at this illustrative reference (@example_anchor).
== Abbreviations
The LaTeX TUL template includes a list of abbreviations at the beginning of the document --- therefore, we've included one here as well.
This list is configured to appear only if there is *at least one* abbreviation defined --- which seemed quite logical.
You can create (define) the abbreviation #abbr("ABC", "Alphabet") like this:
```typst
#abbr("ABC", "Alphabet")
```
After that, you can use the abbreviation #abbr("ABC") directly without redefining it:
```typst
#abbr("ABC")
```
The template automatically ensures the following:
- The abbreviation appears in the list of abbreviations
- When you use an abbreviation for the first time, the template requires you to define it
- The abbreviation is only defined once (the first time) or the template will scream in red at you
When used for the first time (definition), the abbreviation will look like this: #abbr("ABR", "Abbreviation")
In subsequent uses, it will appear as: #abbr("ABR")
#highlight[
In other words, you do _not_ add abbreviations directly to the abbreviation list.
You simply use them elegantly within the text itself.
]
== Attachments
At the end of the file, you can add the list of attachments.
Currently, we support four types of attachments: links, content, PDF file attached at the end of the document and a reference to an external file (perhaps attached to the system with your {{what}}).
As a demonstration, there's a practical example included right after this paragraph in the source code, which generates the attachments for this document.
#attachments(
attach_link("Source code of this template", "https://git.zumepro.cz/tul/tultemplate2"),
attach_content("Test content generated by Typst", [Here you can write _styled_ content.]),
)

0
theses/dis_cs.typ Normal file
View File

0
theses/dis_en.typ Normal file
View File

56
theses/dp_cs.typ Normal file
View File

@@ -0,0 +1,56 @@
#import "../template/template.typ": *
#show: tultemplate2.with(
style: "classic",
faculty: "fm",
lang: "cs",
document: "dp",
assignment: (
personal_number: [A00000007],
department: [Ústav šablon],
academical_year: [2025/2026],
content: [
= Zásady pro vypracování:
+ Seznamte se s možnostmi šablon
+ Navrhněte několik možných stylů šablon
+ Seznamte se s nástrojem Typst
+ Implementujte šablonu
+ Zkonzultujte šablonu
+ Opravte spoustu věcí
+ Zkonzultujte šablonu
+ Opravte spoustu věcí
+ Zkonzultujte šablonu
+ Snad nebude nic potřeba opravit
= Seznam odborné literatury:
_Přísně tajné_
],
),
title: (
cs: [Ukázka dokumentu typu Diplomová práce pro FM TUL v češtině],
en: [Example document for a Diploma thesis for FM TUL in Czech],
),
author: [Matěj Žucha],
author_pronouns: "masculine",
programme: (cs: [MI6000000007 Přísně tajné]),
specialization: (cs: [Vytváření šablon]),
supervisor: [Ondřej Mekina],
abstract: (
cs: [
Tento dokument slouží jako praktická ukázka všech důležitých funkcí šablony _tultemplate2_,
s názornými příklady použítí a jejich podrobným popisem.
],
en: [
This document serves as a practical demonstration of all the important features of the
_tultemplate2_ template, with useful examples and their respective descriptions.
],
),
keywords: (
cs: [Ukázka, Klíčových, Slov, Česky],
en: [Example, Keywords, In, English],
),
acknowledgement: (cs: [Lorem ipsum dolor sit amet.]),
citations: "citations.bib",
)
Diplomová práce
diplomovou prací

55
theses/dp_en.typ Normal file
View File

@@ -0,0 +1,55 @@
#import "../template/template.typ": *
#show: tultemplate2.with(
style: "classic",
faculty: "fm",
lang: "en",
document: "dp",
assignment: (
personal_number: [A00000007],
department: [Department of templates],
academical_year: [2025/2026],
content: [
= Principles for drafting:
+ Familiarize yourself with available templates
+ Design several possible template styles
+ Learn to use Typst
+ Implement the template
+ Review the template
+ Fix many issues
+ Review the template
+ Fix many issues
+ Review the template
+ Hopefully nothing more needs fixing
= List of professional literature:
_Top secret_
],
),
title: (
cs: [Ukázka dokumentu typu Diplomová práce pro FM TUL v angličtině],
en: [Example document for a Diploma thesis for FM TUL in English],
),
author: [Matěj Žucha],
author_pronouns: "me",
programme: (en: [MI6000000007 Top secret]),
specialization: (en: [Creation of templates]),
supervisor: [Ondřej Mekina],
abstract: (
cs: [
Tento dokument slouží jako praktická ukázka všech důležitých funkcí šablony _tultemplate2_,
s názornými příklady použítí a jejich podrobným popisem.
],
en: [
This document serves as a practical demonstration of all the important features of the
_tultemplate2_ template, with useful examples and their respective descriptions.
],
),
keywords: (
cs: [Ukázka, Klíčových, Slov, Česky],
en: [Example, Keywords, In, English],
),
acknowledgement: (en: [Lorem ipsum dolor sit amet.]),
citations: "citations.bib",
)
Diploma thesis

0
theses/hab_cs.typ Normal file
View File

0
theses/hab_en.typ Normal file
View File

56
theses/prj_cs.typ Normal file
View File

@@ -0,0 +1,56 @@
#import "../template/template.typ": *
#show: tultemplate2.with(
style: "classic",
faculty: "fm",
lang: "cs",
document: "prj",
assignment: (
personal_number: [A00000007],
department: [Ústav šablon],
academical_year: [2025/2026],
content: [
= Zásady pro vypracování:
+ Seznamte se s možnostmi šablon
+ Navrhněte několik možných stylů šablon
+ Seznamte se s nástrojem Typst
+ Implementujte šablonu
+ Zkonzultujte šablonu
+ Opravte spoustu věcí
+ Zkonzultujte šablonu
+ Opravte spoustu věcí
+ Zkonzultujte šablonu
+ Snad nebude nic potřeba opravit
= Seznam odborné literatury:
_Přísně tajné_
],
),
title: (
cs: [Ukázka dokumentu typu Projekt pro FM TUL v češtině],
en: [Example document for a Project report for FM TUL in Czech],
),
author: [Matěj Žucha],
author_pronouns: "masculine",
programme: (cs: [MI6000000007 Přísně tajné]),
specialization: (cs: [Vytváření šablon]),
supervisor: [Ondřej Mekina],
abstract: (
cs: [
Tento dokument slouží jako praktická ukázka všech důležitých funkcí šablony _tultemplate2_,
s názornými příklady použítí a jejich podrobným popisem.
],
en: [
This document serves as a practical demonstration of all the important features of the
_tultemplate2_ template, with useful examples and their respective descriptions.
],
),
keywords: (
cs: [Ukázka, Klíčových, Slov, Česky],
en: [Example, Keywords, In, English],
),
acknowledgement: (cs: [Lorem ipsum dolor sit amet.]),
citations: "citations.bib",
)
Ročníkový projekt
ročníkovým projektem

55
theses/prj_en.typ Normal file
View File

@@ -0,0 +1,55 @@
#import "../template/template.typ": *
#show: tultemplate2.with(
style: "classic",
faculty: "fm",
lang: "en",
document: "prj",
assignment: (
personal_number: [A00000007],
department: [Department of templates],
academical_year: [2025/2026],
content: [
= Principles for drafting:
+ Familiarize yourself with available templates
+ Design several possible template styles
+ Learn to use Typst
+ Implement the template
+ Review the template
+ Fix many issues
+ Review the template
+ Fix many issues
+ Review the template
+ Hopefully nothing more needs fixing
= List of professional literature:
_Top secret_
],
),
title: (
cs: [Ukázka dokumentu typu Projekt pro FM TUL v angličtině],
en: [Example document for a Project report for FM TUL in English],
),
author: [Matěj Žucha],
author_pronouns: "me",
programme: (en: [MI6000000007 Top secret]),
specialization: (en: [Creation of templates]),
supervisor: [Ondřej Mekina],
abstract: (
cs: [
Tento dokument slouží jako praktická ukázka všech důležitých funkcí šablony _tultemplate2_,
s názornými příklady použítí a jejich podrobným popisem.
],
en: [
This document serves as a practical demonstration of all the important features of the
_tultemplate2_ template, with useful examples and their respective descriptions.
],
),
keywords: (
cs: [Ukázka, Klíčových, Slov, Česky],
en: [Example, Keywords, In, English],
),
acknowledgement: (en: [Lorem ipsum dolor sit amet.]),
citations: "citations.bib",
)
Project

40
theses/sp_cs.typ Normal file
View File

@@ -0,0 +1,40 @@
#import "../template/template.typ": *
#show: tultemplate2.with(
style: "classic",
faculty: "fm",
lang: "cs",
document: "sp",
assignment: (
personal_number: [A00000007],
department: [Ústav šablon],
academical_year: [2025/2026],
content: [
= Zásady pro vypracování:
+ Seznamte se s možnostmi šablon
+ Navrhněte několik možných stylů šablon
+ Seznamte se s nástrojem Typst
+ Implementujte šablonu
+ Zkonzultujte šablonu
+ Opravte spoustu věcí
+ Zkonzultujte šablonu
+ Opravte spoustu věcí
+ Zkonzultujte šablonu
+ Snad nebude nic potřeba opravit
= Seznam odborné literatury:
_Přísně tajné_
],
),
title: (
cs: [Ukázka dokumentu typu Semestrální práce pro FM TUL v češtině],
en: [Example document for a Term paper for FM TUL in Czech],
),
author: [Matěj Žucha],
author_pronouns: "masculine",
programme: (cs: [MI6000000007 Přísně tajné]),
specialization: (cs: [Vytváření šablon]),
citations: "citations.bib",
)
Semestrální práce
vaší semestrální prací

39
theses/sp_en.typ Normal file
View File

@@ -0,0 +1,39 @@
#import "../template/template.typ": *
#show: tultemplate2.with(
style: "classic",
faculty: "fm",
lang: "en",
document: "sp",
assignment: (
personal_number: [A00000007],
department: [Department of templates],
academical_year: [2025/2026],
content: [
= Principles for drafting:
+ Familiarize yourself with available templates
+ Design several possible template styles
+ Learn to use Typst
+ Implement the template
+ Review the template
+ Fix many issues
+ Review the template
+ Fix many issues
+ Review the template
+ Hopefully nothing more needs fixing
= List of professional literature:
_Top secret_
],
),
title: (
cs: [Ukázka dokumentu typu Semestrální práce pro FM TUL v češtině],
en: [Example document for a Term paper for FM TUL in Czech],
),
author: [Matěj Žucha],
author_pronouns: "me",
programme: (en: [MI6000000007 Top secret]),
specialization: (en: [Creation of templates]),
citations: "citations.bib",
)
Term paper

0
theses/teze_cs.typ Normal file
View File

0
theses/teze_en.typ Normal file
View File