Skip to content

Commit

Permalink
touying-unistra-pristine:1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
spidersouris committed Dec 23, 2024
1 parent b6c3c7c commit 219fa65
Show file tree
Hide file tree
Showing 12 changed files with 1,748 additions and 0 deletions.
181 changes: 181 additions & 0 deletions packages/preview/touying-unistra-pristine/1.3.0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# v1.3.0 (2024-12-23)

## General

- Updated to Touying 0.5.5.

### Slides

- **Outline Slides**:
- New slide type.
- Invoked using the `outline-slide()` function.
- Automatically generates a table of contents that lists focus slides from the presentation.
- Set the new `outline` parameter to `false` in the `focus-slide()` function to exclude a slide from the table of contents.
- Takes the following parameters:
- `title` (str): The title of the slide. Default: "Outline".
- `title-size` (length): The size of the title. Default: 1.5em.
- `content-size` (length): The size of the content. Default: 1.2em.
- `fill` (color): The fill color of the outline block. Default: nblue.D.
- `outset` (length): The outset of the outline block. Default: 30pt.
- `height` (ratio): The height of the outline block. Default: 80%.
- `radius` (ratio): The radius of the outline block. Default: 7%.
- `..args`: Additional arguments to pass to the outline.
- **Appendix Slides**:
- Added custom footer label support for appendix slides (slides that appear after `#show: appendix`, e.g. bibliography).
- By default, an italic "A-" label will be shown in the footer right before the slide number. The content of the label can be changed using the settings (see below).

### Settings

- Added new settings to further customize the custom `quote` element:
- `margin-top` (relative | fraction): The top margin of the quote. Default: 0em.
- `outset` (relative | dictionary): The outset of the quote box. Default: 0.5em.
- These settings should be specified in the `config-store()` object under the `quote` key, when initializing `unistra-theme`.
- Added `footer-appendix-label` (str) setting to customize the label shown in the footer for appendix slides. Default: "A-".

### Other

- Replaced the default [] first-child item list marker with [--] to fix alignment issues.

# v1.2.0 (2024-11-21)

## General

- Updated to Typst 0.12.0.

### Slides

- **Title Slides**:
- Added multiple logo support.
- Use the `logos` parameter to specify several logos to be shown side-by-side. `logos` takes an array of images as input. Both `logo` and `logos` cannot be set at the same time.

### Settings

- Reworked how settings are handled to allow full compatibility with Typst Universe.
- Settings should now be specified by adding the `config-store()` object when initializing `unistra-theme`, as it is standard to do with Touying themes.
- The following settings are available: `show-header` (bool), `show-footer` (bool), `footer-upper-sep` (str), `footer-lower-sep` (str), `font` (array[str]), `quotes` (dict[str]).

### Admonitions

- Admonitions now allow the following optional parameters:
- `lang` (str, default: "fr"): the language to show the admonition title in. Accepts one of the langs in the `ADMONITION-TRANSLATIONS` dict.
- `plural` (bool, default: false): whether the admonition title should be plural.
- `show-numbering` (bool, default: false): whether the admonition number should be appended before the title. This replaces the old `ADMONITION-NUMBERING` setting in `settings.typ`, and allows for individual admonition customization.

### Other

- Added support for `short-title` and `short-subtitle` parameters in `config-info` object.
- Reduced list item spacing to `1em`.

## Fixes

- Minor fixes to positioning.

# v1.1.0 (2024-10-16)

## General

- Updated to Touying 0.5.3.

### Slides

- **Hero Slides**:
- Added the following parameters: `fill`, `inset`, `footnote`.
- `fill` (color): allows to fill the entire slide with a color. It can be used to achieve a better result if an image with a fixed background color different from the default one does not properly cover the entire slide, leaving some parts of the default background color visible.
- `inset` (length): allows to specify the negative inset value for the image to take the most space possible on the slide.
- `footnote` (bool): allows to specify whether there is a footnote. If true, gives some width to accommodate the footnote. Experimental feature. Default: false.
- Removed the following parameters: `img-height`, `img-width`, `text-fill`, `text-alignment`, `enhanced-text`.
- The `txt` parameter, used to show text next to the image, is now a dictionary accepting the following optional keys: `text`, `enhanced`, `fill`, `align`.
- `text` (str): the text to display. Default: none.
- `enhanced` (bool | function): whether to enhance the text. Can pass a custom function that will act as a callback to enhance the text. Default: true.
- `fill` (color): the fill color of the text. Default: none.
- `align` (alignment): the alignment of the text. Default: horizon + center.

