Skip to content

Commit

Permalink
docs: update for 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Mar 15, 2024
1 parent 4168c44 commit 48f2427
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 8 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Touying](https://github.com/touying-typ/touying) ![logo](https://github.com/touying-typ/touying/assets/34951714/2aa394d3-2319-4572-aef7-ed3c14b09846)

[Touying](https://github.com/touying-typ/touying) (投影 in chinese, /tóuyǐng/, meaning projection) is a powerful and efficient package for creating presentation slides in Typst. Touying is a package derived from [Polylux](https://github.com/andreasKroepelin/polylux). Therefore, many concepts and APIs remain consistent with Polylux.
[Touying](https://github.com/touying-typ/touying) (投影 in chinese, /tóuyǐng/, meaning projection) is a powerful and efficient package for creating presentation slides in Typst. Partial code is inherited from [Polylux](https://github.com/andreasKroepelin/polylux). Therefore, many concepts and APIs remain consistent with Polylux.

Touying provides an object-oriented programming (OOP) style syntax, allowing the simulation of "global variables" through a global singleton. This makes it easy to write themes. Touying does not rely on `counter` and `locate` to implement `#pause`, resulting in better performance.

Expand All @@ -10,7 +10,7 @@ If you like it, consider [giving a star on GitHub](https://github.com/touying-ty
![GitHub](https://img.shields.io/github/license/touying-typ/touying)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/touying-typ/touying)
![GitHub Repo stars](https://img.shields.io/github/stars/touying-typ/touying)
![Themes badge](https://img.shields.io/badge/themes-4-aqua)
![Themes badge](https://img.shields.io/badge/themes-5-aqua)

## Document

Expand Down Expand Up @@ -68,15 +68,16 @@ Before you begin, make sure you have installed the Typst environment. If not, yo
To use Touying, you only need to include the following code in your document:

```typst
#import "@preview/touying:0.3.1": *
#import "@preview/touying:0.3.2": *
#let s = themes.simple.register(s)
#let s = themes.simple.register(aspect-ratio: "16-9")
#let (init, slides) = utils.methods(s)
#show: init
#let (slide,) = utils.slides(s)
#show: slides
= Title
== First Slide
Expand All @@ -102,7 +103,7 @@ It's simple. Congratulations on creating your first Touying slide! 🎉
In fact, Touying provides various styles for writing slides. For example, the above example uses first-level and second-level titles to create new slides. However, you can also use the `#slide[..]` format to access more powerful features provided by Touying.

```typst
#import "@preview/touying:0.3.1": *
#import "@preview/touying:0.3.2": *
#import "@preview/cetz:0.2.1"
#import "@preview/fletcher:0.4.2" as fletcher: node, edge
Expand All @@ -113,7 +114,7 @@ In fact, Touying provides various styles for writing slides. For example, the ab
// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
#let s = themes.university.register(s, aspect-ratio: "16-9")
#let s = themes.university.register(aspect-ratio: "16-9")
// Global information configuration
#let s = (s.methods.info)(
Expand Down Expand Up @@ -282,4 +283,5 @@ Thanks to...
- [@andreasKroepelin](https://github.com/andreasKroepelin) for the `polylux` package
- [@Enivex](https://github.com/Enivex) for the `metropolis` theme
- [@drupol](https://github.com/drupol) for the `university` theme
- [@pride7](https://github.com/pride7) for the `aqua` theme
- [@ntjess](https://github.com/ntjess) for contributing to `fit-to-height`, `fit-to-width` and `cover-with-rect`
80 changes: 80 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
sidebar_position: 14
---

# Changelog

## v0.3.2

1. **fix critical bug:** fix `is-sequence` function, make `grid` and `table` work correctly in touying
2. **theme:** add aqua theme, thanks for pride7
3. **refactor:** don't export variable `s` by default anymore, it will be extracted by `register` function (**Breaking Change**)
4. **meta:** add `categories` and `template` config to `typst.toml` for Typst 0.11


## v0.3.1

- fix some typos
- fix slide-level bug
- fix bug of pdfpc label


## v0.3.0

### Features

- better show-slides mode.
- support align and pad.

### Documentation

- Add more detailed documentation.

### Refactor

- simplify theme.

### Fix

- fix many bugs.

## v0.2.1

### Features

- **Touying-reducer**: support cetz and fletcher animation
- **university theme**: add university theme

### Fix

- fix footer progress in metropolis theme
- fix some bugs in simple and dewdrop themes
- fix bug that outline does not display more than 4 sections


## v0.2.0

- **Object-oriented programming:** Singleton `s`, binding methods `utils.methods(s)` and `(self: obj, ..) => {..}` methods.
- **Page arguments management:** Instead of using `#set page(..)`, you should use `self.page-args` to retrieve or set page parameters, thereby avoiding unnecessary creation of new pages.
- **`#pause` for sequence content:** You can use #pause at the outermost level of a slide, including inline and list.
- **`#pause` for layout functions:** You can use the `composer` parameter to add yourself layout function like `utils.side-by-side`, and simply use multiple pos parameters like `#slide[..][..]`.
- **`#meanwhile` for synchronous display:** Provide a `#meanwhile` for resetting subslides counter.
- **`#pause` and `#meanwhile` for math equation:** Provide a `#touying-equation("x + y pause + z")` for math equation animations.
- **Slides:** Create simple slides using standard headings.
- **Callback-style `uncover`, `only` and `alternatives`:** Based on the concise syntax provided by Polylux, allow precise control of the timing for displaying content.
- You should manually control the number of subslides using the `repeat` parameter.
- **Transparent cover:** Enable transparent cover using oop syntax like `#let s = (s.methods.enable-transparent-cover)(self: s)`.
- **Handout mode:** enable handout mode by `#let s = (s.methods.enable-handout-mode)(self: s)`.
- **Fit-to-width and fit-to-height:** Fit-to-width for title in header and fit-to-height for image.
- `utils.fit-to-width(grow: true, shrink: true, width, body)`
- `utils.fit-to-height(width: none, prescale-width: none, grow: true, shrink: true, height, body)`
- **Slides counter:** `states.slide-counter.display() + " / " + states.last-slide-number` and `states.touying-progress(ratio => ..)`.
- **Appendix:** Freeze the `last-slide-number` to prevent the slide number from increasing further.
- **Sections:** Touying's built-in section support can be used to display the current section title and show progress.
- `section` and `subsection` parameter in `#slide` to register a new section or subsection.
- `states.current-section-title` to get the current section.
- `states.touying-outline` or `s.methods.touying-outline` to display a outline of sections.
- `states.touying-final-sections(sections => ..)` for custom outline display.
- `states.touying-progress-with-sections((current-sections: .., final-sections: .., current-slide-number: .., last-slide-number: ..) => ..)` for powerful progress display.
- **Navigation bar**: Navigation bar like [here](https://github.com/zbowang/BeamerTheme) by `states.touying-progress-with-sections(..)`, in `dewdrop` theme.
- **Pdfpc:** pdfpc support and export `.pdfpc` file without external tool by `typst query` command simply.
8 changes: 8 additions & 0 deletions docs/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ sidebar_position: 14

# Changelog

## v0.3.2

1. **fix critical bug:** fix `is-sequence` function, make `grid` and `table` work correctly in touying
2. **theme:** add aqua theme, thanks for pride7
3. **refactor:** don't export variable `s` by default anymore, it will be extracted by `register` function (**Breaking Change**)
4. **meta:** add `categories` and `template` config to `typst.toml` for Typst 0.11


## v0.3.1

- fix some typos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ sidebar_position: 14

# 更新日志

## v0.3.2

1. **fix critical bug:** fix `is-sequence` function, make `grid` and `table` work correctly in touying
2. **theme:** add aqua theme, thanks for pride7
3. **refactor:** don't export variable `s` by default anymore, it will be extracted by `register` function (**Breaking Change**)
4. **meta:** add `categories` and `template` config to `typst.toml` for Typst 0.11


## v0.3.1

- fix some typos
Expand Down
4 changes: 2 additions & 2 deletions typst.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "touying"
version = "0.3.1"
version = "0.3.2"
entrypoint = "lib.typ"
authors = ["OrangeX4", "Andreas Kröpelin", "ntjess", "Enivex", "Pol Dellaiera"]
authors = ["OrangeX4", "Andreas Kröpelin", "ntjess", "Enivex", "Pol Dellaiera", "pride7"]
license = "MIT"
description = "A powerful package for creating presentation slides in Typst."
repository = "https://github.com/touying-typ/touying"
Expand Down

0 comments on commit 48f2427

Please sign in to comment.