Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tgm-hit-thesis:0.3.0 #1998

Merged
merged 1 commit into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
104 changes: 104 additions & 0 deletions packages/preview/tgm-hit-thesis/0.3.0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

<details>
<summary>Migration guide from v0.1.x</summary>

<!-- Write migration guide here -->

</details>

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security

## [0.3.0] - 2025-03-13

<details>
<summary>Migration guide from v0.2.x</summary>

To get a feeling what you need to change, compare [`template/main.typ`](https://github.com/TGM-HIT/typst-diploma-thesis/blob/v0.3.0/template/main.typ) with what you have. In particular, you will probably need to

- add a parameter `read: path => read(path),` to the initial `thesis()` template call
- remove `strict-chapter-end: true,` if you were using it
- remove all instances of `#chapter-end()`

Additionally, you should have a look at [`template/bibliography.bib`](https://github.com/TGM-HIT/typst-diploma-thesis/blob/v0.3.0/template/bibliography.bib#L42-L46) which demonstrates how to cite a prompt.
A (German) prose explanation of the usage of prompts can be found in the [Example document](https://github.com/TGM-HIT/typst-diploma-thesis/blob/v0.3.0/example.pdf), section 1.2 _Promptverzeichnis_.

</details>

### Added
- BREAKING: `thesis()` has an extra `read` parameter for initializing Alexandria
- There is now a separate List of Prompts

### Changed
- BREAKING: in `glossary-entry()`, the `desc` parameter is now named `description`
- for glossary entries, having only a `long` form is not permitted
- bibliography is now handled by Alexandria
- inline quotes with attribution now display that attribution

### Removed
- BREAKING: `chapter-end()` and `strict-chapter-end` have been removed

### Fixed
- setup of the `i-figured` package works again
- the template is now compatible with Typst 0.13
- descriptions of glossary items are no longer ignored
- an empty glossary is now automatically hidden

### Security

## [0.2.0] - 2024-10-23

### Changed
- long chapter titles now look nicer in the header
- **breaking:** glossary entries are now defined differently, see [the diff of the template](https://github.com/TGM-HIT/typst-diploma-thesis/commit/8c4d03a14ac3ddab6718cc7e11341924c66703bd#diff-7c3fcb5c97b51160af4b4a26981b152d6995f8ec0077281456d3f51f4b0e9d84) for an example
- **regression:** if there are no glossary references, an empty glossary section will be shown (glossarium 0.5 hides a couple private functions, see [glossarium#70](https://github.com/typst-community/glossarium/issues/70))

### Fixed
- fix deprecation warnings and incompatibilities introduced in 0.12, in part by updating codly, glossarium and outrageous

## [0.1.3] - 2024-09-14

### Changed
- get rid of more custom outline styling thanks to outrageous:0.2.0

## [0.1.2] - 2024-09-14

(this version was released in a broken state)

## [0.1.1] - 2024-09-09

### Added
- adds support for highlighting authors of individual pages of the thesis, which is a requirement for the thesis' grading

### Changed
- replaces some custom outline styling with [outrageous](https://typst.app/universe/package/outrageous)

## [0.1.0] - 2024-07-13

Initial Release


[Unreleased]: https://github.com/TGM-HIT/typst-diploma-thesis/compare/v0.2.0...HEAD
[0.3.0]: https://github.com/TGM-HIT/typst-diploma-thesis/releases/tag/v0.3.0
[0.2.0]: https://github.com/TGM-HIT/typst-diploma-thesis/releases/tag/v0.2.0
[0.1.3]: https://github.com/TGM-HIT/typst-diploma-thesis/releases/tag/v0.1.3
[0.1.2]: https://github.com/TGM-HIT/typst-diploma-thesis/releases/tag/v0.1.2
[0.1.1]: https://github.com/TGM-HIT/typst-diploma-thesis/releases/tag/v0.1.1
[0.1.0]: https://github.com/TGM-HIT/typst-diploma-thesis/releases/tag/v0.1.0
22 changes: 22 additions & 0 deletions packages/preview/tgm-hit-thesis/0.3.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
(The MIT License)

Copyright (c) 2024 Clemens Koza

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.
17 changes: 17 additions & 0 deletions packages/preview/tgm-hit-thesis/0.3.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# TGM HIT diploma thesis template

This is a port of the [LaTeX diploma thesis template](https://github.com/TGM-HIT/diploma-thesis) available for students of the information technology department at the TGM technical secondary school in Vienna.

## Getting Started

Using the Typst web app, you can create a project by e.g. using this link: https://typst.app/?template=tgm-hit-thesis&version=latest.

To work locally, use the following command:

```bash
typst init @preview/tgm-hit-thesis
```

## Usage

The template ([rendered PDF](example.pdf)) contains thesis writing advice (in German) as example content. If you are looking for the details of this template package's function, take a look at the [manual](docs/manual.pdf).
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions packages/preview/tgm-hit-thesis/0.3.0/src/assets.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#import "assets/mod.typ": *
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions packages/preview/tgm-hit-thesis/0.3.0/src/assets/mod.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/// The TGM logo. This is a partially applied function and thus can accept most of the parameters
/// that ```typc image()``` can.
///
/// -> content
#let tgm-logo = image.with("logo-left.png")

/// The HTL logo. This is a partially applied function and thus can accept most of the parameters
/// that ```typc image()``` can.
///
/// -> content
#let htl-logo = image.with("logo-right.png")
1 change: 1 addition & 0 deletions packages/preview/tgm-hit-thesis/0.3.0/src/bib.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#import "@preview/alexandria:0.1.3" as alexandria: load-bibliography as bibliography
77 changes: 77 additions & 0 deletions packages/preview/tgm-hit-thesis/0.3.0/src/glossary.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#import "@preview/glossarium:0.5.2" as glossarium: make-glossary, gls, agls, glspl

#let _glossary_entries = state("thesis-glossary-entries")

#let register-glossary(..entries) = {
assert.eq(entries.named(), (:), message: "no named arguments allowed")
let entries = entries.pos()
glossarium.register-glossary(entries)
_glossary_entries.update(entries)
}

/// Stores a glossary entry for this thesis. One call to this function is equivalent to one array
/// entry in Glossarium's ```typc print-glossary()```'s main parameter.
///
/// -> content
#let glossary-entry(
/// The key with which the glossary entry can be referenced; must be unique.
/// -> string
key,
/// Mandatory; the short form of the entry shown after the term has been first defined.
/// -> string
short: none,
/// The long form of the term, displayed in the glossary and on the first citation of the term.
/// -> string | content
long: none,
/// The description of the term.
/// -> string | content
description: none,
/// The pluralized short form of the term.
/// -> string | content
plural: none,
/// The pluralized long form of the term.
/// -> string | content
longplural: none,
/// The group the term belongs to. The terms are displayed by groups in the glossary.
/// -> string
group: none,
) = {
assert(short != none or long != none, message: "short or long form of glossary-entry is mandatory")

let entry = (
key: key,
short: short,
long: long,
description: description,
plural: plural,
longplural: longplural,
group: group,
)
let entry = for (k, v) in entry {
if v != none {
((k): v)
}
}

entry
}

/// Displays a glossary of the entries added via @@glossary-entry().
///
/// -> content
#let print-glossary(
/// A (level 1) heading that titles this glossary. If the glossary is empty, the title is not shown.
/// -> content
title: none,
/// Any extra parameters to the glossarium function of the same name.
/// -> arguments
..args,
) = context {
let entries = _glossary_entries.get()

if glossarium.there-are-refs() or args.named().at("show-all", default: false) {
title
}

glossarium.print-glossary(entries, ..args)
}
73 changes: 73 additions & 0 deletions packages/preview/tgm-hit-thesis/0.3.0/src/l10n.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[conf]
default-lang = "en"

[lang.en]
thesis = "Diploma Thesis"
supervisor = "Supervisor"
performed-in-year = "Performed in the school year"
submission-note = "Submission note"
approved = "Approved"

declaration-title = "Statutory declaration"
# declaration-text = """
# I declare that I have authored this thesis independently, that I have not used \
# other than the declared sources and that I have explicitly marked all material \
# which has been quoted either literally or by content from the used sources.
# """
# declaration-ai-clause = """
# I also used the following generative AI tools [e.g. ChatGPT, Grammarly Go, \
# Midjourney] for the following purpose:
# """
location-date = "Location, Date"

chapter = "Chapter"
section = "Section"
abstract = "Abstract"

figure = "Figure"
table = "Table"
listing = "Listing"

contents = "Contents"
bibliography = "Bibliography"
prompts = "List of Prompts"
list-of-figures = "List of Figures"
list-of-tables = "List of Tables"
list-of-listings = "List of Listings"
glossary = "Glossary"

[lang.de]
thesis = "Diplomarbeit"
supervisor = "Betreuer"
performed-in-year = "Ausgeführt im Schuljahr"
submission-note = "Abgabevermerk"
approved = "Übernommen von"

declaration-title = "Eidesstattliche Erklärung"
# declaration-text = """
# Ich erkläre an Eides statt, dass ich die vorliegende Arbeit selbstständig \
# verfasst, andere als die angegebenen Quellen/Hilfsmittel nicht benutzt und die \
# den benutzten Quellen wörtlich und inhaltlich entnommenen Stellen als solche \
# kenntlich gemacht habe.
# """
# declaration-ai-clause = """
# Für die Erstellung der Arbeit habe ich auch folgende Hilfsmittel generativer \
# KI-Tools [z. B. ChatGPT, Grammarly Go, Midjourney] zu folgendem Zweck verwendet:
# """
location-date = "Ort, Datum"

chapter = "Kapitel"
section = "Abschnitt"
abstract = "Kurzfassung"

figure = "Abbildung"
table = "Tabelle"
listing = "Auflistung"

contents = "Inhaltsverzeichnis"
bibliography = "Literaturverzeichnis"
prompts = "Promptverzeichnis"
list-of-figures = "Abbildungsverzeichnis"
list-of-tables = "Tabellenverzeichnis"
list-of-listings = "Auflistungsverzeichnis"
glossary = "Glossar"
33 changes: 33 additions & 0 deletions packages/preview/tgm-hit-thesis/0.3.0/src/l10n.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#import "@preview/linguify:0.4.2": set-database as _set_database, linguify

/// *Internal function.* Initializes Linguify with the template's translation file.
///
/// -> content
#let set-database() = _set_database(toml("l10n.toml"))

#let thesis = linguify("thesis")
#let supervisor = linguify("supervisor")
#let performed-in-year = linguify("performed-in-year")
#let submission-note = linguify("submission-note")
#let approved = linguify("approved")

#let declaration-title = linguify("declaration-title")
// #let declaration-text = linguify("declaration-text")
// #let declaration-ai-clause = linguify("declaration-ai-clause")
#let location-date = linguify("location-date")

#let chapter = linguify("chapter")
#let section = linguify("section")
#let abstract = linguify("abstract")

#let figure = linguify("figure")
#let table = linguify("table")
#let listing = linguify("listing")

#let contents = linguify("contents")
#let bibliography = linguify("bibliography")
#let prompts = linguify("prompts")
#let list-of-figures = linguify("list-of-figures")
#let list-of-tables = linguify("list-of-tables")
#let list-of-listings = linguify("list-of-listings")
#let glossary = linguify("glossary")
Loading
Loading