Skip to content

Add HS Emden/Leer template for academic writing #2360

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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/ostfriesen-layout/0.1.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Tobias Behrendt

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.
287 changes: 287 additions & 0 deletions packages/preview/ostfriesen-layout/0.1.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
# HS Emden/Leer Typst Template

[![Typst](https://img.shields.io/badge/Typst-v0.13.1+-blue)](https://typst.app/)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
[![Status](https://img.shields.io/badge/Status-Beta-yellow.svg)](https://github.com/your-username/typst-template)

A clean, professional Typst template for academic writing at Hochschule Emden/Leer. The template supports multiple authors, custom document types, and follows academic formatting standards.

This is an **`unofficial`** template. It is not affiliated with Hochschule Emden/Leer.

## Acknowledgments

This template is heavily inspired by [HAW-Hamburg-Typst-Template](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template) created by [Lasse Rosenow](https://github.com/LasseRosenow). Many thanks to Lasse for creating such an excellent foundation that this project builds upon.

## Features

- 📝 Support for multiple authors and matriculation numbers
- 🏢 Company and supervisor information
- 📚 Automatic table of contents, list of figures, and tables
- 📊 Properly styled headings, figures, and tables
- 🔤 Multilingual support (English and German)
- 📄 Declaration of independent processing

## Example

Here are some sample pages of what the final document would look like if created using this template:

<table>
<tr>
<td width="33%">
<img src="https://raw.githubusercontent.com/TobiBeh/HS-Emden-Leer-Typst-Template/main/example/snapshots/abstract.png" alt="Abstract Page Example">
<p align="center"><em>Abstract Page</em></p>
</td>
<td width="33%">
<img src="https://raw.githubusercontent.com/TobiBeh/HS-Emden-Leer-Typst-Template/main/example/snapshots/toc.png" alt="Table of Contents Example">
<p align="center"><em>Table of Contents</em></p>
</td>
<td width="33%">
<img src="https://raw.githubusercontent.com/TobiBeh/HS-Emden-Leer-Typst-Template/main/example/snapshots/intro.png" alt="Content Page Example">
<p align="center"><em>Content Page</em></p>
</td>
</tr>
</table>


## Usage

You can use this template in several ways:

### Via the Typst Package Registry (Recommended)

Just add the following code to your Typst document:

```typst
#import "@preview/hs-emden-leer-template:0.1.0": thesis

#show: thesis.with(
// Your configuration here
)
```

## Configuration Options

The template provides numerous configuration options to customize your document:

| Attribute | Type | Default | Required | Description |
| :------------------------ | :--------------- | :------------------- | :------- | :--------------------------------------------------------- |
| **Document Basics** | | | | |
| `title` | string | none | required | The title of your document |
| `authors` | array or string | () | required | Author names (single author or multiple) |
| `matriculation_numbers` | array or string | () | optional | Student matriculation numbers |
| `date` | string or date | none | required | Publication date (e.g., "May 2025" or datetime object) |
| `documentType` | string | none | required | Type of document (e.g., "Bachelor Thesis", "Master Thesis")|
| **University Information**| | | | |
| `faculty` | string | none | required | Faculty name |
| `department` | string | none | required | Department name |
| `course_of_studies` | string | none | optional | Course of studies name |
| **Supervision Details** | | | | |
| `supervisor1` | string | none | required | First/primary supervisor |
| `supervisor2` | string | none | optional | Second supervisor |
| `supervisor3` | string | none | optional | Third supervisor |
| **Company Information** | | | | |
| `company` | string | none | optional | Company name (for industry collaborations) |
| `company_supervisor` | string | none | optional | Company supervisor name |
| **Content Metadata** | | | | |
| `abstract` | content | none | optional | Document abstract |
| `keywords` | array or string | () | optional | Keywords related to the document |
| **Document Settings** | | | | |
| `include_declaration` | boolean | true | optional | Include declaration of independent processing |
| `lang` | string | "en" | optional | Document language: "en" (English) or "de" (German) |
| **Typography Settings** | | | | |
| `font` | string | "New Computer Modern"| optional | Font family |
| `font_size` | length | 11pt | optional | Base font size |
| `line_spacing` | float | 1.5 | optional | Line spacing multiplier |
| **Code Highlighting** | | | | |
| `enable_code_highlighting`| boolean | true | optional | Enable syntax highlighting for code blocks |

### Usage Examples

<details>
<summary><b>Basic Document Setup</b> (click to expand)</summary>

```typst
#show: thesis.with(
title: "Implementation of an Advanced Machine Learning Algorithm",
authors: "John Doe",
matriculation_numbers: "123456",
date: "May 2025",
documentType: "Master Thesis",
faculty: "Faculty of Technology",
department: "Computer Science",
supervisor1: "Prof. Dr. Jane Smith"
)
```
</details>

<details>
<summary><b>Multiple Authors and University Details</b></summary>

```typst
#show: thesis.with(
title: "Blockchain Technologies for Supply Chain Management",
authors: ("John Doe", "Jane Smith"),
matriculation_numbers: ("123456", "789012"),
date: datetime(year: 2025, month: 5, day: 11),
documentType: "Group Project Report",

faculty: "Faculty of Business Studies",
department: "Business Informatics",
course_of_studies: "Digital Business Management",

supervisor1: "Prof. Dr. First Supervisor",
supervisor2: "Second Supervisor"
)
```
</details>

<details>
<summary><b>Industry Collaboration Project</b></summary>

```typst
#show: thesis.with(
title: "Development of an IoT Solution for Smart Manufacturing",
authors: "John Doe",
matriculation_numbers: "123456",
date: "May 2025",
documentType: "Bachelor Thesis",

faculty: "Faculty of Engineering",
department: "Electrical Engineering",
course_of_studies: "Embedded Systems",

supervisor1: "Prof. Dr. Academic Supervisor",
company: "TechCorp GmbH",
company_supervisor: "Dr. Industry Expert"
)
```
</details>

## Document Structure

<details>
<summary><b>Headings</b></summary>

Use Typst's standard heading syntax:

```typst
= Main Heading (Chapter)
== Second-level Heading (Section)
=== Third-level Heading (Subsection)
```
</details>

<details>
<summary><b>Figures and Images</b></summary>

```typst
#figure(
image("path/to/image.png", width: 80%),
caption: [This is a caption for the figure.]
) <fig-label>

// Reference the figure in text
See @fig-label for details.
```
</details>

<details>
<summary><b>Tables</b></summary>

```typst
#figure(
table(
columns: (auto, auto, auto),
[*Header 1*], [*Header 2*], [*Header 3*],
[Row 1, Col 1], [Row 1, Col 2], [Row 1, Col 3],
[Row 2, Col 1], [Row 2, Col 2], [Row 2, Col 3],
),
caption: [Sample table with data.]
) <table-label>

// Reference the table in text
As shown in @table-label...
```
</details>


<details>
<summary><b>Citations and Bibliography</b></summary>

1. Create a bibliography file (e.g., references.bib)
2. Reference citations in your document: `According to @smith2022, the results show...`
3. Add the bibliography at the end of your document

```typst
#pagebreak()
#import "lib/pages/translations.typ": translations
#let t = translations.at("en") // "en" for English, "de" for German
#heading(t.at("bibliography"), numbering: none, outlined: true)
#bibliography("references.bib", title: none)
```
</details>

<details>
<summary><b>Using Glossary Terms</b></summary>

Reference glossary terms in your document:

```typst
// Reference a glossary term
The @algorithm is efficient.

// Or use functions for more control
The #gls("algorithm") is efficient.
These #glspl("cpu") are powerful.
```

To manually include a glossary section:

```typst
#pagebreak()
#heading("Glossary", numbering: none, outlined: true)
#import "lib/pages/glossary.typ": glossary_entries
#print-glossary(glossary_entries, show-all: true)
```
</details>

## File Organization

For larger documents, we recommend organizing your project files in a modular structure like the provided example:

```
project/
├── main.typ # Main document that imports template and includes chapter files
├── references.bib # Bibliography file
├── assets/
│ └── images/ # Images and other media
└── chapters/
├── introduction.typ # Each chapter in a separate file
├── background.typ
└── ...
```

## Requirements

- Typst 0.13.1 or higher
- New Computer Modern font

## Contributing

Contributions to improve the template are welcome! To contribute:

1. Fork the repository
2. Create a branch (`git checkout -b feature/your-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin feature/your-feature`)
5. Open a Pull Request

## License

This template is provided under the [MIT License](./LICENSE).

---

<p align="center">
Made with ❤️ for Hochschule Emden/Leer students
</p>
12 changes: 12 additions & 0 deletions packages/preview/ostfriesen-layout/0.1.0/example/abbreviations.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#let abbreviations-entry-list = (
(
key: "cpu",
short: "CPU",
long: "Central Processing Unit",
),
(
key: "gpu",
short: "GPU",
long: "Graphics Processing Unit",
),
)
17 changes: 17 additions & 0 deletions packages/preview/ostfriesen-layout/0.1.0/example/bibliography.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// These are some exemplary references
@article{example2023,
title={Example Article},
author={John Doe},
journal={Journal of Examples},
volume={1},
number={1},
pages={1--10},
year={2023},
publisher={Example Publisher}
}
@book{example2022,
title={Example Book},
author={Jane Smith},
year={2022},
publisher={Example Publisher}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#import "../../lib/pages/dependencies.typ": *
#show: codly-init
= Features

This chapter is just here to show you how to import several files into the `main.typ`. If you did not see it yet, the `main.typ` file is the entry point of your document. It is the file that you will render to create your final document. The `main.typ` file imports all other files and includes them in the final document. The importing of files is done using the `#include` command. The `#include` command takes a file path as an argument and includes the file in the document. You can also use the `#import` command to import files, but this is not necessary in this case. The `#import` command is used to import files that are not part of the main document, such as libraries or templates.

== Code Highlighting

You might have noticed that the code snippets in this document are highlighted. This is done using the `codly` package.
In order for the code snippets you provide to be highlighted, you need to wrap them into a `#figure` command. This is because the template targets figures from type `raw` for the code listing.
Mainly because then you can give them a caption, tag them and they will be automatically included in the list of code listings (which is automatically generated and updated when you add or remove code listings from your document).
However you will have to set the `supplement` for this `figure` to "Source code" in order for the template to know that this is a code listing and not a figure.
#figure(
supplement: "Source code",
```rust
fn main() {
println!("Hello World!");
}
```,
caption: "Hello World program in Rust")<HelloWorld>


Loading