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
21 changes: 21 additions & 0 deletions packages/preview/clean-hwr/0.1.4/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Pépe Hanisch

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.
150 changes: 150 additions & 0 deletions packages/preview/clean-hwr/0.1.4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# Typst Template for HWR (Berlin School of Economics and Law)

Welcome! This repository offers two Typst templates (English and German) designed to help you write your papers following the HWR style guidelines.

> [!CAUTION]
> The logo included in this template is the property of the Berlin School of Economics and Law (Hochschule für Wirtschaft und Recht Berlin).
> It is used under their licensing terms and should not be misappropriated or reproduced outside the scope permitted by the institution.

## Usage
You can use this template in the Typst web app by clicking "Start from template"
on the dashboard and searching for `clean-hwr`.

Alternatively, you can use the CLI to kick this project off using the command
```
typst init @preview/clean-hwr:0.1.4
```

Typst will create a new directory with all the files needed to get you started.

## Configuration
The `hwr(...)` function is the main entry point to configure and render the **PTB Template**. Below is an overview of the available configuration fields and how to use them:

```typst
#show: hwr.with(
language: "en",
main-font: "TeX Gyre Termes",

metadata: (
title: ["My Report Title"],
student-id: "12345678",
authors: ("Your Name",), // The `,` is mandatory for an array with a single entry
company: "Example Corp",
enrollment-year: "2024",
semester: "2",
company-supervisor: "Jane Doe",
company-logo: image("images/logo.png", width: 46%),
),

custom-entries: (
(key: "GitHub", value: "yourhandle", index: 0),
),

// Custom labels for the signatures on the title page
label-signature-left: [],
label-signature-right: [],

word-count: total-words, // Optional: total word count
custom-declaration-of-authorship: [], // Optional override for default declaration

confidentiality-notice: (
title: "Confidentiality Notice", // Needs to be set
content: [...],
page-idx: 1, // Needed Number 0-8
),

abstract: [
This report analyzes...
],

// Only relevant for `language = "de"`
note-gender-inclusive-language: (
enabled: false,
title: "Hinweis zum sprachlichen Gendern"
),

glossary: (
title: "Glossary",
entries: (
(
key: "typst",
short: "Typst",
long: "Typst Typesetting System",
description: "A modern alternative to LaTeX."
),
),
disable-back-references: true,
),

acronyms: (
title: "Acronyms",
entries: (
"AI": ("Artificial Intelligence", "Artificial Intelligence"),
)
),

figure-index: (
enabled: true,
title: "List of Figures"
),

table-index: (
enabled: true,
title: "List of Tables"
),

listing-index: (
enabled: true,
title: "List of Listings"
),

bibliography-object: bibliography("refs.bib"),
citation-style: "template/hwr_citation.csl",

appendix: (
enabled: true,
content: [
= Appendix
Additional data and figures here...
]
),
)
```

### Notes:
* **Fields marked optional** (like `word-count` or `custom-declaration-of-authorship`) may be omitted if not needed.
* `abstract` is shown before the table of contents.
* The `metadata.university` and `metadata.date-of-publication` will be filled automatically unless explicitly overridden.

## How to Create a PDF (locally)
Once you’ve made your changes, you can compile your document into a PDF by running this command in the root folder of the project:

```bash
typst compile main.typ
```

This will generate a `main.pdf` file with your paper ready to go.

> [!NOTE]
> Make sure all needed fonts are installed locally

## Dependencies
This template makes use of two Typst packages to add extra functionality:

