From 48f24272ef99f527c5339ad474f665881483981f Mon Sep 17 00:00:00 2001 From: OrangeX4 <318483724@qq.com> Date: Fri, 15 Mar 2024 18:22:45 +0800 Subject: [PATCH] docs: update for 0.3.2 --- README.md | 14 ++-- changelog.md | 80 +++++++++++++++++++ docs/docs/changelog.md | 8 ++ .../current/changelog.md | 8 ++ typst.toml | 4 +- 5 files changed, 106 insertions(+), 8 deletions(-) create mode 100644 changelog.md diff --git a/README.md b/README.md index f99d97940..986ea41fc 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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 @@ -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 @@ -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)( @@ -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` diff --git a/changelog.md b/changelog.md new file mode 100644 index 000000000..87030a162 --- /dev/null +++ b/changelog.md @@ -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. diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index 910398f51..87030a162 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -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 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/changelog.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/changelog.md index a59ad6b9e..7b4aa1a1c 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/changelog.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/changelog.md @@ -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 diff --git a/typst.toml b/typst.toml index 4c3d5253c..c1645e6ea 100644 --- a/typst.toml +++ b/typst.toml @@ -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"