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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pdf
21 changes: 21 additions & 0 deletions packages/preview/tudelft-prime-presentation/0.1.3/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Dani Balagué Guardia

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.
39 changes: 39 additions & 0 deletions packages/preview/tudelft-prime-presentation/0.1.3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# tudelft-PRIME-presentation

## Introduction

This repository contains the source files and two complete lecture slide examples to get you started creating content for PRIME courses.

This template has been created using the [Touying](https://typst.app/universe/package/touying) package. The Touying package is under MIT Lincese.

## Downloading the Template

You have two options to download the template:

1. Downloading the source files from the release page (recommended).

2. Cloning this repository. While you will (possibly) get new features early, you might also find that your compilation fails.

## Using the template

You can find more information on how to install and use the template in our [Wiki](https://gitlab.tudelft.nl/prime/primeslides/template/-/tree/main/Wiki?ref_type=heads).

## Updating the template

You can locally install multiple versions of this template in your system. We recommend having them in different directories. We will try, as much as possible, to make the new versions backwards-compatible. However, with the introduction of new features, we might have to introduce a few changes.

In any case, any new changes will be documented in this README and/or in our [Wiki](https://gitlab.tudelft.nl/prime/primeslides/template/-/tree/main/Wiki?ref_type=heads).

You can also visit the template page in the [Typst Universe](https://typst.app/universe/package/tudelft-prime-presentation)

## Acknowledgements

I would like to thank my colleague Nelson Chan for letting me use his picture of the Rotterdam skyline as a background for the slides.

## License

This template is licensed under the _MIT License_. Click [here](LICENSE) for more information.

## Maintainers
- Dani Balagué Guardia (owner and maintainer of this project)\
Email: d.balagueguardia [at] tudelft [dot] nl
121 changes: 121 additions & 0 deletions packages/preview/tudelft-prime-presentation/0.1.3/Wiki/Installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Installation

At the time of this writing, we used Typst version 0.13.1. In addition, this template currently uses the *Lato* font for text, and the *Lete Sans Math* for math. If your system does not have these fonts installed, please install them by clicking at the corresponding font files. The *Lato* font can be downloaded from [this link](https://fonts.google.com/specimen/Lato), and the *Lete Sans Math* from [this link](https://github.com/abccsss/LeteSansMath).

One should be able to use the template once it is available in the [Typst Universe](https://typst.app/universe/).

## Manual Installation as a local package

The template can be installed in our local machine. We recommend downloading one of the released versions (e.g. 0.1.2) and
extract it.

Although the instruction for **manually** installing local packages can be found in the [Typst's offcial repository](https://github.com/typst/packages?tab=readme-ov-file#local-packages), we provide specific instructions to install our package.


### Installation on Windows

1. Open a PowerShell
2. Create the directory for the package

```powershell
cd $home
mkdir .\AppData\Roaming\typst\packages\local\tudelft-PRIME-presentation\0.1.2
cd .\AppData\Roaming\typst\packages\local\tudelft-PRIME-presentation\0.1.2
explorer .
```

The command `explorer .` open the directory where to copy the files.

3. Copy the contents of the zip file into the previous directory.

### Installation on MacOS

1. Open a terminal
2. Create the directory for the package:


```bash
mkdir -p "~/Library/Application Support/typst/packages/local/tudelft-PRIME-presentation/0.1.2"
cd "~/Library/Application Support/typst/packages/local/tudelft-PRIME-presentation/0.1.2"
open .
```

The command `open .` opens the directory where to copy the files.

3. Copy the contents of the zip file into the previous directory.


### Installation on Linux (tested on Debian aarch64)

1. Open a terminal
2. Create the directory for the package:

```bash
mkdir -p "~/.local/share/typst/packages/local/tudelft-PRIME-presentation/0.1.2"
cd "~/.local/share/typst/packages/local/tudelft-PRIME-presentation/0.1.2"
xdg-open .
```

the command `xdg-open .` opens the directory where to copy the files.

3. Copy the contents of the zip file into the previous directory.

## Using a Package Manager

The package manager we chose for installing the template is called [typship](https://github.com/sjfhsjfh/typship/tree/v0.4.1).
The installation depends on your operating system.

### Installing Typshyp

#### Installation of Typship on MacOS and Linux

The easiest way to install the package manager is through Rust's `cargo`. Install the latest version of Rust from the [official website](https://www.rust-lang.org). Then install the typst package manager `typship` with

```bash
cargo install typship
```

If you prefer, on MacOS you can install it with `brew`, and on Linux you can download the prebuild binary files using a shell script. (follow the instructions on the [official website](https://github.com/sjfhsjfh/typship/releases)),

#### Installation of Typship on Windows

Go to the the [realease page](https://github.com/sjfhsjfh/typship/releases/) of typship on GitHub. Download the zip file named `typship-x86_64-pc-windows-msvc.zip`. Once extracted, you will find the file `typship.exe`.

1. Copy the file into `C:\Users\{your_user}\Downloads`
2. Open a `PowerShell`
3. Copy and paste the following code into the PowerShell, and run it:

```powershell
cd $home
New-Item -Path . -Name "Software" -ItemType "Directory" -Force
Copy-Item -Path .\Downloads\typship.exe -Destination "$home\Software"
$currentPath = (Get-ItemProperty "HKCU:Environment").PATH
$newPath = -join("$currentPath","$home\Software",";")
Remove-ItemProperty -Path "HKCU:Environment" -Name "Path" -Force
New-ItemProperty -Path "HKCU:Environment" -PropertyType 'ExpandString' -Name 'Path' -Value "$newPath"
```

### Installing the Template

#### Windows

1. Navigate using the file explorer to the extracted zip file containing the template
2. Rigth click on the folder's white space
3. Select `Open in Terminal` (a PowerShell will open at the directory containing the template)
4. Run the following command:

```powershell
typship install local
```
5. Template is really to use

#### MacOS and Linux

1. Open a terminal
2. Navigate to the directory where the template has been extracted
3. Run the following command

```bash
typship install local
```

25 changes: 25 additions & 0 deletions packages/preview/tudelft-prime-presentation/0.1.3/Wiki/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Introduction

This template was created with the aim of simplifying the creation of new content for PRIME courses at TU Delft.

We chose [Typst](https://typst.app) as it is modern open source mark-up language. It offers (almost) the same capabilities as $\LaTeX$, with the simplified syntax of Markdown, making it an easy mark-up language to learn.

This document shows you how to use this template as well as how to compile your slides. In addition, we will give you a few examples so that you can start creating your own template.

This guide assumes that you already have the Typst compiler installed in your system. If you do not have Typst installed in your system we refer you to the [Typst repository](https://github.com/typst/typst?tab=readme-ov-file) and follow the instructions for installing it in your machine.

1. [Installation](Installation.md)
2. [Compiling the examples](compiling_examples.md)
3. [Start a presentation from an existing example](existing_example.md)
3. [How to create a new presentation](new_presentation.md)
4. [Advanced use of the template](using_template.md)

# Known and Possible Issues/Bugs

- The label `<touying:hidden>` does not work for hidding slides.

- If you hide a slide containing speaker notes with a conditional, and you compile the pdf with pdfpc for a presentation with speaker notes, the speaker notes from the hidden slide will appear in the "presenter view" messing with the rest of the speaker notes. If you hide a slide, comment (if they exist) the speaker notes as well for that slide.

# Authors

Dani Balagué Guardia
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Backgrounds and Logos

- A **background** is a picture (usually in either `jpg` or `png` format) that we use as the background for the title silde.

- A **logo** is a sqaure picture (usually in either `jpg`, `png` or `svg` format) that we use on the top-left side of the title slide, just left to the title.

## Default Backgrounds and Logos


The template provides a background and a few logos that can be used.

- The backgrounds can be found in
```
assets/Common/background
```
- The logos can be found
```
assets/Common/{subject}/Logos
```

In version `0.1.2` of this template, we include three subjects:

- `Linear Algebra`
- `Calculus`
- `ProbStats` (Probability and Statistics)

## Using Default Backgrounds and Logos

To use the default backgrounds and logos, we need to specify the path (as a string) when showing the `prime-slides`:

```typst
#import "@preview/tudelft-PRIME-presentation:0.1.2": *

#show: prime-slides.with(
title: "Linear Algebra Lecture 5",
subtitle: "Matrix operations",
background : "background/background.png",
logo : "Linear Algebra/Logos/intersection_planes.png"
)
```

Observe that we use the following structure for:

- `background: "background/{picture_name}.{extension}"`
- `logo: "{subject}/Logos/{logo_name}.{extension}"`

This setup is fine for working with the currently available subjects.

## Using Custom Backgrounds and Logos

When developing materials for a new course, we would like to use different backgrounds and logos than
the ones available (at least until they are included into the template).


The dimensions of the background should be:

- width: 33.9cm
- height: 19.05cm

For the logos, they should be squared, with size:

- height: 4.11cm

To use new pictures and templates, we need to first create an image object for the logo and one for the background,
and then pass it to `prime-slides`. Check the example below:

```typst
#import "@preview/tudelft-PRIME-presentation:0.1.2": *

#let background_image = image("my_background_image.png", width: 33.9cm, height: 19.05cm)
#let logo_image = image("my_logo.png", height: 4.11cm)

#show: prime-slides.with(
title: "Lecture XY",
subtitle: "Topic Z",
background : background_image,
logo : logo_image
)

```

This will create a new presentation with the custom backgrounds and logos.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Using Different Fonts

You can check the fonts that typst have access to in your system by running:

```bash
typst fonts
```

You can add new fonts from the local `fonts` directory. For example, if you want to use "Comic Mono" as your font,
copy the `ttf` font file in the local `fonts` directory, then set it up in the template with

```typst
#let heading-fonts = ("Comic Mono")
#let normal-fonts = ("Comic Mono")
```

and then compile the main file with the command

```bash
typst compile --font-path "./fonts" main.typ
```

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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Creating polling slides

We created a nice function that assists in the creation of polling slides.

Inside a polling slide, you can add your answers using the function `poll_answers`. Poll answers has some default parameters set, but they can be modified to suit your needs. These are the parameters of the function and what they do:

- `rows` (default: `2`): Number of columns for distributing the answers
- `cols` (default: `2`): Number of rows for distributing the answers
- `column-gutter` (default: `1em`): Separation between columns
- `row-gutter` (default: `1.4em`): Separation between rows
- `correct_answer` (default: 1): Index of the correct answer (as an integer) or a list of integers if there are multiple answers
- `students` (default: `false`): When `false` it generates the slide without the tick mark followed by the slide with the tick mark. Otherwise, it generates the slide without the tick mark.

The folling block of code generates the slides in the image below:

```typst
== Matrix Multiplication
#slide(type: "polling")[
If $A$ is a $6 times 5$ matrix and $B$ is a $5 times 2$ matrix, \
what is the size of $A B$, if defined?
#v(1em)
#poll_answers(row-gutter: 2em, column-gutter: 6em,
correct_answer: 2, students: false)[
1. $6 times 5$
5. $6 times 2$
2. $5 times 6$
6. $2 times 6$
3. $5 times 2$
7. $5 times 5$
4. $2 times 5$
8. Not defined
]
]
```
![](./images/polling_slides.png)

Loading
Loading