From e7aa185312678be18a70b8603fd265c9d6bb8007 Mon Sep 17 00:00:00 2001 From: OrangeX4 <318483724@qq.com> Date: Thu, 7 Mar 2024 17:08:41 +0800 Subject: [PATCH] chore: bump version to 0.3.1 --- README.md | 6 ++-- docs/docs/build-your-own-theme.md | 14 ++++----- docs/docs/changelog.md | 7 +++++ docs/docs/code-styles.md | 10 +++--- docs/docs/dynamic/other.md | 2 +- docs/docs/external/pdfpc.md | 2 +- docs/docs/global-settings.md | 2 +- docs/docs/integration/cetz.md | 2 +- docs/docs/integration/codly.md | 2 +- docs/docs/integration/fletcher.md | 2 +- docs/docs/integration/pinit.md | 2 +- docs/docs/integration/polylux.md | 2 +- docs/docs/layout.md | 2 +- docs/docs/sections.md | 31 +++++++++---------- docs/docs/start.md | 30 ++++++++++++------ docs/docs/themes/dewdrop.md | 6 ++-- docs/docs/themes/metropolis.md | 6 ++-- docs/docs/themes/simple.md | 6 ++-- docs/docs/themes/university.md | 6 ++-- .../current/build-your-own-theme.md | 14 ++++----- .../current/changelog.md | 7 +++++ .../current/code-styles.md | 10 +++--- .../current/dynamic/other.md | 2 +- .../current/external/pdfpc.md | 2 +- .../current/global-settings.md | 2 +- .../current/integration/cetz.md | 2 +- .../current/integration/codly.md | 2 +- .../current/integration/fletcher.md | 2 +- .../current/integration/pinit.md | 2 +- .../current/integration/polylux.md | 2 +- .../current/layout.md | 2 +- .../current/sections.md | 6 ++-- .../current/start.md | 4 +-- .../current/themes/dewdrop.md | 6 ++-- .../current/themes/metropolis.md | 6 ++-- .../current/themes/simple.md | 6 ++-- .../current/themes/university.md | 6 ++-- typst.toml | 2 +- 38 files changed, 125 insertions(+), 100 deletions(-) diff --git a/README.md b/README.md index b7f15a348..9a3d2b1d7 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ 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.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, slides) = utils.methods(s) @@ -92,13 +92,15 @@ Hello, Typst! It's simple. Congratulations on creating your first Touying slide! 🎉 +**Warning:** The comma in `#let (slide,) = utils.slides(s)` is necessary for the unpacking syntax. + ## More Complex Examples 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.0": * +#import "@preview/touying:0.3.1": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge diff --git a/docs/docs/build-your-own-theme.md b/docs/docs/build-your-own-theme.md index a95fe919a..72a917cea 100644 --- a/docs/docs/build-your-own-theme.md +++ b/docs/docs/build-your-own-theme.md @@ -26,7 +26,7 @@ sidebar_position: 10 如果只是你自己使用,你可以直接导入 Touying: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * ``` 如果你希望这个主题作为 Touying 的一部分,放置在 Touying `themes` 目录下,那你应该将上面的导入语句改为 @@ -52,7 +52,7 @@ sidebar_position: 10 ```typst // bamboo.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let register( aspect-ratio: "16-9", @@ -69,7 +69,7 @@ sidebar_position: 10 } // main.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "bamboo.typ" #let s = bamboo.register(s, aspect-ratio: "16-9") @@ -176,7 +176,7 @@ self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it) ```typst // bamboo.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let slide(self: none, title: auto, ..args) = { if title != auto { @@ -238,7 +238,7 @@ self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it) // main.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "bamboo.typ" #let s = bamboo.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) @@ -276,7 +276,7 @@ self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it) ``` // bamboo.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let slide(self: none, title: auto, ..args) = { if title != auto { @@ -393,7 +393,7 @@ self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it) // main.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "bamboo.typ" #let s = bamboo.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index e47a47027..910398f51 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -4,6 +4,13 @@ sidebar_position: 14 # Changelog +## v0.3.1 + +- fix some typos +- fix slide-level bug +- fix bug of pdfpc label + + ## v0.3.0 ### Features diff --git a/docs/docs/code-styles.md b/docs/docs/code-styles.md index 589621db7..dc413e35d 100644 --- a/docs/docs/code-styles.md +++ b/docs/docs/code-styles.md @@ -9,7 +9,7 @@ sidebar_position: 4 如果我们只是需要简单使用,我们可以直接在标题下输入内容,就像是在编写正常 Typst 文档一样。这里的标题有着分割页面的作用,同时我们也能正常地使用 `#pause` 等命令实现动画效果。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, slides) = utils.methods(s) @@ -43,7 +43,7 @@ PS:我们可以使用 `#slides-end` 记号来标志 `#show: slides` 的结束 例如上面的例子就可以改造成 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, slides) = utils.methods(s) @@ -80,7 +80,7 @@ PS:我们可以使用 `#slides-end` 记号来标志 `#show: slides` 的结束 如果我们不希望它自动创建这样一个 section slide,我们可以将这个方法删除: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #(s.methods.touying-new-section-slide = none) @@ -108,7 +108,7 @@ Hello, Typst! 同理,我们也可以注册一个新的 section slide: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #(s.methods.touying-new-section-slide = (self: none, section, ..args) => { @@ -149,7 +149,7 @@ Hello, Typst! 实际上,你也可以不使用 `#show: slides` 和 `utils.slides(s)`,而是只使用 `utils.methods(s)`,例如 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, touying-outline, slide) = utils.methods(s) diff --git a/docs/docs/dynamic/other.md b/docs/docs/dynamic/other.md index 9838046e5..9990316fe 100644 --- a/docs/docs/dynamic/other.md +++ b/docs/docs/dynamic/other.md @@ -11,7 +11,7 @@ Touying also provides `touying-reducer`, which adds `pause` and `meanwhile` anim Here's an example: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge diff --git a/docs/docs/external/pdfpc.md b/docs/docs/external/pdfpc.md index 1592ff031..fc3a491dc 100644 --- a/docs/docs/external/pdfpc.md +++ b/docs/docs/external/pdfpc.md @@ -52,7 +52,7 @@ typst query --root . ./example.typ --field value --one "" > ./exampl With the compatibility of Touying and Polylux, you can make Polylux also support direct export by adding the following code: ```typst -#import "@preview/touying:0.3.0" +#import "@preview/touying:0.3.1" #locate(loc => touying.pdfpc.pdfpc-file(loc)) ``` \ No newline at end of file diff --git a/docs/docs/global-settings.md b/docs/docs/global-settings.md index 671bd8d32..cfcc180fc 100644 --- a/docs/docs/global-settings.md +++ b/docs/docs/global-settings.md @@ -117,7 +117,7 @@ Title is #s.info.title 一般而言,上面的两种方式就已经足够用于加入全局设置了,但是仍然会有部分情况,我们需要初始化 counters 或 states。如果将这些代码放在 `#show: slides` 之前,就会创建一个空白页,这是我们不想看见的,因此这时候我们就可以使用 `s.methods.append-preamble` 方法。例如在使用 codly 包的时候: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/codly:0.2.0": * #let s = themes.simple.register(s, aspect-ratio: "16-9") diff --git a/docs/docs/integration/cetz.md b/docs/docs/integration/cetz.md index 30fedba36..2152766fd 100644 --- a/docs/docs/integration/cetz.md +++ b/docs/docs/integration/cetz.md @@ -11,7 +11,7 @@ Touying 提供了 `touying-reducer`,它能为 cetz 与 fletcher 加入 `pause` 一个例子: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge diff --git a/docs/docs/integration/codly.md b/docs/docs/integration/codly.md index b59db6003..d60e2b86a 100644 --- a/docs/docs/integration/codly.md +++ b/docs/docs/integration/codly.md @@ -7,7 +7,7 @@ sidebar_position: 4 在使用 codly 的时候,我们应该使用 `s.methods.append-preamble` 方法进行初始化。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/codly:0.2.0": * #let s = themes.simple.register(s, aspect-ratio: "16-9") diff --git a/docs/docs/integration/fletcher.md b/docs/docs/integration/fletcher.md index c126fe2c4..b1d40932c 100644 --- a/docs/docs/integration/fletcher.md +++ b/docs/docs/integration/fletcher.md @@ -9,7 +9,7 @@ Touying 提供了 `touying-reducer`,它能为 fletcher 加入 `pause` 和 `mea 一个例子: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge diff --git a/docs/docs/integration/pinit.md b/docs/docs/integration/pinit.md index d84a98fe9..b90edd09d 100644 --- a/docs/docs/integration/pinit.md +++ b/docs/docs/integration/pinit.md @@ -36,7 +36,7 @@ A simple #pin(1)highlighted text#pin(2). 一个与 Touying 共同使用的示例: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/pinit:0.1.3": * #(s.page-args.paper = "presentation-4-3") diff --git a/docs/docs/integration/polylux.md b/docs/docs/integration/polylux.md index bf775c824..4adc8fa23 100644 --- a/docs/docs/integration/polylux.md +++ b/docs/docs/integration/polylux.md @@ -7,7 +7,7 @@ sidebar_position: 5 借助 Touying 与 Polylux 的兼容性,你可以让 Polylux 也支持直接导出,只需要在你的 Polylux 源代码中加入下面的代码即可。 ``` -#import "@preview/touying:0.3.0" +#import "@preview/touying:0.3.1" #locate(loc => touying.pdfpc.pdfpc-file(loc)) ``` diff --git a/docs/docs/layout.md b/docs/docs/layout.md index 43b203db1..544693038 100644 --- a/docs/docs/layout.md +++ b/docs/docs/layout.md @@ -129,7 +129,7 @@ sidebar_position: 5 例如,我们决定给 metropolis 主题加入 GitHub 的图标,我们可以这样实现: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/octique:0.1.0": * #let s = themes.metropolis.register(s, aspect-ratio: "16-9") diff --git a/docs/docs/sections.md b/docs/docs/sections.md index b86b967c6..6eee9a677 100644 --- a/docs/docs/sections.md +++ b/docs/docs/sections.md @@ -2,16 +2,16 @@ sidebar_position: 3 --- -# 节与小节 +# Sections and Subsections -## 结构 +## Structure -与 Beamer 相同,Touying 同样有着 section 和 subsection 的概念。 +Similar to Beamer, Touying also has the concept of sections and subsections. -一般而言,1 级、2 级和 3 级标题分别用来对应 section、subsection 和 title,例如 dewdrop 主题。 +Generally, level 1, level 2, and level 3 headings correspond to section, subsection, and title, respectively, as in the dewdrop theme. ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.dewdrop.register(s) #let (init, slides) = utils.methods(s) @@ -31,10 +31,10 @@ Hello, Touying! ![image](https://github.com/touying-typ/touying/assets/34951714/1574e74d-25c1-418f-a84f-b974f42edae5) -但是很多时候我们并不需要 subsection,因此也会使用 1 级和 2 级标题来分别对应 section 和 title,例如 university 主题。 +However, often we don't need subsections, and we can use level 1 and level 2 headings to correspond to section and title, as in the university theme. ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.university.register(s) #let (init, slides) = utils.methods(s) @@ -52,15 +52,14 @@ Hello, Touying! ![image](https://github.com/touying-typ/touying/assets/34951714/9dd77c98-9c08-4811-872e-092bbdebf394) -实际上,我们可以通过 `slides` 函数的 `slide-level` 参数来控制这里的行为。`slide-level` 代表着嵌套结构的复杂度,从 0 开始计算。例如 `#show: slides.with(slide-level: 2)` 等价于 `section`,`subsection` 和 `title` 结构;而 `#show: slides.with(slide-level: 1)` 等价于 `section` 和 `title` 结构。 +In fact, we can control this behavior through the `slide-level` parameter of the `slides` function. `slide-level` represents the complexity of the nested structure, starting from 0. For example, `#show: slides.with(slide-level: 2)` is equivalent to the section, subsection, and title structure; while `#show: slides.with(slide-level: 1)` is equivalent to the section and title structure. +## Table of Contents -## 目录 - -在 Touying 中显示目录很简单: +Displaying a table of contents in Touying is straightforward: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let (init, slides, alert, touying-outline) = utils.methods(s) #show: init @@ -81,18 +80,18 @@ Hello, Touying! ![image](https://github.com/touying-typ/touying/assets/34951714/3cc09550-d3cc-40c2-a315-22ca8173798f) -其中 `touying-oultine()` 的定义为: +Where the definition of `touying-outline()` is: ```typst #let touying-outline(enum-args: (:), padding: 0pt) = { .. } ``` -你可以通过 `enum-args` 修改内部 enum 的参数。 +You can modify the parameters of the internal enum through `enum-args`. -如果你对目录有着复杂的自定义需求,你可以使用 +If you have complex custom requirements for the table of contents, you can use: ```typst #states.touying-final-sections(sections => ..) ``` -正如 dewdrop 主题所做的那样。 \ No newline at end of file +As done in the dewdrop theme. \ No newline at end of file diff --git a/docs/docs/start.md b/docs/docs/start.md index 549844159..d7533c387 100644 --- a/docs/docs/start.md +++ b/docs/docs/start.md @@ -2,14 +2,14 @@ sidebar_position: 2 --- -# 开始 +# Getting Started -在开始之前,请确保您已经安装了 Typst 环境,如果没有,可以使用 [Web App](https://typst.app/) 或 VS Code 的 [Typst LSP](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp) 和 [Typst Preview](https://marketplace.visualstudio.com/items?itemName=mgt19937.typst-preview) 插件。 +Before you begin, make sure you have the Typst environment installed. If not, you can use the [Web App](https://typst.app/) or install the [Typst LSP](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp) and [Typst Preview](https://marketplace.visualstudio.com/items?itemName=mgt19937.typst-preview) plugins for VS Code. -要使用 Touying,您只需要在文档里加入 +To use Touying, you just need to include the following in your document: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, slides) = utils.methods(s) @@ -31,14 +31,24 @@ Hello, Typst! ![image](https://github.com/touying-typ/touying/assets/34951714/f5bdbf8f-7bf9-45fd-9923-0fa5d66450b2) -这很简单,您创建了您的第一个 Touying slides,恭喜!🎉 +It's that simple! You've created your first Touying slides. Congratulations! 🎉 -## 更复杂的例子 +## More Complex Examples -事实上,Touying 提供了多种 slides 编写风格,实际上您也可以使用 `#slide[..]` 的写法,以获得 Touying 提供的更多更强大的功能。 +In fact, Touying provides various styles for slide writing. You can also use the `#slide[..]` syntax to access more powerful features provided by Touying. + +![image](https://github.com/touying-typ/touying/assets/34951714/fcecb505-d2d1-4e36-945a-225f4661a694) + +Touying offers many built-in themes to easily create beautiful slides. For example, in this case: + +``` +#let s = themes.university.register(s, aspect-ratio: "16-9") +``` + +you can use the university theme. For more detailed tutorials on themes, you can refer to the following sections. ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge @@ -222,10 +232,10 @@ Hello, Typst! ![image](https://github.com/touying-typ/touying/assets/34951714/fcecb505-d2d1-4e36-945a-225f4661a694) -Touying 提供了很多内置的主题,能够简单地编写精美的 slides,例如此处的 +Touying offers many built-in themes to easily create beautiful slides. For example, in this case: ``` #let s = themes.university.register(s, aspect-ratio: "16-9") ``` -可以使用 university 主题。关于主题更详细的教程,您可以参阅后面的章节。 +you can use the university theme. For more detailed tutorials on themes, you can refer to the following sections. \ No newline at end of file diff --git a/docs/docs/themes/dewdrop.md b/docs/docs/themes/dewdrop.md index 9a44d27c0..219974dff 100644 --- a/docs/docs/themes/dewdrop.md +++ b/docs/docs/themes/dewdrop.md @@ -15,7 +15,7 @@ sidebar_position: 3 你可以通过下面的代码来初始化: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.dewdrop.register( s, @@ -151,7 +151,7 @@ Dewdrop 主题提供了一系列自定义 slide 函数: PS: 其中 outline title 可以通过 `#(s.outline-title = [Outline])` 的方式修改。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.dewdrop.register(s, aspect-ratio: "16-9", footer: [Dewdrop]) #let s = (s.methods.info)( @@ -187,7 +187,7 @@ Hello, Typst! ## 示例 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.dewdrop.register( s, diff --git a/docs/docs/themes/metropolis.md b/docs/docs/themes/metropolis.md index 766e53bb4..615bed2ac 100644 --- a/docs/docs/themes/metropolis.md +++ b/docs/docs/themes/metropolis.md @@ -17,7 +17,7 @@ sidebar_position: 2 你可以通过下面的代码来初始化: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.metropolis.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) #let s = (s.methods.info)( @@ -122,7 +122,7 @@ Metropolis 主题提供了一系列自定义 slide 函数: PS: 其中 outline title 可以通过 `#(s.outline-title = [Outline])` 的方式修改。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.metropolis.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) #let s = (s.methods.info)( @@ -158,7 +158,7 @@ Hello, Typst! ## 示例 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.metropolis.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) #let s = (s.methods.info)( diff --git a/docs/docs/themes/simple.md b/docs/docs/themes/simple.md index f5fa44136..e5ba9f4a2 100644 --- a/docs/docs/themes/simple.md +++ b/docs/docs/themes/simple.md @@ -16,7 +16,7 @@ sidebar_position: 1 你可以通过下面的代码来初始化: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s, aspect-ratio: "16-9", footer: [Simple slides]) #let s = (s.methods.enable-transparent-cover)(self: s) @@ -94,7 +94,7 @@ simple 主题提供了一系列自定义 slide 函数: 可以通过 `#show: slides.with(..)` 的方式设置。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s, aspect-ratio: "16-9", footer: [Simple slides]) #let s = (s.methods.enable-transparent-cover)(self: s) @@ -121,7 +121,7 @@ Hello, Typst! ## 示例 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s, aspect-ratio: "16-9", footer: [Simple slides]) #let (init, slides) = utils.methods(s) diff --git a/docs/docs/themes/university.md b/docs/docs/themes/university.md index df98136cc..2e4c401a2 100644 --- a/docs/docs/themes/university.md +++ b/docs/docs/themes/university.md @@ -13,7 +13,7 @@ sidebar_position: 4 你可以通过下面的代码来初始化: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.university.register(s, aspect-ratio: "16-9") #let s = (s.methods.info)( @@ -114,7 +114,7 @@ University 主题提供了一系列自定义 slide 函数: 可以通过 `#show: slides.with(..)` 的方式设置。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.university.register(s, aspect-ratio: "16-9") #let s = (s.methods.info)( @@ -148,7 +148,7 @@ Hello, Typst! ## 示例 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.university.register(s, aspect-ratio: "16-9") #let s = (s.methods.info)( diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/build-your-own-theme.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/build-your-own-theme.md index a95fe919a..72a917cea 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/build-your-own-theme.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/build-your-own-theme.md @@ -26,7 +26,7 @@ sidebar_position: 10 如果只是你自己使用,你可以直接导入 Touying: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * ``` 如果你希望这个主题作为 Touying 的一部分,放置在 Touying `themes` 目录下,那你应该将上面的导入语句改为 @@ -52,7 +52,7 @@ sidebar_position: 10 ```typst // bamboo.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let register( aspect-ratio: "16-9", @@ -69,7 +69,7 @@ sidebar_position: 10 } // main.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "bamboo.typ" #let s = bamboo.register(s, aspect-ratio: "16-9") @@ -176,7 +176,7 @@ self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it) ```typst // bamboo.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let slide(self: none, title: auto, ..args) = { if title != auto { @@ -238,7 +238,7 @@ self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it) // main.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "bamboo.typ" #let s = bamboo.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) @@ -276,7 +276,7 @@ self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it) ``` // bamboo.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let slide(self: none, title: auto, ..args) = { if title != auto { @@ -393,7 +393,7 @@ self.methods.alert = (self: none, it) => text(fill: self.colors.primary, it) // main.typ -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "bamboo.typ" #let s = bamboo.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) 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 4d16fc814..a59ad6b9e 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,13 @@ sidebar_position: 14 # 更新日志 +## v0.3.1 + +- fix some typos +- fix slide-level bug +- fix bug of pdfpc label + + ## v0.3.0 ### Features diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/code-styles.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/code-styles.md index 589621db7..dc413e35d 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/code-styles.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/code-styles.md @@ -9,7 +9,7 @@ sidebar_position: 4 如果我们只是需要简单使用,我们可以直接在标题下输入内容,就像是在编写正常 Typst 文档一样。这里的标题有着分割页面的作用,同时我们也能正常地使用 `#pause` 等命令实现动画效果。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, slides) = utils.methods(s) @@ -43,7 +43,7 @@ PS:我们可以使用 `#slides-end` 记号来标志 `#show: slides` 的结束 例如上面的例子就可以改造成 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, slides) = utils.methods(s) @@ -80,7 +80,7 @@ PS:我们可以使用 `#slides-end` 记号来标志 `#show: slides` 的结束 如果我们不希望它自动创建这样一个 section slide,我们可以将这个方法删除: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #(s.methods.touying-new-section-slide = none) @@ -108,7 +108,7 @@ Hello, Typst! 同理,我们也可以注册一个新的 section slide: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #(s.methods.touying-new-section-slide = (self: none, section, ..args) => { @@ -149,7 +149,7 @@ Hello, Typst! 实际上,你也可以不使用 `#show: slides` 和 `utils.slides(s)`,而是只使用 `utils.methods(s)`,例如 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, touying-outline, slide) = utils.methods(s) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/dynamic/other.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/dynamic/other.md index 11b0ee5a6..fccef8873 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/dynamic/other.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/dynamic/other.md @@ -11,7 +11,7 @@ Touying 还提供了 `touying-reducer`,它能为 cetz 与 fletcher 加入 `pau 一个例子: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/external/pdfpc.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/external/pdfpc.md index 82b985273..216ee79dd 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/external/pdfpc.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/external/pdfpc.md @@ -54,7 +54,7 @@ typst query --root . ./example.typ --field value --one "" > ./exampl 借助 Touying 与 Polylux 的兼容性,你可以让 Polylux 也支持直接导出,只需要加入下面的代码即可。 ``` -#import "@preview/touying:0.3.0" +#import "@preview/touying:0.3.1" #locate(loc => touying.pdfpc.pdfpc-file(loc)) ``` \ No newline at end of file diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/global-settings.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/global-settings.md index 671bd8d32..cfcc180fc 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/global-settings.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/global-settings.md @@ -117,7 +117,7 @@ Title is #s.info.title 一般而言,上面的两种方式就已经足够用于加入全局设置了,但是仍然会有部分情况,我们需要初始化 counters 或 states。如果将这些代码放在 `#show: slides` 之前,就会创建一个空白页,这是我们不想看见的,因此这时候我们就可以使用 `s.methods.append-preamble` 方法。例如在使用 codly 包的时候: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/codly:0.2.0": * #let s = themes.simple.register(s, aspect-ratio: "16-9") diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/cetz.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/cetz.md index 30fedba36..2152766fd 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/cetz.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/cetz.md @@ -11,7 +11,7 @@ Touying 提供了 `touying-reducer`,它能为 cetz 与 fletcher 加入 `pause` 一个例子: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/codly.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/codly.md index b59db6003..d60e2b86a 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/codly.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/codly.md @@ -7,7 +7,7 @@ sidebar_position: 4 在使用 codly 的时候,我们应该使用 `s.methods.append-preamble` 方法进行初始化。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/codly:0.2.0": * #let s = themes.simple.register(s, aspect-ratio: "16-9") diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/fletcher.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/fletcher.md index c126fe2c4..b1d40932c 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/fletcher.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/fletcher.md @@ -9,7 +9,7 @@ Touying 提供了 `touying-reducer`,它能为 fletcher 加入 `pause` 和 `mea 一个例子: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/pinit.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/pinit.md index d84a98fe9..b90edd09d 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/pinit.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/pinit.md @@ -36,7 +36,7 @@ A simple #pin(1)highlighted text#pin(2). 一个与 Touying 共同使用的示例: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/pinit:0.1.3": * #(s.page-args.paper = "presentation-4-3") diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/polylux.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/polylux.md index bf775c824..4adc8fa23 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/polylux.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/integration/polylux.md @@ -7,7 +7,7 @@ sidebar_position: 5 借助 Touying 与 Polylux 的兼容性,你可以让 Polylux 也支持直接导出,只需要在你的 Polylux 源代码中加入下面的代码即可。 ``` -#import "@preview/touying:0.3.0" +#import "@preview/touying:0.3.1" #locate(loc => touying.pdfpc.pdfpc-file(loc)) ``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/layout.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/layout.md index 43b203db1..544693038 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/layout.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/layout.md @@ -129,7 +129,7 @@ sidebar_position: 5 例如,我们决定给 metropolis 主题加入 GitHub 的图标,我们可以这样实现: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/octique:0.1.0": * #let s = themes.metropolis.register(s, aspect-ratio: "16-9") diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/sections.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/sections.md index b86b967c6..5ad1b6694 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/sections.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/sections.md @@ -11,7 +11,7 @@ sidebar_position: 3 一般而言,1 级、2 级和 3 级标题分别用来对应 section、subsection 和 title,例如 dewdrop 主题。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.dewdrop.register(s) #let (init, slides) = utils.methods(s) @@ -34,7 +34,7 @@ Hello, Touying! 但是很多时候我们并不需要 subsection,因此也会使用 1 级和 2 级标题来分别对应 section 和 title,例如 university 主题。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.university.register(s) #let (init, slides) = utils.methods(s) @@ -60,7 +60,7 @@ Hello, Touying! 在 Touying 中显示目录很简单: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let (init, slides, alert, touying-outline) = utils.methods(s) #show: init diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/start.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/start.md index e232ebeab..69ca8e655 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/start.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/start.md @@ -9,7 +9,7 @@ sidebar_position: 2 要使用 Touying,您只需要在文档里加入 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, slides) = utils.methods(s) @@ -38,7 +38,7 @@ Hello, Typst! 事实上,Touying 提供了多种 slides 编写风格,实际上您也可以使用 `#slide[..]` 的写法,以获得 Touying 提供的更多更强大的功能。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/dewdrop.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/dewdrop.md index 9a44d27c0..219974dff 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/dewdrop.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/dewdrop.md @@ -15,7 +15,7 @@ sidebar_position: 3 你可以通过下面的代码来初始化: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.dewdrop.register( s, @@ -151,7 +151,7 @@ Dewdrop 主题提供了一系列自定义 slide 函数: PS: 其中 outline title 可以通过 `#(s.outline-title = [Outline])` 的方式修改。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.dewdrop.register(s, aspect-ratio: "16-9", footer: [Dewdrop]) #let s = (s.methods.info)( @@ -187,7 +187,7 @@ Hello, Typst! ## 示例 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.dewdrop.register( s, diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/metropolis.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/metropolis.md index 766e53bb4..615bed2ac 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/metropolis.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/metropolis.md @@ -17,7 +17,7 @@ sidebar_position: 2 你可以通过下面的代码来初始化: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.metropolis.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) #let s = (s.methods.info)( @@ -122,7 +122,7 @@ Metropolis 主题提供了一系列自定义 slide 函数: PS: 其中 outline title 可以通过 `#(s.outline-title = [Outline])` 的方式修改。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.metropolis.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) #let s = (s.methods.info)( @@ -158,7 +158,7 @@ Hello, Typst! ## 示例 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.metropolis.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) #let s = (s.methods.info)( diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/simple.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/simple.md index f5fa44136..e5ba9f4a2 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/simple.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/simple.md @@ -16,7 +16,7 @@ sidebar_position: 1 你可以通过下面的代码来初始化: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s, aspect-ratio: "16-9", footer: [Simple slides]) #let s = (s.methods.enable-transparent-cover)(self: s) @@ -94,7 +94,7 @@ simple 主题提供了一系列自定义 slide 函数: 可以通过 `#show: slides.with(..)` 的方式设置。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s, aspect-ratio: "16-9", footer: [Simple slides]) #let s = (s.methods.enable-transparent-cover)(self: s) @@ -121,7 +121,7 @@ Hello, Typst! ## 示例 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.simple.register(s, aspect-ratio: "16-9", footer: [Simple slides]) #let (init, slides) = utils.methods(s) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/university.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/university.md index df98136cc..2e4c401a2 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/university.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/themes/university.md @@ -13,7 +13,7 @@ sidebar_position: 4 你可以通过下面的代码来初始化: ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.university.register(s, aspect-ratio: "16-9") #let s = (s.methods.info)( @@ -114,7 +114,7 @@ University 主题提供了一系列自定义 slide 函数: 可以通过 `#show: slides.with(..)` 的方式设置。 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.university.register(s, aspect-ratio: "16-9") #let s = (s.methods.info)( @@ -148,7 +148,7 @@ Hello, Typst! ## 示例 ```typst -#import "@preview/touying:0.3.0": * +#import "@preview/touying:0.3.1": * #let s = themes.university.register(s, aspect-ratio: "16-9") #let s = (s.methods.info)( diff --git a/typst.toml b/typst.toml index 891e5aa8b..d47e7efdc 100644 --- a/typst.toml +++ b/typst.toml @@ -1,6 +1,6 @@ [package] name = "touying" -version = "0.3.0" +version = "0.3.1" entrypoint = "lib.typ" authors = ["OrangeX4", "Andreas Kröpelin", "ntjess", "Enivex", "Pol Dellaiera"] license = "MIT"