commit acdbae8d9008c931d14015e87fa9d0abb10b3d4c Author: Filip Rojek Date: Sat Feb 14 20:53:06 2026 +0100 First commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a136337 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pdf diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a0e9bfc --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +SOURCE = main.typ +OUTPUT = main.pdf +FONTS_DIR = fonts +VIEWER = zathura + +TYPST = typst + +.PHONY: all watch clean + +# compile PDF +all: $(OUTPUT) + +# compile with font path +$(OUTPUT): $(SOURCE) template.typ + $(TYPST) compile $(SOURCE) --font-path $(FONTS_DIR) + +# compile with watch mode +watch: + #$(TYPST) watch $(SOURCE) --font-path $(FONTS_DIR) + ($(VIEWER) $(OUTPUT) &) && $(TYPST) watch $(SOURCE) --font-path $(FONTS_DIR) + +# clean generated files +clean: + rm -f $(OUTPUT) diff --git a/README.md b/README.md new file mode 100644 index 0000000..8ddb1bd --- /dev/null +++ b/README.md @@ -0,0 +1,81 @@ +# Bachelor Thesis Template (Typst) – PedF UK + +This repository contains a **Typst** template for writing a Bachelor's thesis at the **Faculty of Education, Charles University (PedF UK)**. + +The template is designed to comply with the **Dean's Measure No. 28/2024** (Opatření děkana č. 28/2024), including specific requirements for: +* **Typography:** Times New Roman, 12pt, 1.5 line spacing. +* **Layout:** Margins (25mm/35mm) and mandatory section order. +* **Formalities:** Title page without the university logo, specific AI usage declaration, and abstract formatting. + +## Project Structure + +```text +. +├── fonts/ # Local directory for Times New Roman fonts +│ └── Times New Roman... # Ensures correct compilation on any OS/Linux distro +├── main.typ # MAIN FILE: Edit your thesis content and metadata here +├── template.typ # STYLING: Definitions of layout, title page, and macros +├── Makefile # AUTOMATION: Build and watch commands +└── .gitignore # Git configuration (ignores generated PDFs) +``` + +## Prerequisites + +To work with this template, you need the following installed on your system: + +1. **Typst** (CLI compiler) +2. **GNU Make** (to run the build commands) +3. **Zathura** (PDF viewer, recommended for the `watch` mode workflow) + +## Usage + +This project uses a `Makefile` to handle font paths and compilation. Do not run `typst compile` directly unless you manually specify the font path. + +### 1. Start Writing (Watch Mode) +This is the main command for development. It compiles the document, opens **Zathura**, and automatically recompiles whenever you save changes in `main.typ`. + +```bash +make watch +``` + +### 2. Build PDF (One-off) +Generates the final `main.pdf`. + +```bash +make +``` + +### 3. Clean +Removes the generated PDF file. Recommended before the final build to ensure a clean state. + +```bash +make clean +``` + +## How to Write + +### Editing Metadata +Open `main.typ`. At the top of the file, fill in the `project` function parameters: +* **Title (CZ/EN):** Your thesis title. +* **Author/Supervisor:** Names including titles. +* **Abstracts & Keywords:** Ensure abstracts are at least 200 words long. + +### Writing Content +Write your text in `main.typ` after the header. +* **Headings:** Use `=` for chapters, `==` for sections. + * *Note:* The template automatically starts main chapters (Introduction, Conclusion, etc.) on a new page as required. +* **Formatting:** + * Bold: `*text*` + * Italic: `_text_` + * Citations: Use `@reference` (requires a `.bib` or `.yml` bibliography file). + +### AI Declaration +The template includes the mandatory **AI usage declaration** required by Dean's Measure No. 28/2024. +* If you **did not** use AI: The standard declaration on the second page is sufficient. +* If you **did** use AI (e.g., for grammar correction): You must also fill out the **"Vyjádření k využití nástrojů umělé inteligence"** section at the end of the thesis, describing exactly how the tools were used. + +## fonts/ Directory +The faculty requires **Times New Roman**. Since this font is proprietary and not available by default on many Linux distributions (like Void Linux), it is included in the `fonts/` directory. The `Makefile` ensures Typst uses these local fonts during compilation, making the project portable. + +## Submission +The final output is `main.pdf`. This file is ready for upload to the **Student Information System (SIS)**. Ensure you do not change the text after submission (except for errata). diff --git a/fonts/Times New Roman Regular.ttf b/fonts/Times New Roman Regular.ttf new file mode 100644 index 0000000..51261a0 Binary files /dev/null and b/fonts/Times New Roman Regular.ttf differ diff --git a/main.typ b/main.typ new file mode 100644 index 0000000..31ca5b8 --- /dev/null +++ b/main.typ @@ -0,0 +1,52 @@ +#import "template.typ": project + +#show: project.with( + title_cz: "Název bakalářské práce v češtině", + title_en: "Title of the Bachelor Thesis in English", + author: "Jméno Příjmení", + department: "Katedra informačních technologií a technické výchovy", + program: "Specializace v pedagogice", + supervisor: "titul. Jméno Příjmení, titul.", + year: "2025", + + abstract_cz: [ + Zde napíšete abstrakt v českém jazyce. Musí mít rozsah alespoň 200 slov a stručně charakterizovat cíle, metody a výsledky práce. + ], + keywords_cz: [slovo 1, slovo 2, slovo 3], + + abstract_en: [ + Here you write the abstract in English. It must be identical in content to the Czech abstract. + ], + keywords_en: [keyword 1, keyword 2, keyword 3], + + acknowledgement: [ + Rád bych poděkoval svému vedoucímu práce za cenné rady... + ], +) + += Úvod +Vlastní text práce. Odstavce jsou odsazeny a zarovnány do bloku. Písmo je nastaveno na 12 bodů [6]. + +== Cíle práce +Text kapitoly... + += Teoretická část +Pokud používáte citace, Typst je skvělý v práci s BibTeX nebo Hayagriva soubory. Citace musí obsahovat všechny údaje potřebné k dohledání zdroje [10]. + += Praktická část + += Závěr + +// --- POVINNÉ SEZNAMY NA KONCI --- + +#pagebreak() += Seznam použitých zdrojů +// Zde vložte bibliografii, např.: #bibliography("sources.bib") + +#pagebreak() += Vyjádření k využití nástrojů umělé inteligence +// POVINNÉ, pokud bylo AI použito [11, 12]. Pokud ne, prohlášení na začátku práce stačí, ale tato sekce je v seznamu náležitostí pod bodem k) [4]. +V souladu s opatřením děkana č. 28/2024 uvádím, že jsem při tvorbě práce využil nástroje umělé inteligence (např. ChatGPT) pro účely jazykové korektury a rešerše zdrojů. Vlastní text práce a myšlenky jsou mým autorským dílem. + +#pagebreak() += Seznam příloh diff --git a/template.typ b/template.typ new file mode 100644 index 0000000..b67b79b --- /dev/null +++ b/template.typ @@ -0,0 +1,118 @@ +#let project( + title_cz: "", + title_en: "", + author: "", + department: "", + program: "", + supervisor: "", + year: "", + abstract_cz: [], + keywords_cz: [], + abstract_en: [], + keywords_en: [], + acknowledgement: none, + body +) = { + // Nastavení dokumentu a písma dle požadavků [5] + set document(author: author, title: title_cz) + set page( + paper: "a4", + margin: (left: 35mm, right: 25mm, top: 25mm, bottom: 25mm), // Okraje pro vazbu [5] + numbering: "1", // Číslování arabskými číslicemi [6] + ) + // Písmo Times New Roman, 12pt, řádkování 1.5 [5] + set text(font: "Times New Roman", size: 12pt, lang: "cs") + set par(justify: true, leading: 0.65em, spacing: 0.6em) + + // --- TITULNÍ LIST [1, 2] --- + // Na titulním listu se číslo strany netiskne [6] + page(numbering: none)[ + #set align(center) + #text(size: 14pt, weight: "bold")[Univerzita Karlova]\ + #text(size: 14pt, weight: "bold")[Pedagogická fakulta] + #v(1em) + #text(size: 12pt)[#department] + + #v(1fr) + + #text(size: 16pt, weight: "bold")[BAKALÁŘSKÁ PRÁCE] + + #v(1fr) + + #text(size: 14pt, weight: "bold")[#title_cz] + #v(0.5em) + #text(size: 12pt)[#title_en] + + #v(2fr) + + #align(left)[ + #grid( + columns: (auto, auto), + gutter: 1em, + strong("Autor:"), author, + strong("Vedoucí práce:"), supervisor, + strong("Studijní program:"), program, + ) + ] + + #v(2em) + Praha #year + ] + + // --- PROHLÁŠENÍ [3] --- + page(numbering: none)[ + #v(1fr) + #heading(outlined: false, numbering: none)[Prohlášení] + Odevzdáním této bakalářské práce na téma *#title_cz* potvrzuji, že jsem ji vypracoval/a pod vedením vedoucího práce samostatně za použití v práci uvedených pramenů a literatury. Prohlašuji, že jsem při její tvorbě nepoužil/a nástrojů umělé inteligence jiným způsobem, než je uvedeno ve vyjádření, které je součástí textu práce. Dále potvrzuji, že tato práce nebyla využita k získání jiného nebo stejného titulu. + + #v(2cm) + V Praze dne .............................. \ + #h(7cm) ..................................................... \ + #h(8.5cm) #author + ] + + // --- PODĚKOVÁNÍ (Volitelné) [4, 7] --- + if acknowledgement != none { + page(numbering: none)[ + #v(1fr) + #heading(outlined: false, numbering: none)[Poděkování] + #acknowledgement + ] + } + + // --- ABSTRAKTY A KLÍČOVÁ SLOVA [4, 7] --- + // Poznámka: Abstrakty musí mít min. 200 slov [5, 7] + page(numbering: none)[ + #heading(outlined: false, numbering: none)[Abstrakt] + #abstract_cz + + #v(1em) + *Klíčová slova:* #keywords_cz + + #v(2em) + #heading(outlined: false, numbering: none)[Abstract] + #abstract_en + + #v(1em) + *Keywords:* #keywords_en + ] + + // --- OBSAH [4] --- + page(numbering: none)[ + #outline(depth: 3, indent: auto) + ] + + // --- HLAVNÍ TEXT --- + // Nadpisy 1. úrovně 14pt, ostatní dle kontextu [6] + set heading(numbering: "1.1") + show heading.where(level: 1): it => { + pagebreak(weak: true) // Hlavní kapitoly na nové straně [8] + text(size: 14pt, weight: "bold", it) + v(0.5em) + } + + // Číslování začíná od první strany textu [6] + counter(page).update(1) + + body +}