Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Sep 2, 2024
1 parent 4ec4190 commit 4581ae2
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 128 deletions.
2 changes: 1 addition & 1 deletion docs/external/pympress.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Meanwhile, #pause we can also use `#meanwhile` to #pause display other content s
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
```

Expand Down
2 changes: 1 addition & 1 deletion docs/integration/ctheorems.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 5

Touying can work seamlessly with the `ctheorems` package, allowing you to directly use the `ctheorems` package.

Moreover, you can utilize `#let s = (s.methods.numbering)(self: s, section: "1.", "1.1")` to set numbering for sections and subsections.
Moreover, you can utilize `#set heading(numbering: "1.1")` to set numbering for sections and subsections.

```typst
#import "@preview/touying:0.5.0": *
Expand Down
2 changes: 1 addition & 1 deletion docs/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Meanwhile, #pause we can also use `#meanwhile` to #pause display other content s
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
Expand Down
2 changes: 1 addition & 1 deletion docs/themes/metropolis.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Meanwhile, #pause we can also use `#meanwhile` to display other content synchron
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
#show: appendix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Meanwhile, #pause we can also use `#meanwhile` to #pause display other content s
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ sidebar_position: 5

Touying 能够与 ctheorems 包一起正常工作,你可以直接使用 ctheorems 包。

其中,你还可以使用 `#let s = (s.methods.numbering)(self: s, section: "1.", "1.1")` 为 sections 和 subsections 设置 numbering。
其中,你还可以使用 `#set heading(numbering: "1.1")` 为 sections 和 subsections 设置 numbering。

```typst
#import "@preview/touying:0.4.2": *
#import "@preview/touying:0.5.0": *
#import themes.university: *
#import "@preview/ctheorems:1.1.2": *
// Register university theme
#let s = themes.simple.register(aspect-ratio: "16-9")
// Set the numbering of section and subsection
#let s = (s.methods.numbering)(self: s, section: "1.", "1.1")
#import "@preview/numbly:0.1.0": numbly
// Theorems configuration by ctheorems
#show: thmrules.with(qed-symbol: $square$)
Expand All @@ -31,56 +27,20 @@ Touying 能够与 ctheorems 包一起正常工作,你可以直接使用 ctheor
#let example = thmplain("example", "Example").with(numbering: none)
#let proof = thmproof("proof", "Proof")
// Extract methods
#let (init, slides, touying-outline, alert, speaker-note) = utils.methods(s)
#show: init
#show strong: alert
// Extract slide functions
#let (slide, empty-slide) = utils.slides(s)
#show: slides
= Theorems
== Prime numbers
#definition[
A natural number is called a #highlight[_prime number_] if it is greater
than 1 and cannot be written as the product of two smaller natural numbers.
]
#example[
The numbers $2$, $3$, and $17$ are prime.
@cor_largest_prime shows that this list is not exhaustive!
]
#theorem("Euclid")[
There are infinitely many primes.
]
#proof[
Suppose to the contrary that $p_1, p_2, dots, p_n$ is a finite enumeration
of all primes. Set $P = p_1 p_2 dots p_n$. Since $P + 1$ is not in our list,
it cannot be prime. Thus, some prime factor $p_j$ divides $P + 1$. Since
$p_j$ also divides $P$, it must divide the difference $(P + 1) - P = 1$, a
contradiction.
]
#corollary[
There is no largest prime number.
] <cor_largest_prime>
#corollary[
There are infinitely many composite numbers.
]
#theorem[
There are arbitrarily long stretches of composite numbers.
]
#show: university-theme.with(
aspect-ratio: "16-9",
// config-common(handout: true),
config-info(
title: [Title],
subtitle: [Subtitle],
author: [Authors],
date: datetime.today(),
institution: [Institution],
logo: emoji.school,
),
)
#proof[
For any $n > 2$, consider $
n! + 2, quad n! + 3, quad ..., quad n! + n #qedhere
$
]
#set heading(numbering: numbly("{1}.", default: "1.1"))
```

