develop example theses content

This commit is contained in:
2025-11-24 14:25:25 +01:00
parent de4f72aa54
commit 7ccfe1cfe3
3 changed files with 327 additions and 8 deletions

View File

@@ -48,17 +48,10 @@
''; '';
}; };
documentation = build "documentation.pdf"; 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 in
{ {
packages.documentation = documentation; packages.documentation = documentation;
packages.theses = theses; packages.default = merge [documentation] name;
packages.default = merge [documentation theses] name;
packages.pack = build_with_target "pack" (builtins.map (v: "target/pack/" + v) [ packages.pack = build_with_target "pack" (builtins.map (v: "target/pack/" + v) [
"tultemplate2" "tultemplate2.zip" "tultemplate2" "tultemplate2.zip"
]); ]);

View File

@@ -322,6 +322,93 @@ Při dalších použití bude vypadat takto: #abbr("ZK")
Tedy zkratku _nepřidáváte_ přímo do seznamu zkratek, ale elegantně používáte přímo v textu. Tedy zkratku _nepřidáváte_ přímo do seznamu zkratek, ale elegantně používáte přímo v textu.
] ]
= Specifická použití
V této kapitole se podíváme na některá specifická použití.
Můžete zde tedy najít věci, které nebudete vůbec potřebovat.
Pokud vás z této kapitoly nic nezajímá, tak ji klidně přeskočte -- zlobit se nebudeme.
== Rovnice, vzorečky a matematika
Pokud vaše práce bude obsahovat matematické značení, pak je tato kapitola pro vás.
V této kapitole vám představíme nějaké základy -- pokud vám tyto základy stačit nebudou, doporučujeme se obrátit na dokumentaci Typstu: https://typst.app/docs/reference/math/
=== Matematický režim
Matematický režim speciální syntaxi pro zápis matematických výrazů.
V matematickém režimu tato šablona použije jiný font -- vhodný pro zápis čísel a speciálních matematických znaků.
Pokud chcete vstoupit do matematického režimu, obklopte výraz znaky dolaru "`$`".
```typst
$1 + 1 = 42$
```
Ukázka: $1 + 1 = 42$
Jak sami vidíte, v matematickém režimu používáte poměrně srozumitelný způsob zápisu.
Dále si ukážeme nějaké specifické zápisy.
=== Sčítání
Součet zapíšete pomocí znaku "`+`".
```typst
$1 + 2 = 3$
```
Ukázka: $1 + 2 = 3$
=== Odčítání
Rozdíl zapíšete pomocí znaku "`-`".
```typst
$3 - 2 = 1$
```
Ukázka: $3 - 2 = 1$
=== Násobení<nasobeni>
Součin zapíšete pomocí příkazu "`dot`". Jedná se o ekvivalent LaTeXového "`cdot`".
#highlight[Narozdíl od LaTeXu před příkazy v matematickém režimu nepřidáváte zpětné lomítko "`\`".]
```typst
$2 dot 3 = 6$
```
Ukázka: $2 dot 3 = 6$
=== Dělení
Podíl zapíšete pomocí znaku "`/`".
```typst
$1 / 2 = 0.5$
```
Ukázka: $1 / 2 = 0.5$
Pokud chcete do zlomku dát výraz, a ne pouhé číslo, zabalte čitatel / jmenovatel do kulatých závorek.
```typst
$(1 + 1) / (4 - 2) = 2 / 2 = 1$
```
Ukázka: $(1 + 1) / (4 - 2) = 2 / 2 = 1$
=== Text
Jak můžeme vidět u Násobení (@nasobeni), pokud napíšeme v matematickém režimu slovo, Typst ho bude interpretovat jako příkaz.
Pokud ale chceme napsat skutečně text, který se vykreslí do dokumentu, obklopíme text uvozovkami.
```typst
$69 "cm"$
```
Ukázka: $69 "cm"$
= Používání funkcí = 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. 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.
@@ -439,6 +526,82 @@ Pokud se ale chcete dozvědět _ještě_ víc, pak vám doporučujeme se podíva
https://typst.app/docs/reference/text/ https://typst.app/docs/reference/text/
= Balíčky
Nenašli jste nějakou funkci v tomto dokumentu ani v Typst dokumentaci?
Žádný problém. Je naprosto možné, že na to bude existovat nějaký pěkný balíček.
Stejně jako například LaTeX, Typst na výběr velké množství balíčků, které vám poskytnou dodatečné funkce.
Tyto balíčky stáhnete pomocí velmi jednoduchého příkazu "`import`".
_Po_ příkazu import můžete používat naimportované funkce z balíčku.
== Ukázka balíčku
Pokud bych tak chtěl stáhnout například balíček "`alchemist`" na vykreslování chemických struktur, použiji následující import:
```typst
#import "@preview/alchemist:0.1.8": skeletize, fragment, branch, double, single
```
Textový řetězec (text v uvozovkách) je název balíčku a jeho verze -- název a verzi najdete na seznamu balíčků viz. @seznam_balicku.
Všechno za dvojtečkou jsou funkce, které chcete importovat (oddělené čárkami).
Pokud budete chtít naimportovat úplně všechny funkce balíčku, pak použijete hvězdičku:
```typst
#import "@preview/alchemist:0.1.8": *
```
Ukázka použití balíčku alchemist (podívejte se do zdroje dokumentu):
// ___ Ukázka balíčku Alchemist ___
#import "@preview/alchemist:0.1.8": skeletize, fragment, branch, double, single
#skeletize({ // příkaz na vykreslení chemické struktury
fragment(name: "S", "S") // síra uprostřed
// kyslíky
branch({
double(angle: 3, atom-sep: 1.422) // dvojná vazba
fragment(name: "O1", "O") // kyslík (name musí být unikátní -- proto ta jednička)
})
branch({
double(angle: 1, atom-sep: 1.422)
fragment(name: "O2", "O")
})
branch({
single(angle: -1, atom-sep: 1.574) // jednoduchá vazba
fragment(name: "O3", "O")
branch({
single(angle: 1, atom-sep: .97)
fragment(name: "H1", "H") // vodík
})
})
branch({
single(angle: -3, atom-sep: 1.574)
fragment(name: "O4", "O")
branch({
single(angle: -2, atom-sep: .97)
fragment(name: "H2", "H")
})
})
})
// __ Konec ukázky ___
== Seznam balíčků<seznam_balicku>
Balíčků je opravdu mnoho a všechny je v tomto dokumentu ukázat nemůžeme.
Vy si ale nějaký můžete vybrat a ten vyzkoušet.
Doporučujeme balíčky hledat pomocí vyhledávání v Typst Universe.
Seznam balíčků v Typst Universe je dostupný na URL: https://typst.app/universe/search/?kind=packages
Když si z tohoto seznamu nějaký balíček rozkliknete a budete ho chtít naimportovat -- stačí si v sekci "How to add" zkopírovat příkaz import pomocí tlačítka a tento příkaz vložit někam do obsahu vašeho dokumentu (například před první použití jeho funkcí).
Balíček stačí naimportovat pouze jednou. Pokud chcete naimportovat další funkce, jednodušše je přidejte oddělené čárkou za příkaz import.
= Přílohy = Přílohy
Na konec souboru je také možné přidat seznam příloh. Na konec souboru je také možné přidat seznam příloh.