### Colors

- Added all the colors from the [official color palette of the University of Strasbourg](https://langagevisuel.unistra.fr/index.php?id=396) to `colors.typ`.
- Every color is defined as a dictionary with its different shades as keys (A: dark (_foncée_), B: vivid (_vive_), C: pale (_layette_), D: light (_claire_), E: Web colors (_Web_)).
- The following colors and their shades are included: `grey`, `maroon`, `brown`, `orange`, `red`, `pink`, `purple`, `violet`, `nblue`, `cyan`, `ngreen`, `green`, `camo`, `yellow`.
- Example use: `grey.A` for the dark shade of grey, `maroon.B` for the vivid shade of maroon, etc.
- Standard colors `black`, `white`, and `link-color` remain available without dictionary use.
- Added the following colorthemes: `forest`, `berry`, `ocean`, `lavender`, `moss`, `clay`, `mint`, `lemon`, `wine`.

## Fixes

- The image on hero slides now takes double the space of the text box width on the main axis (LTR, RTL) when text is provided.
- Increased font size from 22pt to 25pt.
- Fixed template title slide missing logo.
- Fixed outdated `title-slide` function docstring.
- Fixed logo in footer not positioning correctly.
- Fixed other footer positioning issues.

# v1.0.0 (2024-09-18)

Initial release for publication as a Typst template package.

# v0.2.0 (2024-08-30)

## General

### Slides

- **Focus Slides**:
- Added counter support.
- Added the following parameters: `text_alignment`, `show_counter`.
- Added the following parameters to `grandientize(): `lighten-pct`, `angle`.
- **Title Slides**:
- Added the following parameters: `title`, `subtitle`.
- **Hero Slides**:
- Added support for the following directions: left-to-right (default), right-to-left, up-to-down, down-to-up.
- Added caption support.
- - Captions can be bolded using `bold_caption: true`.
- Added enhanced text option.
- Enhanced text appears bigger than normal text, in bold, and close to the image for better visibility.
- Enhanced text can have a background using the `text_fill` parameter and specifying a fill color.
- Added option to hide footer on individual slides.
- Added the following parameters: `bold_caption`, `caption`, `direction`, `enhanced_text`, `gap`, `heading_level`, `hide_footer`, `img_height`, `img_width`, `numbering`, `rows`, `text_alignment`, `text_fill`, `txt`.
- **Gallery Slides**:
- Added caption support for individual images.
- Captions can be bolded using `bold_caption: true`.
- Added the following parameters: `captions`, `height`, `gutter`, `subtitle`, `bold_caption`, `heading_level`, `width`, `gap`.

### Admonitions

- Added "Brainstorming" admonition type.
- Added "Question" admonition type.
- Added option to enable or disable admonition numbering (default: false).
- Added localization support.

### Settings

- Added the following settings:
- ADMONITION_NUMBERING (default: false),
- DEBUG (default: false),
- FOOTER_LOWER_SEP (footer lower separator) (default: " | "),
- FOOTER_SHOW_SUBTITLE
- FOOTER_UPPER_SEP (footer upper separator) (default: " | "),
- LANGUAGE (used for [Typst's `text()` lang parameter](https://typst.app/docs/reference/text/text/#parameters-lang)) (default: "fr"),
- QUOTES (used to specify left and right quotation mark characters for the "Quote" element) (default: "« ,  »).
- Added [wiki page listing settings](https://github.com/spidersouris/typst-unistra-slides/wiki/Settings).

### Other

- Updated example with newest changes.
- Added a customized version of [`quote`](https://typst.app/docs/reference/model/quote/).
- Added the following exportable methods: `smaller`, `smallest`.
- `smaller` sets text to 25pt.
- `smallest` sets text to 20pt.
- Added `link-color` to `colors.typ`.

## Fixes

- Fixed aligment issue with `cell()`.
- Fixed alignment issue with `focus-slide()`.
- Improved `focus-slide()` theme-related error messages.

## Miscellaneous

- Added licence.

# v0.1.0 (2024-08-05)

Initial pre-release.
9 changes: 9 additions & 0 deletions packages/preview/touying-unistra-pristine/1.3.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2024 Enzo Doyen

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.
98 changes: 98 additions & 0 deletions packages/preview/touying-unistra-pristine/1.3.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# touying-unistra-pristine

> [!WARNING]
> This theme is **NOT** affiliated with the University of Strasbourg. The logo and the fonts are the property of the University of Strasbourg.
**touying-unistra-pristine** is a [Touying](https://github.com/touying-typ/touying) theme for creating presentation slides in [Typst](https://github.com/typst/typst), adhering to the core principles of the [style guide of the University of Strasbourg, France](https://langagevisuel.unistra.fr) (French). It is an **unofficial** theme and it is **NOT** affiliated with the University of Strasbourg.

This theme was partly created using components from [tud-slides](https://github.com/typst-tud/tud-slides) and [grape-suite](https://github.com/piepert/grape-suite).

# Features

- **Focus Slides**, with predefined themes and custom colors support.
- **Hero Slides**.
- **Gallery Slides**.
- **Admonitions** (with localization and plural support).
- **Universally Toggleable Header/Footer** (see [Configuration](#Configuration)).
- Subset of predefined colors taken from the [style guide of the University of Strasbourg](https://langagevisuel.unistra.fr/index.php?id=396) (see [colors.typ](colors.typ)).

# Example

See [example/example.pdf](example/example.pdf) for an example PDF output, and [example/example.typ](example/example.typ) for the corresponding Typst file.

# Installation

These steps assume that you already have [Typst](https://typst.app/) installed and/or running.

## Import from Typst Universe

```typst
#import "@preview/touying:0.5.5": *
#import "@preview/touying-unistra-pristine:1.3.0": *
#show: unistra-theme.with(
aspect-ratio: "16-9",
config-info(
title: [Title],
subtitle: [_Subtitle_],
author: [Author],
date: datetime.today().display("[month repr:long] [day], [year repr:full]"),
),
)
#title-slide[]
= Example Section Title
== Example Slide
A slide with *important information*.
#lorem(50)
```

## Local installation

### 1. Clone the project

`git clone https://github.com/spidersouris/touying-unistra-pristine`