![image](https://github.com/touying-typ/touying/assets/34951714/b506da7e-b7d6-4493-b35a-2307cfd38ddc)
2 changes: 1 addition & 1 deletion i18n/zh/docusaurus-plugin-content-docs/current/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Meanwhile, #pause we can also use `#meanwhile` to #pause display other content s
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Meanwhile, #pause we can also use `#meanwhile` to display other content synchron
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
#show: appendix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Meanwhile, #pause we can also use `#meanwhile` to #pause display other content s
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ sidebar_position: 5

Touying 能够与 ctheorems 包一起正常工作,你可以直接使用 ctheorems 包。

其中,你还可以使用 `#let s = (s.methods.numbering)(self: s, section: "1.", "1.1")` 为 sections 和 subsections 设置 numbering。
其中,你还可以使用 `#set heading(numbering: "1.1")` 为 sections 和 subsections 设置 numbering。

```typst
#import "@preview/touying:0.4.2": *
#import "@preview/touying:0.5.0": *
#import themes.university: *
#import "@preview/ctheorems:1.1.2": *
// Register university theme
#let s = themes.simple.register(aspect-ratio: "16-9")
// Set the numbering of section and subsection
#let s = (s.methods.numbering)(self: s, section: "1.", "1.1")
#import "@preview/numbly:0.1.0": numbly
// Theorems configuration by ctheorems
#show: thmrules.with(qed-symbol: $square$)
Expand All @@ -31,56 +27,20 @@ Touying 能够与 ctheorems 包一起正常工作,你可以直接使用 ctheor
#let example = thmplain("example", "Example").with(numbering: none)
#let proof = thmproof("proof", "Proof")
// Extract methods
#let (init, slides, touying-outline, alert, speaker-note) = utils.methods(s)
#show: init
#show strong: alert
// Extract slide functions
#let (slide, empty-slide) = utils.slides(s)
#show: slides
= Theorems
== Prime numbers
#definition[
A natural number is called a #highlight[_prime number_] if it is greater
than 1 and cannot be written as the product of two smaller natural numbers.
]
#example[
The numbers $2$, $3$, and $17$ are prime.
@cor_largest_prime shows that this list is not exhaustive!
]
#theorem("Euclid")[
There are infinitely many primes.
]
#proof[
Suppose to the contrary that $p_1, p_2, dots, p_n$ is a finite enumeration
of all primes. Set $P = p_1 p_2 dots p_n$. Since $P + 1$ is not in our list,
it cannot be prime. Thus, some prime factor $p_j$ divides $P + 1$. Since
$p_j$ also divides $P$, it must divide the difference $(P + 1) - P = 1$, a
contradiction.
]
#corollary[
There is no largest prime number.
] <cor_largest_prime>
#corollary[
There are infinitely many composite numbers.
]
#theorem[
There are arbitrarily long stretches of composite numbers.
]
#show: university-theme.with(
aspect-ratio: "16-9",
// config-common(handout: true),
config-info(
title: [Title],
subtitle: [Subtitle],
author: [Authors],
date: datetime.today(),
institution: [Institution],
logo: emoji.school,
),
)
#proof[
For any $n > 2$, consider $
n! + 2, quad n! + 3, quad ..., quad n! + n #qedhere
$
]
#set heading(numbering: numbly("{1}.", default: "1.1"))
```

![image](https://github.com/touying-typ/touying/assets/34951714/b506da7e-b7d6-4493-b35a-2307cfd38ddc)
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Meanwhile, #pause we can also use `#meanwhile` to #pause display other content s
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Meanwhile, #pause we can also use `#meanwhile` to display other content synchron
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
#show: appendix
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-0.5.x/external/pympress.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Meanwhile, #pause we can also use `#meanwhile` to #pause display other content s
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
```

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-0.5.x/integration/ctheorems.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 5

Touying can work seamlessly with the `ctheorems` package, allowing you to directly use the `ctheorems` package.

Moreover, you can utilize `#let s = (s.methods.numbering)(self: s, section: "1.", "1.1")` to set numbering for sections and subsections.
Moreover, you can utilize `#set heading(numbering: "1.1")` to set numbering for sections and subsections.

```typst
#import "@preview/touying:0.5.0": *
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-0.5.x/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Meanwhile, #pause we can also use `#meanwhile` to #pause display other content s
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-0.5.x/themes/metropolis.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Meanwhile, #pause we can also use `#meanwhile` to display other content synchron
#speaker-note[
+ This is a speaker note.
+ You won't see it unless you use `#let s = (s.math.show-notes-on-second-screen)(self: s, right)`
+ You won't see it unless you use `config-common(show-notes-on-second-screen: right)`
]
#show: appendix
Expand Down

0 comments on commit 4581ae2

Please sign in to comment.