Skip to content

Commit

Permalink
update to 0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Sep 3, 2024
1 parent 02decd4 commit 62b5acd
Show file tree
Hide file tree
Showing 76 changed files with 160 additions and 160 deletions.
18 changes: 9 additions & 9 deletions docs/build-your-own-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ To demonstrate how to create a theme with Touying, let's step by step create a s
If you want to modify a Touying internal theme locally instead of creating one from scratch, you can achieve this by:

1. Copying the [theme code](https://github.com/touying-typ/touying/tree/main/themes) from the `themes` directory to your local, for example, copying `themes/university.typ` to your local `university.typ`.
2. Replacing the `#import "../src/exports.typ": *` command at the top of the `university.typ` file with `#import "@preview/touying:0.5.1": *`.
2. Replacing the `#import "../src/exports.typ": *` command at the top of the `university.typ` file with `#import "@preview/touying:0.5.2": *`.

Then you can import and use the theme by:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import "university.typ": *
#show: university-theme.with(
Expand All @@ -48,7 +48,7 @@ Depending on whether the theme is your own or part of Touying, you can import it
If it's just for your own use, you can directly import Touying:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
```

If you want the theme to be part of Touying, placed in the Touying `themes` directory, then you should change the import statement above to
Expand All @@ -73,7 +73,7 @@ Generally, the first step in making slides is to determine the font size and pag

```typst
// bamboo.typ
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#let bamboo-theme(
aspect-ratio: "16-9",
Expand All @@ -94,7 +94,7 @@ Generally, the first step in making slides is to determine the font size and pag
}
// main.typ
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import "bamboo.typ": *
#show: bamboo-theme.with(aspect-ratio: "16-9")
Expand Down Expand Up @@ -195,7 +195,7 @@ We also need to customize a `slide` method, which accepts `#let slide(title: aut

```typst
// bamboo.typ
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#let slide(title: auto, ..args) = touying-slide-wrapper(self => {
if title != auto {
Expand Down Expand Up @@ -270,7 +270,7 @@ We also need to customize a `slide` method, which accepts `#let slide(title: aut
// main.typ
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import "bamboo.typ": *
#show: bamboo-theme.with(aspect-ratio: "16-9")
Expand All @@ -294,7 +294,7 @@ For the `new-section-slide` method, it's the same, but the only thing to note is

```typst
// bamboo.typ
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#let slide(title: auto, ..args) = touying-slide-wrapper(self => {
if title != auto {
Expand Down Expand Up @@ -411,7 +411,7 @@ For the `new-section-slide` method, it's the same, but the only thing to note is
// main.typ
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import "bamboo.typ": *
#show: bamboo-theme.with(
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This is a significant disruptive version update. Touying has removed many mistak
A simple usage example is shown below, and more examples can be found in the `examples` directory:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.university: *
#show: university-theme.with(
Expand Down
10 changes: 5 additions & 5 deletions docs/code-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 4
If we just need to use it simply, we can directly input content under the title, just like writing a normal Typst document. The titles here serve to separate pages, and we can also normally use commands like `#pause` to achieve animation effects.

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#show: simple-theme.with(aspect-ratio: "16-9")
Expand All @@ -32,7 +32,7 @@ And you can use an empty title `== <touying:hidden>` to create a new page, which
If we need to maintain the current title and just want to add a new page, we can use `#pagebreak()`, or directly use `---` to split the page, the latter is parsed as `#pagebreak()` in Touying.

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#show: simple-theme.with(aspect-ratio: "16-9")
Expand All @@ -57,7 +57,7 @@ Many times, using only the simple style cannot achieve all the functions we need
For example, the above example can be transformed into

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#show: simple-theme.with(aspect-ratio: "16-9")
Expand Down Expand Up @@ -91,7 +91,7 @@ You may have noticed that when using the simple theme, using a first-level title
If we do not want it to automatically create such a section slide, we can remove this method:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#show: simple-theme.with(
Expand All @@ -117,7 +117,7 @@ As you can see, this will only result in two pages, and the default section slid
Similarly, we can also register a new section slide:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#show: simple-theme.with(
Expand Down
2 changes: 1 addition & 1 deletion docs/dynamic/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Touying also provides `touying-reducer`, which adds `pause` and `meanwhile` anim
Here's an example:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.university: *
#import "@preview/cetz:0.2.2"
#import "@preview/fletcher:0.5.1" as fletcher: node, edge
Expand Down
2 changes: 1 addition & 1 deletion docs/external/pdfpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ typst query --root . ./example.typ --field value --one "<pdfpc-file>" > ./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.5.1"
#import "@preview/touying:0.5.2"
#context touying.pdfpc.pdfpc-file(here())
```
2 changes: 1 addition & 1 deletion docs/external/pympress.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sidebar_position: 2
## Speaker Notes

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.university: *
#show: university-theme.with(
Expand Down
2 changes: 1 addition & 1 deletion docs/integration/cetz.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Touying provides the `touying-reducer`, which adds `pause` and `meanwhile` anima
An example:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.metropolis: *
#import "@preview/cetz:0.2.2"
#import "@preview/fletcher:0.5.1" as fletcher: node, edge
Expand Down
2 changes: 1 addition & 1 deletion docs/integration/ctheorems.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Touying can work seamlessly with the `ctheorems` package, allowing you to direct
Moreover, you can utilize `#set heading(numbering: "1.1")` to set numbering for sections and subsections.

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#import "@preview/ctheorems:1.1.2": *
#import "@preview/numbly:0.1.0": numbly
Expand Down
2 changes: 1 addition & 1 deletion docs/integration/fletcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Touying provides the `touying-reducer`, which adds `pause` and `meanwhile` anima
An example:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.metropolis: *
#import "@preview/cetz:0.2.2"
#import "@preview/fletcher:0.5.1" as fletcher: node, edge
Expand Down
2 changes: 1 addition & 1 deletion docs/integration/pinit.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Another [example](https://github.com/OrangeX4/typst-pinit/blob/main/examples/equ
An example of shared usage with Touying:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.default: *
#import "@preview/pinit:0.2.0": *
Expand Down
2 changes: 1 addition & 1 deletion docs/multi-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ These three files are separated to allow both `main.typ` and `content.typ` to im

```typst
// globals.typ
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.university: *
// as well as some utility functions
Expand Down
6 changes: 3 additions & 3 deletions docs/sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Like Beamer, Touying also has the concept of sections and subsections.
Generally, first-level, second-level, and third-level headings correspond to sections, subsections, and subsubsections, respectively, such as in the dewdrop theme.

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.dewdrop: *
#show: dewdrop-theme.with(aspect-ratio: "16-9")
Expand All @@ -30,7 +30,7 @@ Hello, Touying!
However, there are many times when we do not need subsections, so we also use first-level and second-level headings to correspond to sections and titles, respectively, such as in the university theme.

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.university: *
#show: university-theme.with(aspect-ratio: "16-9")
Expand Down Expand Up @@ -62,7 +62,7 @@ This sets the default numbering to `1.1`, and the section corresponds to the num
Displaying a table of contents in Touying is straightforward:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#import "@preview/numbly:0.1.0": numbly
Expand Down
4 changes: 2 additions & 2 deletions docs/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Before you begin, make sure you have the Typst environment installed. If not, yo
To use Touying, you just need to include the following in your document:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#show: simple-theme.with(aspect-ratio: "16-9")
Expand Down Expand Up @@ -38,7 +38,7 @@ In fact, Touying provides various styles for slide writing. You can also use the
Touying offers many built-in themes to easily create beautiful slides. For example, in this case:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.university: *
#import "@preview/cetz:0.2.2"
#import "@preview/fletcher:0.5.1" as fletcher: node, edge
Expand Down
4 changes: 2 additions & 2 deletions docs/themes/aqua.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This theme is created by [@pride7](https://github.com/pride7), featuring beautif
You can initialize it with the following code:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.aqua: *
#show: aqua-theme.with(
Expand Down Expand Up @@ -112,7 +112,7 @@ Start a new section with the given title.
## Example

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.aqua: *
#show: aqua-theme.with(
Expand Down
4 changes: 2 additions & 2 deletions docs/themes/dewdrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The Dewdrop theme features an elegantly designed navigation, including two modes
You can initialize it using the following code:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.dewdrop: *
#import "@preview/numbly:0.1.0": numbly
Expand Down Expand Up @@ -110,7 +110,7 @@ Used to draw attention, with the background color set to `self.colors.primary`.
## Example

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.dewdrop: *
#import "@preview/numbly:0.1.0": numbly
Expand Down
4 changes: 2 additions & 2 deletions docs/themes/metropolis.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The Metropolis theme is elegant and suitable for everyday use. It is recommended
You can initialize it using the following code:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.metropolis: *
#import "@preview/numbly:0.1.0": numbly
Expand Down Expand Up @@ -117,7 +117,7 @@ Creates a new section with the given title.
## Example

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.metropolis: *
#import "@preview/numbly:0.1.0": numbly
Expand Down
4 changes: 2 additions & 2 deletions docs/themes/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Considered a relatively straightforward theme, you can use it to create simple s
You can initialize it using the following code:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#show: simple-theme.with(
Expand Down Expand Up @@ -86,7 +86,7 @@ Used to draw attention, it optionally accepts a foreground color (defaulting to
## Example

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.simple: *
#show: simple-theme.with(
Expand Down
4 changes: 2 additions & 2 deletions docs/themes/stargazer.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Stargazer theme, originally created by [Coekjan](https://github.com/Coekjan/
You can initialize the theme with the following code:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.stargazer: *
#import "@preview/numbly:0.1.0": numbly
Expand Down Expand Up @@ -127,7 +127,7 @@ Start a new section with the given title.
## Example

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.stargazer: *
#import "@preview/numbly:0.1.0": numbly
Expand Down
4 changes: 2 additions & 2 deletions docs/themes/university.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This aesthetically pleasing theme is courtesy of [Pol Dellaiera](https://github.
You can initialize the theme with the following code:

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.university: *
#import "@preview/numbly:0.1.0": numbly
Expand Down Expand Up @@ -124,7 +124,7 @@ Refer to the [documentation](https://polylux.dev/book/themes/gallery/university.
## Example

```typst
#import "@preview/touying:0.5.1": *
#import "@preview/touying:0.5.2": *
#import themes.university: *
#import "@preview/numbly:0.1.0": numbly
Expand Down
Loading

0 comments on commit 62b5acd

Please sign in to comment.