Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
03f431c
docs: improve README to fit within line char limit
stanlrt Jan 29, 2026
0aa1641
Revert "docs: improve README to fit within line char limit"
stanlrt Jan 29, 2026
e8b4234
docs: improve README to fit within line char limit
stanlrt Jan 29, 2026
eed92af
docs: demonstrate using ref in glossary entry
stanlrt Jan 29, 2026
ecdb161
feat(quotes): custom style
stanlrt Apr 3, 2026
8dc3adf
Merge branch 'typst:main' into modern-zhaw-thesis-0.2.0
stanlrt Apr 3, 2026
b655c91
fix: point lib to registry not local path
stanlrt Apr 3, 2026
4f00bd3
Merge branch 'modern-zhaw-thesis-0.2.0' of https://github.com/stanlrt…
stanlrt Apr 3, 2026
749b227
docs: fix version in readme
stanlrt Apr 3, 2026
214c156
fix: https://github.com/typst/packages/pull/4501#discussion_r3032491503
stanlrt Apr 3, 2026
9d8a8e7
fix: https://github.com/typst/packages/pull/4501#discussion_r3032491516
stanlrt Apr 3, 2026
73a4157
fix: https://github.com/typst/packages/pull/4501#discussion_r3032491592
stanlrt Apr 3, 2026
f20869c
fix: https://github.com/typst/packages/pull/4501#discussion_r3032491668
stanlrt Apr 3, 2026
18d2042
fix: https://github.com/typst/packages/pull/4501#discussion_r3032491861
stanlrt Apr 3, 2026
c962456
fix: https://github.com/typst/packages/pull/4501#discussion_r3032491879
stanlrt Apr 3, 2026
6355aa4
fix: https://github.com/typst/packages/pull/4501#discussion_r3032491888
stanlrt Apr 3, 2026
926e756
fix: https://github.com/typst/packages/pull/4501#discussion_r3032491899
stanlrt Apr 3, 2026
f5514d9
docs: changelog
stanlrt Apr 3, 2026
6138a75
fix: https://github.com/typst/packages/pull/4501#discussion_r3032491796
stanlrt Apr 3, 2026
cc712c5
chore: bump datify
stanlrt Apr 3, 2026
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
20 changes: 20 additions & 0 deletions packages/preview/modern-zhaw-thesis/0.2.0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

## 0.2.0

- Added custom quote styling
- Fixed glossary issues when no entries are provided
- Localised outline and appendix headings
- Fixed Glossy init-glossary validation bug
- Fixed empty optional supervisor fields
- Fixed translation strings
- Fixed custom declaration of originality body rendering
- Fixed README typos

Comment thread
stanlrt marked this conversation as resolved.
## 0.1.1

Improved README

## 0.1.0

Initial release
17 changes: 17 additions & 0 deletions packages/preview/modern-zhaw-thesis/0.2.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
MIT-0 (MIT No Attribution License)
Copyright (c) 2026 Stanislas Laurent

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.

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.
144 changes: 144 additions & 0 deletions packages/preview/modern-zhaw-thesis/0.2.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# `modern-zhaw-thesis` template

`modern-zhaw-thesis` is an unofficial template for ZHAW academic works, adapted from the official branding and following official requirements. It supports both English and German.

