Skip to content
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.
49 changes: 49 additions & 0 deletions packages/preview/tgm-hit-protocol/0.2.0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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.2.0] - 2025-11-25

### Changed
- BREAKING: the minimum supported Typst version is now 0.13.1
- Several packages were updated to their most recent versions, among them glossarium:
- for glossary entries, having only a `long` form is now permitted
- BREAKING: glossarium no longer supports keys containing `:` colons
- BREAKING: in `glossary-entry()`, the `desc` parameter is now named `description`
- BREAKING: glossary entries are now defined differently, see [the diff of the template](https://github.com/TGM-HIT/typst-protocol/commit/a9ce50817370262b33c583c7e84ab450e5516b93#diff-7c3fcb5c97b51160af4b4a26981b152d6995f8ec0077281456d3f51f4b0e9d84) for an example

### Fixed
- The template is now Typst 0.14 compatible

## [0.1.0] - 2024-10-09

- Initial version


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

Copyright (c) 2024 Simon Gao, 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-protocol/0.2.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# TGM HIT protocol template

This is a port of the [LaTeX protocol template](https://github.com/TGM-HIT/latex-protocol/) 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-protocol&version=latest.

To work locally, use the following command:

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

## Usage

The template ([rendered PDF](main.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.
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.
7 changes: 7 additions & 0 deletions packages/preview/tgm-hit-protocol/0.2.0/src/assets/mod.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/// The TGM logo. This is a partially applied function and thus can accept most of the parameters
/// that ```typc image()``` can.
#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.
#let just-do-it-logo = image.with("logo-right.png")
85 changes: 85 additions & 0 deletions packages/preview/tgm-hit-protocol/0.2.0/src/glossary.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#import "libs.typ": glossarium
#import glossarium: make-glossary, gls, agls, glspl

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

/// Registers the passed entries with Glossarium.
///
/// -> content
#let register-glossary(
/// The positional-only entries for the glossary
/// -> arguments
..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.
///
/// -> dictionary
#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)
}
38 changes: 38 additions & 0 deletions packages/preview/tgm-hit-protocol/0.2.0/src/l10n.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[conf]
default-lang = "en"

[lang.en]
supervisor = "Supervisor"
grade = "Grade"
version = "Version"
started = "Started"
finished = "Finished"

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

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

[lang.de]
supervisor = "Betreuer"
grade = "Bewertung"
version = "Version"
started = "Begonnen"
finished = "Beendet"

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

contents = "Inhaltsverzeichnis"
bibliography = "Literaturverzeichnis"
list-of-figures = "Abbildungsverzeichnis"
list-of-tables = "Tabellenverzeichnis"
list-of-listings = "Auflistungsverzeichnis"
glossary = "Glossar"
24 changes: 24 additions & 0 deletions packages/preview/tgm-hit-protocol/0.2.0/src/l10n.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#import "libs.typ": linguify
#import linguify: 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 supervisor = linguify("supervisor")
#let grade = linguify("grade")
#let version = linguify("version")
#let started = linguify("started")
#let finished = linguify("finished")

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

#let contents = linguify("contents")
#let bibliography = linguify("bibliography")
#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