https://github.com/mkorje/typst-hand-in
A Typst template for clean and minimalist assignments.
https://github.com/mkorje/typst-hand-in
assignment homework problem-set typst-template
Last synced: 4 months ago
JSON representation
A Typst template for clean and minimalist assignments.
- Host: GitHub
- URL: https://github.com/mkorje/typst-hand-in
- Owner: mkorje
- License: mit-0
- Created: 2025-04-21T12:17:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-28T01:40:04.000Z (7 months ago)
- Last Synced: 2026-02-15T05:42:48.314Z (4 months ago)
- Topics: assignment, homework, problem-set, typst-template
- Language: Typst
- Homepage:
- Size: 56.6 KB
- Stars: 5
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# hand-in
A Typst template for clean and minimalist assignments.
## Usage
You can use this template in the [official web app](https://typst.app/) by clicking "Start from template" on the dashboard and searching for `hand-in`.
Alternatively, you can use the CLI to initialise a new project using this template with the command
```sh
typst init @preview/hand-in
```
This will create a new directory containing the file `main.typ` with a sample call to the `assignment` function in a show rule.
You can also use this template by copying the following to the top of a `.typ` file:
```typ
#import "@preview/hand-in:1.1.0": assignment
// Configure the text font and language, for example, here.
// Configure the template by modifying the below.
#show: assignment.with(
title: "Assignment 1",
student: (
name: "Typst Guy",
id: 1550003495,
),
subject: (
name: "Writing with Typst",
code: "TYP101",
),
)
// Start writing here!
```
## Configuration
This template provides the function `assignment` which takes the following arguments:
| Argument | Type | Description |
| --------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title` | [str] | The assignment's title. This argument is required. |
| `student` | [dictionary] | The student authoring the assignment. Two keys are expected, `name` with a value of type string and `id` with a value of any type that can be converted to a string. This argument is required. |
| `subject` | [dictionary] | The subject the assignment is for. Two keys are expected, `name` and `code`, both of whose values are strings. This argument is required. |
| `date` | [none] [auto] [datetime] | The assignment's creation date. This argument is optional. The default is `datetime.today()` |
| `body` | [content] | The assignment's content. |
[auto]: https://typst.app/docs/reference/foundations/auto/
[content]: https://typst.app/docs/reference/foundations/content/
[datetime]: https://typst.app/docs/reference/foundations/datetime/
[dictionary]: https://typst.app/docs/reference/foundations/dictionary/
[none]: https://typst.app/docs/reference/foundations/none/
[str]: https://typst.app/docs/reference/foundations/str/