### 2. Import Touying and touying-unistra-pristine

See [example/example.typ](example/example.typ) for a complete example with configuration.

```typst
#import "@preview/touying:0.5.5": *
#import "src/unistra.typ": *
#import "src/colors.typ": *
#import "src/admonition.typ": *
#show: unistra-theme.with(
aspect-ratio: "16-9",
config-info(
title: [Title],
subtitle: [_Subtitle_],
author: [Author],
date: datetime.today().display("[month repr:long] [day], [year repr:full]"),
),
)
#title-slide[]
= Example Section Title
== Example Slide
A slide with *important information*.
#lorem(50)
```

> [!NOTE]
> The default font used by touying-unistra-pristine is "Unistra A", a font that can only be downloaded by students and staff from the University of Strasbourg. If the font is not installed on your computer, Segoe UI or Roboto will be used as a fallback, in that specific order. You can change that behavior in the [settings](#Configuration).
# Configuration

The theme can be configured to your liking by adding the `config-store()` object when initializing `unistra-theme`. An example with the `quotes` setting can be found in [example/example.typ](example/example.typ).

A complete list of settings can be found in the `config-store` object in [src/unistra.typ](src/unistra.typ).
Binary file not shown.
Loading

0 comments on commit 219fa65

Please sign in to comment.