[Here's a showcase](./showcase.pdf) of how it looks like.
Comment thread
stanlrt marked this conversation as resolved.

## Setup

1. Download the font files from the repo's font directory:

[GitHub](https://github.com/stanlrt/typst-zhaw-thesis/tree/28927077165d31305c4438657eb0cdefa32bbcbd/fonts)

[Direct download](https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Fstanlrt%2Ftypst-zhaw-thesis%2Ftree%2F28927077165d31305c4438657eb0cdefa32bbcbd%2Ffonts)

### Web-app (easiest)

2. [Create a project using the template](https://typst.app/app?template=modern-zhaw-thesis&version=0.2.0)
3. In the left sidebar, under "Files", create a folder called `fonts`
4. Drag and drop the files into this `fonts` directory
Comment thread
stanlrt marked this conversation as resolved.

### Local

2. Install Typst from https://typst.app/open-source/
3. Make the downloaded fonts accessible to the compiler (https://typst.app/docs/reference/text/text/#parameters-font)
4. Run `typst init @preview/modern-zhaw-thesis:0.2.0` in your project directory

## All configuration options

Below is the complete list of configuration options, including default values and explanations. Most are optional.

```typ
#import "@preview/modern-zhaw-thesis:0.2.0": zhaw-thesis, languages

Comment thread
stanlrt marked this conversation as resolved.
// Note: `override` options accept Typst files, e.g. `override: [#include: "my-override.typ"]`
#show: zhaw-thesis.with(
language: languages.de, // Document language

cover: (
school: none, // E.g., "School of Engineering" REQUIRED
institute: none, // E.g., "Computer Science" REQUIRED
work-type: none, // E.g., "Bachelor Thesis" REQUIRED
title: none, // Work's title REQUIRED
authors: none, // Author name(s), e.g. ("Max Muster", "Erika Muster") REQUIRED
supervisors: none, // Supervisor name(s), two formats:
// 1. Simple: `("Prof. Dr. John Doe", "Dr. Jane Doe")`
// 2. Categorised: `(main: "Prof. Dr. John Doe",
// secondary: "Dr. Jane Doe", external: "Dr. External")`
industry-partner: none, // Industry partner name, e.g. "Schweizer AG"
study-program: none, // E.g., "Computer Science BSc"
override: none, // Override the cover page with your own file
),

abstract: (
keywords: none, // List of keywords, e.g. `("machine learning")` REQUIRED
en: none, // English abstract text
de: none, // German abstract text. REQUIRED by ZHAW even when lang is English.
override: none, // Override the abstract page with your own file
),

acknowledgements: (
text: none, // Custom acknowledgements text
override: none, // Override the acknowledgements page with your own file
),

declaration-of-originality: (
location: none, // E.g., "Zurich" REQUIRED
text: none, // Custom declaration text
override: none, // Override the declaration page with your own file
),

biblio: (
file: none, // Stream to .bib file e.g. `read("references.bib", encoding: none)`
style: "ieee", // Bibliography style, e.g. "ieee"
),

glossary-entries: none, // Variable containing glossary entries (see template)
appendix: none, // Appendix Typst file, e.g. [#include: "appendix.typ"]
page-border: true, // Enable/disable page border
hide-frontmatter: false, // Hide all content before the 1st chapter (to focus on writing)
print-mode: false, // Gives a white background to the cover page to reduce ink usage
)
```

## Exported symbols

The package exports the following symbols for you to use if needed:

```typ
#import "@preview/modern-zhaw-thesis:0.2.0": (
zhaw-thesis, // Main template function, see docu above
callout, // Coloured callout box to highlight important text

centered, // Vertically centred layout
today, // Current date in local format
languages, // Available languages
push-lang, // Set new language (see docu below)
pop-lang, // Switch back to previous language (see docu below)
)
```

You can refer to the [demo document](./template/main.typ) for usage examples.

## Configuration of dependencies

### Glossary

The template uses the [Glossy package](https://typst.app/universe/package/glossy/) to power the glossary feature under the hood.
You can find instructions about how to use all its options directly on the [package page](https://typst.app/universe/package/glossy/).

### Code blocks

The template uses the [Codly package](https://typst.app/universe/package/codly/) to style code snippets.
You can find instructions about how to use all its options in [its PDF manual](https://raw.githubusercontent.com/Dherse/codly/main/docs.pdf).

Check warning on line 113 in packages/preview/modern-zhaw-thesis/0.2.0/README.md

View check run for this annotation

Typst package check / @preview/modern-zhaw-thesis:0.2.0

packages/preview/modern-zhaw-thesis/0.2.0/README.md#L113

GitHub URL links to default branch: `https://raw.githubusercontent.com/Dherse/codly/main/docs.pdf`. Consider using a link to a specific tag/release or a permalink to a commit instead. This will ensure that the linked resource always matches this version of the package. You can create a permalink here: https://github.com/Dherse/codly/blob/main/docs.pdf Alternatively you can also link to a local file. This is preferred if the linked file is already present in the submitted package.

### Multi-linguism

Should you need use different languages for different pages of your work, you can refer to [Tieflang's documentation](https://typst.app/universe/package/tieflang/).

## Feature requests & problems

Feel free to request features or report problems [here](https://github.com/stanlrt/typst-zhaw-thesis/issues)

## License and Trademark Notice

### Software License

The Typst code and template structure in this package are licensed under the **MIT-0 License** (MIT No Attribution). See the [LICENSE](LICENSE) file for details.

### ZHAW Logo and Trademark

**Important:** The ZHAW logo and trademark included in this package are **NOT** covered by the MIT-0 license.

- **Trademark Owner:** The ZHAW logo and brand are the exclusive property of Zürcher Hochschule für Angewandte Wissenschaften (ZHAW).
- **Rights:** Users of this package do **not** receive any rights to sublicense, sell, or redistribute the ZHAW logo under the MIT-0 license terms.
- **Usage:** The logo is included for the specific purpose of creating ZHAW-compliant academic documents. Any other use requires permission from ZHAW.

As specified in section 2.b.2 of Creative Commons and similar public licenses: **"The trademark ZHAW is not affected by the license. Patent and trademark rights are not licensed under this Public License."**

For information about ZHAW's branding guidelines, refer to the official [ZHAW trademark guidelines for open educational resources](https://gpmpublic.zhaw.ch/GPMDocProdDPublic/Vorgabedokumente_ZHAW/Z_MB_Merkblatt_CC_Lizenzen_von_OER.pdf).

### Unofficial Template Notice

This is an **unofficial** template created by a student. It is not endorsed, maintained, or supported by ZHAW. The template attempts to follow official ZHAW branding guidelines and academic requirements, but users should verify compliance with current university standards.

4 changes: 4 additions & 0 deletions packages/preview/modern-zhaw-thesis/0.2.0/lib.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#import "src/zhaw-thesis.typ": callout, zhaw-thesis
#import "src/styling/tokens.typ": tokens
#import "src/utils.typ": centered, today
#import "src/translations.typ": languages, pop-lang, push-lang
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.
51 changes: 51 additions & 0 deletions packages/preview/modern-zhaw-thesis/0.2.0/src/pages/abstract.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#import "../styling/tokens.typ": tokens
#import "../utils.typ": centered, ensure-array, today
#import "@preview/tieflang:0.1.0": pop-lang, push-lang, tr

#let render-abstract(lang-code, abstract-text, keywords, authors, title) = context {
push-lang(lang-code)

show: doc => centered(tr().abstract, doc)
show grid.cell.where(x: 0): set text(weight: "bold")

let authors = ensure-array(authors)
let keywords = ensure-array(keywords)

grid(
columns: (2cm, 1fr),
column-gutter: 0.4cm,
row-gutter: 0.3cm,
tr().title, title,
(tr().author)(authors.len()), authors.join(", "),
tr().date, today(),
tr().institution, tr().institution_name,
)

v(0.5cm)
abstract-text
v(0.5cm)

grid(
columns: (auto, 1fr),
column-gutter: 0.4cm,
row-gutter: 0.3cm,
tr().keywords, keywords.join(", "),
)

pop-lang()
}

#let abstract-page(
en: none,
de: none,
keywords: none,
authors: none,
title: none,
) = {
if en != none {
render-abstract("en", en, keywords, authors, title)
}
if de != none {
render-abstract("de", de, keywords, authors, title)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#import "../styling/tokens.typ": tokens
#import "../utils.typ": centered, ensure-array
#import "@preview/tieflang:0.1.0": tr

#let acknowledgements-page(
acknowledgements: none,
supervisors: none,
co-supervisors: none,
authors: none,
) = {
let authors = ensure-array(authors)
let supervisors = ensure-array(supervisors)
let co-supervisors = ensure-array(co-supervisors)

let count = supervisors.len() + co-supervisors.len()
let thanked = (supervisors + co-supervisors).join(", ", last: " " + tr().and + " ")
show: doc => centered(tr().acknowledgements.title, doc)

if acknowledgements != none [

#acknowledgements
] else [
#let plural = authors.len() > 1

#(tr().acknowledgements.text)(plural, count, thanked)
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#import "../styling/tokens.typ": tokens
#import "../utils.typ": centered, today
#import "@preview/tieflang:0.1.0": tr
#import "../utils.typ": ensure-array

#let declaration-of-originality-page(
declaration_of_originality: none,
location: none,
authors: none,
) = {
show: doc => centered(tr().declaration_of_originality.title, doc)

let authors = ensure-array(authors)

if (declaration_of_originality != none) [

#declaration_of_originality
] else [
#let plural = authors.len() > 1

#(tr().declaration_of_originality.text)(plural)
]

v(1cm)

align(left)[
*#location, #today()*
]

v(0.5cm)

grid(
columns: (auto, 4cm),
column-gutter: 0.4cm,
row-gutter: 1.2cm,
..for author in authors {
(
author + ":",
align(bottom, pad(bottom: -0.2cm, box(
line(length: 5cm, stroke: 0.8pt),
))),
)
}
)
}
Loading
Loading