diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..44f43fc Binary files /dev/null and b/.DS_Store differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e456efb --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +*.png filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.svg filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7b3bebd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" diff --git a/.github/workflows/build-release-thesis.yml b/.github/workflows/build-release-thesis.yml new file mode 100644 index 0000000..1c46f95 --- /dev/null +++ b/.github/workflows/build-release-thesis.yml @@ -0,0 +1,47 @@ +name: Build and release thesis + +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + build_release_thesis: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: "0" + lfs: true + + - name: Create initial tag + run: | + if [ -z "$(git tag -l 'v*')" ]; then + git tag v0.0.0 + fi + + - name: Bump version and push tag + id: bump + uses: anothrNick/github-tag-action@1.70.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WITH_V: true + DEFAULT_BUMP: "patch" + + - uses: typst-community/setup-typst@v3 + - run: typst compile thesis.typ thesis.pdf + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.bump.outputs.new_tag }} + name: Version ${{ steps.bump.outputs.new_tag }} + draft: false + prerelease: false + files: | + thesis.pdf diff --git a/.github/workflows/build-typst.yml b/.github/workflows/build-typst.yml new file mode 100644 index 0000000..eaa140e --- /dev/null +++ b/.github/workflows/build-typst.yml @@ -0,0 +1,18 @@ +name: Build typst +on: + pull_request: + branches: + - main + +jobs: + build_release_thesis: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: "0" + lfs: true + + - uses: typst-community/setup-typst@v3 + - run: typst compile thesis.typ thesis.pdf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f08278d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pdf \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7c64d63 --- /dev/null +++ b/LICENSE @@ -0,0 +1,32 @@ +MIT License + +Original Copyright (c) 2023 TUM Applied Software Engineering + +Copyright (c) 2024 Joshua Beny Hürzeler + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +### Modifications made by Joshua Beny Hürzeler (2024) + +This version of the template has been modified for use with the University of St. Gallen (HSG) thesis guidelines. The following changes were made: +- Removed not needed proposal and registration_certificate templates +- Adjusted the title page, meta data files, etc to fit the HSG guidelines +- Adjusted the readme file to reflect the changes made diff --git a/README.md b/README.md new file mode 100644 index 0000000..1ecf3b9 --- /dev/null +++ b/README.md @@ -0,0 +1,118 @@ +# thesis-template-typst +This repository provides a unofficial Typst template for writing your Bachelor's or Master's thesis at the HSG (University of St. Gallen). It includes a thesis template. For more information about writing a thesis at the CIT School, please visit the [official CIT website](https://www.cit.tum.de/en/cit/studies/students/thesis-completing-your-studies/informatics/). + +**Note:** This is only a template. You have to adapt the template to your thesis and discuss the structure of your thesis with your supervisor! + +--- +## Guidelines + +__Please thorougly read the guidelines and hints on [website](https://www.unisg.ch/fileadmin/user_upload/HSG_ROOT/_Kernauftritt_HSG/Universitaet/Schools/SOM/Faculty/Chair_of_Organization_Studies/Guideline_HSG.pdf) + +--- +## Installation + +For detailed installation instructions, please refer to the [official installation guide](https://github.com/typst/typst). Here, we provide basic steps for installing Typst's CLI: + +- You can get sources and pre-built binaries from the [releases page](https://github.com/typst/typst/releases). +- Use package managers like `brew` or `pacman` to install Typst. Be aware that the versions in the package managers might lag behind the latest release. +- If you have a [Rust](https://rustup.rs/) toolchain installed, you can also install the latest development version. + +Nix and Docker users, please refer to the official installation guide for detailed instructions. + +## Usage +### Set thesis metadata +Fill in your thesis details in the [`metadata.typ`](/metadata.typ) file: +* The language of the document (en or de) +* Title +* Subtitle +* Type of thesis (Bachelor's, Master's, etc.) +* Professor +* Your name (without e-mail address or matriculation number) +* Matriculation number +* The submission date + +### Write your thesis +For the actual content of your thesis, there is a dedicated folder named [`/content`](/content) which includes all the chapters and sections of your thesis. +You can add or remove chapters as needed (adapt the [`thesis.typ`](/thesis.typ) with the `#include(...)` accordingly). +If you need to customize the layout of the template, you can do so by modifying the corresponding file in the [`layout`](/layout) directory. + +### Build PDFs locally +Once you have installed Typst, you can use it like this: +```sh +# Creates `thesis.pdf` in working directory. +typst compile thesis.typ + +# Creates PDF file at the desired path. +typst compile thesis.typ path/to/output.pdf +``` + +You can also watch source files and automatically recompile on changes. This is +faster than compiling from scratch each time because Typst has incremental +compilation. +```sh +# Watches source files and recompiles on changes. +typst watch thesis.typ +``` + +### Updating Your Repository to the Latest Template Version +If you have created your thesis repository using the Typst Thesis Template, you might want to update your repository to incorporate the latest changes from the template. Follow these steps to sync your repository with the latest version of the template. + +**Steps to Update:** +1. Add the Template Repository as a Remote +First, navigate to your repository in the terminal and add the original template repository as a new remote: +```sh +git remote add template https://github.com/joshuabeny1999/unisg-thesis-template-typst.git +``` + +2. Fetch the latest updates from the template repository: +```sh +git fetch template +``` + +3. Merge the Changes into Your Repository +Merge the changes from the template's main branch into your current branch. This might require resolving merge conflicts if there are any differences between your customizations and the template's updates: +```sh +git merge template/main --allow-unrelated-histories +``` + +4. Resolve Merge Conflicts +If there are any merge conflicts, git will notify you. Open the conflicting files, resolve the conflicts, and then add the resolved files: +```sh +git add +``` + +5. Commit the Merge +After resolving conflicts and adding the resolved files, commit the merge: +```sh +git commit -m "Merge updates from Typst Thesis Template" +``` + +6. Push the Changes to Your Repository +Finally, push the merged changes to your repository: +```sh +git push origin +``` + +## Working with the Typst Web Editor +If you prefer an integrated IDE-like experience with autocompletion and instant preview, the Typst web editor allows you to import files directly into a new or existing document. Here's how you can do this: + +1. Navigate to the [Typst Web Editor](https://typst.app/). +2. Create a new blank document. +3. Click on "File" on the top left menu, then "Upload File". +4. Select all .typ and .bib files along with the figures provided in this template repository. + +**Note:** You can select multiple files to import. The editor will import and arrange all the files accordingly. Always ensure you have all the necessary .typ, .bib, and figures files you need for your document. + +## Working with VS Code +If you prefer to have a more integrated experience with your favorite code editor, you can use the Typst VS Code extension. The extension provides syntax highlighting, autocompletion, and error checking for Typst files. You can install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp). + +1. Open your project in VS Code +2. Set the correct file (`thesis.typ` or `proposal.typ`) as the main file. This can be done by opening the respective file and running the command `Typst: Pin the main file to the currently opened document`. Just hit `CMD + Shift + P` and search for the command. + + +--- +## Further Resources + +- [Typst Documentation](https://typst.app/docs/) +- [Typst Guide for LaTeX Users](https://typst.app/docs/guides/guide-for-latex-users/) +- [Typst VS Code Extension (inofficial)](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp) diff --git a/content/01_content.typ b/content/01_content.typ new file mode 100644 index 0000000..f9a2867 --- /dev/null +++ b/content/01_content.typ @@ -0,0 +1,5 @@ += Heading 1 +== Heading 2 +=== Heading 3 +==== Heading 4 +This is a biblography cite: #cite() \ No newline at end of file diff --git a/content/02_content.typ b/content/02_content.typ new file mode 100644 index 0000000..bf61a12 --- /dev/null +++ b/content/02_content.typ @@ -0,0 +1,4 @@ += Heading 1 +== Heading 2 +=== Heading 3 +==== Heading 4 \ No newline at end of file diff --git a/content/abstract.typ b/content/abstract.typ new file mode 100644 index 0000000..e07e7f0 --- /dev/null +++ b/content/abstract.typ @@ -0,0 +1,7 @@ +#import "/utils/todo.typ": TODO + +#TODO[ + 1. *paragraph:* What is the motivation of your thesis? Why is it interesting from a scientific point of view? Which main problem do you like to solve? + 2. *paragraph:* What is the purpose of the document? What is the main content, the main contribution? + 3. *paragraph:* What is your methodology? How do you proceed? + ] \ No newline at end of file diff --git a/content/acknowledgement.typ b/content/acknowledgement.typ new file mode 100644 index 0000000..8f68fff --- /dev/null +++ b/content/acknowledgement.typ @@ -0,0 +1,7 @@ +First, I'd like to thank coffee for fueling my brain cells and making this thesis possible. + +A big shoutout to my advisor for your patience and for not laughing (too hard) at my wild ideas. + +To my family, your snack supplies and constant reminders to "just finish it already" were invaluable. + +Finally, to my pet, your keyboard sit-ins ensured I took breaks, whether I wanted to or not. \ No newline at end of file diff --git a/content/appendix.typ b/content/appendix.typ new file mode 100644 index 0000000..8623209 --- /dev/null +++ b/content/appendix.typ @@ -0,0 +1 @@ +-- Supplementary Material -- \ No newline at end of file diff --git a/content/transparency_ai_tools.typ b/content/transparency_ai_tools.typ new file mode 100644 index 0000000..c85b8de --- /dev/null +++ b/content/transparency_ai_tools.typ @@ -0,0 +1,22 @@ +#import "/utils/todo.typ": TODO +#import "/utils/pageref.typ": pageref + +#TODO[ + Update this paragraph to reflect the tools you used in your thesis. Please see Guide in #link("https://universitaetstgallen.sharepoint.com/sites/PruefungenDE/SitePages/ChatGPT.aspx")[StudentWeb] for more information. (HSG Account required) +] + +In preparing this thesis, I utilized Grammarly for grammar and style correction across the Abstract, Introduction, and Conclusion sections, ensuring clarity and coherence in my writing. I used DeepL to enhance language quality and translate parts of the Literature Review. I used ChatGPT to generate initial drafts and expand on ideas in the Introduction and Discussion sections, providing valuable suggestions and examples. Additionally, I used GitHub Copilot to generate code snippets for the developed functionality and code snippets in the Methodology section. + +#figure( + caption: "AI Tools used in the thesis", + table( + columns: (1fr, 1fr, 2fr), + "Tool", "Usage", "Affected Sections", + "ChatGPT 3.5", [- Brainstorming Structure + - Mindmaps + - Rewriting Text], [All chapters \ See Promt Dictionary \ \ @chapter1 Page #pageref("chapter1") ], + "Grammarly", [- Grammar and Style Correction + - Clarity and Coherence], [Abstract, Introduction, Conclusion \ \ @chapter1 Page #pageref("chapter1") ], + + ) +) \ No newline at end of file diff --git a/figures/tum_logo.png b/figures/tum_logo.png new file mode 100644 index 0000000..bb172b4 --- /dev/null +++ b/figures/tum_logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c4bed7e3d32252eb74a026450a8c6d676b70063b1885745e8ef4f733ebf1135 +size 4142 diff --git a/figures/unisg_logo.png b/figures/unisg_logo.png new file mode 100644 index 0000000..f92a263 Binary files /dev/null and b/figures/unisg_logo.png differ diff --git a/layout/abstract.typ b/layout/abstract.typ new file mode 100644 index 0000000..7a7abcf --- /dev/null +++ b/layout/abstract.typ @@ -0,0 +1,27 @@ +#let abstract(body, lang: "en") = { + let title = (en: "Abstract", de: "Zusammenfassung") + + set page( + margin: (left: 2.5cm, right: 2.5cm, top: 2.5cm, bottom: 2.5cm), + numbering: none, + number-align: center, + ) + + let body-font = "Times new Roman" + + set text( + font: body-font, + size: 12pt, + lang: lang + ) + + set par( + leading: 1em, + justify: true + ) + + // --- Abstract --- + align(top + center, text(font: body-font, 1em, weight: "semibold", title.at(lang))) + + body +} diff --git a/layout/disclaimer.typ b/layout/disclaimer.typ new file mode 100644 index 0000000..58ee764 --- /dev/null +++ b/layout/disclaimer.typ @@ -0,0 +1,38 @@ +#let disclaimer( + title: "", + author: "", + language: "en", + submissionDate: datetime, +) = { + set page( + margin: (left: 30mm, right: 30mm, top: 40mm, bottom: 40mm), + numbering: none, + number-align: center, + ) + + let body-font = "New Computer Modern" + let sans-font = "New Computer Modern Sans" + + set text( + font: body-font, + size: 12pt, + lang: "en" + ) + + set par(leading: 1em) + + + // --- Disclaimer --- + v(75%) + let title = (en: "Declaration of Authorship", de: "Erklärung zur Urheberschaft") + heading(title.at(language), numbering: none) + let disclaimer = (en: "I confirm that this thesis is my own work and I have documented all sources and material used.", de: "Ich versichere, dass ich diese Arbeit selbständig verfasst und alle verwendeten Quellen und Materialien dokumentiert habe.") + text(disclaimer.at(language)) + + v(15mm) + grid( + columns: 2, + gutter: 1fr, + "St. Gallen, " + submissionDate.display("[day]/[month]/[year]"), author + ) +} diff --git a/layout/thesis_template.typ b/layout/thesis_template.typ new file mode 100644 index 0000000..a78314f --- /dev/null +++ b/layout/thesis_template.typ @@ -0,0 +1,218 @@ +#import "/layout/titlepage.typ": * +#import "/layout/disclaimer.typ": * +#import "/layout/transparency_ai_tools.typ": transparency_ai_tools as transparency_ai_tools_layout +#import "/layout/abstract.typ": abstract as abstract_layout +#import "/utils/print_page_break.typ": * + +#let buildHeader(headingContent) = { + [ + #align(end, text(size: 11pt, weight: 400, headingContent)) + #v(2mm) + ] +} + + +#let getHeader() = { + locate(loc => { + // Find if there is a level 1 heading on the current page + let nextMainHeading = query(selector(heading).after(loc), loc).find(headIt => { + headIt.location().page() == loc.page() and headIt.level == 1 + }) + if (nextMainHeading != none) { + return buildHeader(nextMainHeading.body) + } + // Find the last previous level 1 heading -- at this point surely there's one + let lastMainHeading = query(selector(heading).before(loc), loc).filter(headIt => { + headIt.level == 1 + }).last() + + return buildHeader(lastMainHeading.body) + }) +} + +#let thesis( + title: "", + subtitle: "", + type: "", + professor: "", + author: "", + matriculationNumber: "", + submissionDate: datetime, + abstract: "", + language: "en", + acknowledgement: "", + transparency_ai_tools: "", + appendix: "", + is_print: false, + body, +) = { + + assert(language in ("de", "en"), message: "The language supported are only 'de' and 'en'.") + + titlepage( + title: title, + subtitle: subtitle, + type: type, + professor: professor, + author: author, + matriculationNumber: matriculationNumber, + submissionDate: submissionDate, + ) + + print_page_break(print: is_print, to: "even") + + + abstract_layout(lang: language)[#abstract] + + set page( + margin: (left: 2.5cm, right: 2.5cm, top: 2.5cm, bottom: 2.5cm), + numbering: none, + header: getHeader(), + ) + + let body-font = "Times New Roman" + + set text( + font: body-font, + size: 12pt, + lang: language + ) + + show math.equation: set text(weight: 400) + + set table( stroke:(x, y) => ( + y: if y == 1 { 2pt + gray } else { 1pt + gray }, + x: 1pt + gray + ), + + fill: (x, y) => + if y == 0 { rgb(55, 126, 57) } + ) + show table.cell: it => { + if it.y == 0 { + set text(white) + strong(it) + } else { + it + } +} + + // --- Headings --- + show heading: set block(below: 0.85em, above: 1.75em) + show heading: set text(font: body-font) + set heading(numbering: "1.1") + // Reference first-level headings as "chapters" + let chapter = (en: "Chapter", de: "Kapitel") + show ref: it => { + let el = it.element + if el != none and el.func() == heading and el.level == 1 { + chapter.at(language) + " " + numbering( + el.numbering, + ..counter(heading).at(el.location()) + ) + } else { + it + } + } + + // --- Paragraphs --- + set par(leading: 1em) + + // --- Citations --- + set cite(style: "alphanumeric") + + // --- Figures --- + show figure: set text(size: 0.85em) + + // --- Table of Contents --- + let tocTitle = (en: "Table of Contents", de: "Inhaltsverzeichnis") + + show outline.entry.where( + level: 1 + ): it => { + strong(text(size: 12pt, it)) + } + show outline.entry.where( + level: 2 + ): it => { + text(size: 11pt, it) + } + show outline.entry.where( + level: 3 + ): it => { + text(size: 10.5pt, it) + } + show outline.entry.where( + level: 4 + ): it => { + text(size: 10pt, it) + } + + outline( + title: tocTitle.at(language), + indent: 2em + ) + + + v(2.4fr) + pagebreak() + + set page( + margin: (left: 2.5cm, right: 2.5cm, top: 2.5cm, bottom: 2.5cm), + numbering: "1", + number-align: right, + ) + + counter(page).update(1) + + // List of figures. + let figureListTitle = (en: "List of Figures", de: "Abbildungsverzeichnis") + heading(numbering: none)[#figureListTitle.at(language)] + outline( + title:"", + target: figure.where(kind: image), + ) + + // List of tables. + print_page_break(print: is_print) + let tableListTitle = (en: "List of Tables", de: "Tabellenverzeichnis") + heading(numbering: none)[#tableListTitle.at(language)] + outline( + title: "", + target: figure.where(kind: table) + ) + pagebreak() + + + // Main body. + set par(justify: true, first-line-indent: 2em) + + body + + + // Appendix. + pagebreak() + let appendixTitle = (en: "Appendix", de: "Anhang") + heading(numbering: none)[#appendixTitle.at(language)] + appendix + + pagebreak() + let bibliographyTitle = (en: "References", de: "Literaturverzeichnis") + bibliography("/thesis.bib", style: "apa", title: bibliographyTitle.at(language)) + + print_page_break(print: is_print) + + disclaimer( + title: title, + author: author, + language: language, + submissionDate: submissionDate + ) + + + print_page_break(print: is_print) + + transparency_ai_tools_layout(language: language, transparency_ai_tools) + +} diff --git a/layout/titlepage.typ b/layout/titlepage.typ new file mode 100644 index 0000000..027aa02 --- /dev/null +++ b/layout/titlepage.typ @@ -0,0 +1,54 @@ +#let titlepage( + title: "", + subtitle: "", + type: "", + professor: "", + author: "", + matriculationNumber: "", + submissionDate: datetime, + abstract: "", + language: "en", +) = { + + set page( + margin: (left: 2.5cm, right: 2.5cm, top: 2.5cm, bottom: 2.5cm), + numbering: none, + number-align: center, + ) + + let body-font = "Times New Roman" + + set text( + font: body-font, + size: 12pt, + lang: language + ) + + set par(leading: 0.5em) + + + // --- Title Page --- + align(center, image("/figures/unisg_logo.png", width: 15%)) + let universityName = (en: "University of St. Gallen", de: "Universität St. Gallen") + align(center, text(font: body-font, 18pt, weight: 500, upper(universityName.at(language)))) + let universityHeader = (en: "School of Management, Economics,\n Law, Social Sciences, International Affairs and Computer Science", de: "Hochschule für Wirtschafts-, Rechts- und Sozialwissenschaften,\n Internationale Beziehungen und Informatik") + align(center, text(font: body-font, 11pt, weight: 500, universityHeader.at(language))) + + v(1fr) + line(length: 100%, stroke: 0.5pt + gray) + align(center, text(font: body-font, 16pt, weight: 400, type)) + align(center, text(font: body-font, 20pt, weight: 700, title)) + align(center, text(font: body-font, 16pt, weight: 400, subtitle)) + line(length: 100%, stroke: 0.5pt + gray) + v(1fr) + + + let submittedBy = (en: "Submitted by", de: "Eingereicht von") + let approvedBy = (en: "Approved on Application by \n\n Professor:", de: "Genehmigt auf Antrag von \n\n Professor:") + let submissionDateText = (en: "Date of Submission:", de: "Einreichungsdatum:") + align(center, text(font: body-font, 12pt, weight: 400, submittedBy.at(language) + ": \n" + author +"\n" + matriculationNumber)) + align(center, text(font: body-font, 12pt, weight: 400, approvedBy.at(language) + "\n" + professor)) + v(5mm) + align(center, text(font: body-font, 12pt, weight: 400, submissionDateText.at(language) + "\n\n" + submissionDate.display("[day padding:zero]/[month padding:zero]/[year repr:full]"))) + +} diff --git a/layout/transparency_ai_tools.typ b/layout/transparency_ai_tools.typ new file mode 100644 index 0000000..f563886 --- /dev/null +++ b/layout/transparency_ai_tools.typ @@ -0,0 +1,25 @@ +#let transparency_ai_tools(language: "en", body) = { + set page( + margin: (left: 30mm, right: 30mm, top: 40mm, bottom: 40mm), + numbering: none, + number-align: center, + ) + + let body-font = "New Computer Modern" + let sans-font = "New Computer Modern Sans" + + set text( + font: body-font, + size: 12pt, + lang: "en" + ) + + set par(leading: 1em) + + // --- AI Usage --- + let title = (en: "Transparency in the use of AI tools", de: "Transparenz bei der Verwendung von KI-Tools") + heading(title.at(language), numbering: none) + v(12pt) + + body +} \ No newline at end of file diff --git a/metadata.typ b/metadata.typ new file mode 100644 index 0000000..4096f14 --- /dev/null +++ b/metadata.typ @@ -0,0 +1,9 @@ +// Enter your thesis data here: +#let language = "en" // "en" or "de" +#let title = "Title of paper" +#let subtitle = "Subtitle of paper" +#let type = "Type of paper" +#let professor = "Name and full title of professor" +#let author = "First name Last name" +#let matriculationNumber = "Matriculation number" +#let submissionDate = datetime(day: 1, month: 1, year: 2024) \ No newline at end of file diff --git a/thesis.bib b/thesis.bib new file mode 100644 index 0000000..0c66c2f --- /dev/null +++ b/thesis.bib @@ -0,0 +1,6 @@ +@book{bruegge2004object, + title = {Object Oriented Software Engineering Using UML, Patterns, and Java}, + author = {Bruegge, Bernd and Dutoit, Allen H}, + year = {2009}, + publisher = {Prentice Hall} +} \ No newline at end of file diff --git a/thesis.typ b/thesis.typ new file mode 100644 index 0000000..5131d7c --- /dev/null +++ b/thesis.typ @@ -0,0 +1,22 @@ +#import "/layout/thesis_template.typ": * +#import "/metadata.typ": * + +#set document(title: title, author: author) + +#show: thesis.with( + language: language, + title: title, + subtitle: subtitle, + type: type, + professor: professor, + author: author, + matriculationNumber: matriculationNumber, + submissionDate: submissionDate, + abstract: include "/content/abstract.typ", + acknowledgement: include "/content/acknowledgement.typ", + transparency_ai_tools: include "/content/transparency_ai_tools.typ", + appendix: include "/content/appendix.typ", +) + +#include "/content/01_content.typ" +#include "/content/02_content.typ" \ No newline at end of file diff --git a/utils/feedback.typ b/utils/feedback.typ new file mode 100644 index 0000000..d1fa870 --- /dev/null +++ b/utils/feedback.typ @@ -0,0 +1,25 @@ +#let feedback( + feedback: "", + response: "", +) = { + counter("feedback").step() + block( + breakable: false, + ( + par( + justify: true, + text(weight: 700, counter("feedback").display() + ". Feedback: ") + + feedback + + pad( + left: 5%, + top: 2mm, + bottom: 5mm, + text( + fill: blue, + text(weight: 700, "Response: ") + response + ) + ) + ) + ) + ) +} \ No newline at end of file diff --git a/utils/formfield.typ b/utils/formfield.typ new file mode 100644 index 0000000..a21f787 --- /dev/null +++ b/utils/formfield.typ @@ -0,0 +1,9 @@ +#let formField(label, content, length: 5cm) = { + stack( + text(1em, weight: "bold")[#content], + v(2mm), + line(length: length), + v(1mm), + text(0.9em, style: "italic")[#label] + ) +} \ No newline at end of file diff --git a/utils/pageref.typ b/utils/pageref.typ new file mode 100644 index 0000000..7ac7e82 --- /dev/null +++ b/utils/pageref.typ @@ -0,0 +1,15 @@ +#let pageref(labelText) = { + locate(loc => { + let label = label(labelText) + let elems = query(selector(label), loc) + + if elems.len() == 1 { + let loc = elems.at(0).location() + let pageNumber = counter(page).at(loc) + link(label, numbering(loc.page-numbering(), ..pageNumber)) + } else { + let errorMessage = "Label '" + labelText + "' is not defined" + panic(errorMessage) + } + }) +} \ No newline at end of file diff --git a/utils/print_page_break.typ b/utils/print_page_break.typ new file mode 100644 index 0000000..b700a77 --- /dev/null +++ b/utils/print_page_break.typ @@ -0,0 +1,7 @@ +#let print_page_break(print: bool, to: "even") = { + if print { + pagebreak(to: to) + } else { + pagebreak() + } +} \ No newline at end of file diff --git a/utils/table.typ b/utils/table.typ new file mode 100644 index 0000000..e69de29 diff --git a/utils/todo.typ b/utils/todo.typ new file mode 100644 index 0000000..3edbdf0 --- /dev/null +++ b/utils/todo.typ @@ -0,0 +1,10 @@ +#let TODO(body, color: yellow) = { + rect( + width: 100%, + radius: 3pt, + stroke: 0.5pt, + fill: color, + )[ + #body + ] +}