* [`wordometer`](https://typst.app/universe/package/wordometer) - for counting the words automatically
* [`glossarium`](https://typst.app/universe/package/glossarium/) – for managing glossaries
* [`acrostiche`](https://typst.app/universe/package/acrostiche/) – for handling acronyms easily

These are fetched automatically when compiling the document, so you don’t need to install them manually.

## Quick Shoutout
Big thanks to [**Patrick O'Brien**](https://github.com/POBrien333) for creating the citation style file used in this template. You can find it at:

```
hwr_citation.csl
```

Original source: [Berlin School of Economics and Law CSL Style](https://github.com/citation-style-language/styles/blob/master/berlin-school-of-economics-and-law-international-marketing-management.csl)

## Need Help or Want to Contribute?
If you run into any issues or have ideas to improve the template, please open an issue or submit a pull request. Your feedback is always welcome!
201 changes: 201 additions & 0 deletions packages/preview/clean-hwr/0.1.4/hwr_citation.csl
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="en-GB">
<info>
<title>Berlin School of Economics and Law - International Marketing Management</title>
<id>http://www.zotero.org/styles/berlin-school-of-economics-and-law-international-marketing-management</id>
<link href="http://www.zotero.org/styles/berlin-school-of-economics-and-law-international-marketing-management" rel="self"/>
<link href="http://www.zotero.org/styles/zeitschrift-fur-qualitative-forschung" rel="template"/>
<link href="https://github.com/citation-style-language/styles/files/2571346/GuidelinesforThesisWriting-English-Okt.2017.pdf" rel="documentation"/>
<author>
<name>Patrick O'Brien</name>
<email>[email protected]</email>
</author>
<category citation-format="author-date"/>
<category field="social_science"/>
<category field="humanities"/>
<summary>Style for theses for the Berlin School of Economics and Law - International Marketing Management, as per the 2017 Kreutzer guidelines.</summary>
<updated>2018-11-09T09:30:45+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale xml:lang="en">
<terms>
<term name="available at">online at URL</term>
</terms>
</locale>
<macro name="creator-year-long">
<group delimiter=" ">
<names variable="author">
<name delimiter="/" initialize-with=". " name-as-sort-order="all"/>
<substitute>
<names variable="editor"/>
<text variable="title"/>
</substitute>
</names>
<group delimiter=", " prefix="(" suffix=")">
<text macro="year"/>
<choose>
<if variable="author" match="none">
<choose>
<if variable="editor">
<text term="editor" form="short" text-case="capitalize-first" plural="true"/>
</if>
</choose>
</if>
</choose>
</group>
</group>
</macro>
<macro name="editor-container-title">
<group delimiter=": ">
<text term="in"/>
<group delimiter=", ">
<names variable="editor">
<name delimiter="/" initialize-with=". " name-as-sort-order="all"/>
</names>
<group delimiter=", " prefix="(" suffix=")">
<text macro="year"/>
<choose>
<if variable="editor">
<text term="editor" form="short" text-case="capitalize-first" plural="true"/>
</if>
</choose>
</group>
<text variable="container-title"/>
</group>
</group>
</macro>
<macro name="publication-place-publisher">
<text variable="publisher-place"/>
</macro>
<macro name="creator-year-short">
<group delimiter=", ">
<text macro="creator-short"/>
<text macro="year"/>
</group>
</macro>
<macro name="edition">
<choose>
<if match="any" is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" text-case="capitalize-first"/>
</group>
</if>
<else>
<text variable="edition"/>
</else>
</choose>
</macro>
<macro name="collection-title-number">
<group delimiter=" " prefix="(= " suffix=")">
<text variable="collection-title"/>
<text variable="collection-number"/>
</group>
</macro>
<macro name="page-range">
<group delimiter=" ">
<label plural="never" variable="page" form="short"/>
<text variable="page"/>
</group>
</macro>
<macro name="online-url">
<group delimiter=": ">
<text term="available at"/>
<group delimiter=" ">
<text variable="URL"/>
<date form="text" variable="accessed" prefix="(" suffix=")"/>
</group>
</group>
</macro>
<macro name="container-title-volume">
<group delimiter=", ">
<text variable="container-title"/>
<group delimiter=" ">
<number variable="volume" form="ordinal"/>
<text term="volume"/>
</group>
<group delimiter="/">
<number variable="issue"/>
<text macro="year"/>
</group>
</group>
</macro>
<macro name="creator-short">
<names variable="author">
<name form="short" delimiter="/" delimiter-precedes-last="always"/>
<substitute>
<names variable="editor"/>
<text variable="title"/>
</substitute>
</names>
</macro>
<macro name="year">
<date date-parts="year" form="text" variable="issued"/>
</macro>
<citation et-al-min="3" et-al-use-first="1" disambiguate-add-year-suffix="true" collapse="year-suffix">
<layout delimiter="; " prefix="(" suffix=")">
<group delimiter=", ">
<text macro="creator-year-short"/>
<group delimiter=" ">
<label plural="never" variable="locator" form="short"/>
<text variable="locator"/>
</group>
</group>
</layout>
</citation>
<bibliography>
<sort>
<key macro="creator-short"/>
<key macro="year"/>
</sort>
<layout>
<group delimiter=", ">
<text macro="creator-year-long"/>
<text variable="title"/>
<choose>
<if type="book" match="any">
<group delimiter=", ">
<text macro="edition"/>
<text macro="publication-place-publisher"/>
<text macro="collection-title-number"/>
</group>
</if>
<else-if type="article-journal article-magazine article-newspaper" match="any">
<group delimiter=", ">
<group delimiter=": ">
<text term="in"/>
<text macro="container-title-volume"/>
</group>
<text macro="page-range"/>
</group>
</else-if>
<else-if type="chapter" match="any">
<group delimiter=", ">
<group delimiter=", ">
<text macro="editor-container-title"/>
<text macro="edition"/>
<text macro="publication-place-publisher"/>
<text macro="year"/>
</group>
<text macro="page-range"/>
<text macro="collection-title-number"/>
</group>
</else-if>
<else>
<group delimiter=", ">
<choose>
<if match="any" variable="container-title">
<text macro="editor-container-title"/>
</if>
</choose>
<text macro="publication-place-publisher"/>
<text macro="page-range"/>
<text macro="collection-title-number"/>
<text macro="online-url"/>
</group>
</else>
</choose>
</group>
</layout>
</bibliography>
</style>
Loading