View File

@@ -322,6 +322,93 @@ In subsequent uses, it will appear as: #abbr("ABR")
You simply use them elegantly within the text itself. You simply use them elegantly within the text itself.
] ]
= Specific usage
In this chapter you'll find some specific concepts.
You can find things that you might not need at all.
If nothing of this chapter interests you, go right ahead and skip it --- we won't be angry.
== Equations, formulas and maths
If your thesis will contain some mathematical notation, this chapter is for you.
In this chapter we'll cover some basics --- if the basics in this document won't be enough for you, we recommend checking out the Typst documentation: https://typst.app/docs/reference/math/
=== Math mode
The math mode has a special syntax for typesetting mathematics.
In the math mode, the template will use a different font --- a font suitable for typing numbers and special mathematical symbols.
If you want to enter the math mode, surround the content with the dollar sign "`$`".
```typst
$1 + 1 = 42$
```
Shown as: $1 + 1 = 42$
As you can see, in the math mode you use a pretty understandable syntax.
Let's get to some specific expressiosn now.
=== Addition
Addition can be written using the "`+`" sign.
```typst
$1 + 2 = 3$
```
Shown as: $1 + 2 = 3$
=== Subtraction
Subtraction can be written using the "`-`" symbol.
```typst
$3 - 2 = 1$
```
Shown as: $3 - 2 = 1$
=== Multiplication<multiplication>
Multiplication can be written using the command "`dot`". It's an equivalent of the LaTeX command "`cdot`".
#highlight[Contrary to LaTeX, you don't add the backslash "`\`" to call a command in the math mode.]
```typst
$2 dot 3 = 6$
```
Shown as: $2 dot 3 = 6$
=== Division
Division can be written using the "`/`" symbol.
```typst
$1 / 2 = 0.5$
```
Shown as: $1 / 2 = 0.5$
If you want to put an expression in the fraction, and not just a number, wrap the numerator / denominator in parentheses.
```typst
$(1 + 1) / (4 - 2) = 2 / 2 = 1$
```
Shown as: $(1 + 1) / (4 - 2) = 2 / 2 = 1$
=== Text
As you can see in Multiplication (@multiplication), if we write a word in the math mode, Typst will interpret it as a command.
If you want to write real text, shown in the document, instead, we must surround the text with double-quotes.
```typst
$69 "cm"$
```
Shown as: $69 "cm"$
= Using Functions = Using Functions
Most Typst features are used through what's called function calls. Most Typst features are used through what's called function calls.
@@ -443,6 +530,82 @@ However, if you want to know _even more_, we recommend checking out the document
https://typst.app/docs/reference/text/ https://typst.app/docs/reference/text/
= Packages
You want some function but you couldn't find it in this document nor in the Typst documentation?
No problem. Chances are, there is a package for it.
Similarly to LaTeX, Typst has a broad range of packages with additional functions.
You can download and use those packages with the very simple "`import`" command.
_After_ the import you can directly use the imported functions from the package.
== Package example
If I wish to download the package "`alchemist`" (for drawing chemical structures) for example, I will use the following import:
```typst
#import "@preview/alchemist:0.1.8": skeletize, fragment, branch, double, single
```
The text string (text in the double-quotes) is the package name and it's version --- you can find the name and the version in the package list in @package_list.
After the colon are the functions which you wish to import (comma-separated).
If you wish to import everything from the package, use an asterisk:
```typst
#import "@preview/alchemist:0.1.8": *
```
Example usage of the alchemist package (look at the document source):
// ___ Example with the Alchemist package ___
#import "@preview/alchemist:0.1.8": skeletize, fragment, branch, double, single
#skeletize({ // the command to render the chemical structure
fragment(name: "S", "S") // sulfur in the middle
// oxygens
branch({
double(angle: 3, atom-sep: 1.422) // double bond
fragment(name: "O1", "O") // oxygen (name must be unique --- hence the one)
})
branch({
double(angle: 1, atom-sep: 1.422)
fragment(name: "O2", "O")
})
branch({
single(angle: -1, atom-sep: 1.574) // simple bond
fragment(name: "O3", "O")
branch({
single(angle: 1, atom-sep: .97)
fragment(name: "H1", "H") // hydrogen
})
})
branch({
single(angle: -3, atom-sep: 1.574)
fragment(name: "O4", "O")
branch({
single(angle: -2, atom-sep: .97)
fragment(name: "H2", "H")
})
})
})
// __ Example end ___
== Package list<package_list>
There is a load of packages and we can't show all of them in this document.
But you can pick one and go try it.
We recommend searching for packages through the Typst Universe.
The package list in Typst Universe is available at: https://typst.app/universe/search/?kind=packages
If you pick some package from this list, open it in the listing and will wish to import it --- just use the copy button in the section "How to add" and paste the command in your document (before the first usage of it's functions for example).
You need to import the package just once. If you'll want to import more functions, just add them after the import comma-separated.
= Attachments = Attachments
At the end of the file, you can add the list of attachments. At the end of the file, you can add the list of attachments.