Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add speaker note support for dual screens #43

Merged
merged 3 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ In fact, Touying provides various styles for writing slides. For example, the ab
#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(aspect-ratio: "16-9")

// Set the numbering of section and subsection
#let s = (s.methods.numbering)(self: s, section: "1.", "1.1")

// Set the speaker notes configuration
// #let s = (s.methods.show-notes-on-second-screen)(self: s, right)

// Global information configuration
#let s = (s.methods.info)(
self: s,
Expand Down Expand Up @@ -173,7 +175,7 @@ In fact, Touying provides various styles for writing slides. For example, the ab
#let proof = thmproof("proof", "Proof")

// Extract methods
#let (init, slides, touying-outline, alert) = utils.methods(s)
#let (init, slides, touying-outline, alert, speaker-note) = utils.methods(s)
#show: init

#show strong: alert
Expand All @@ -196,6 +198,10 @@ Just like this.

Meanwhile, #pause we can also use `#meanwhile` to #pause display other content synchronously.

#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)`
]

== Complex Animation

Expand Down Expand Up @@ -339,6 +345,7 @@ Fletcher Animation in Touying:
#slide[
Please pay attention to the current slide number.
]

```

![image](https://github.com/touying-typ/touying/assets/34951714/5ac2b11c-9e77-4389-ade6-682c9fc3e1fb)
Expand Down
51 changes: 51 additions & 0 deletions docs/docs/external/pympress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
sidebar_position: 2
---

# Pympress

[Pympress](https://github.com/Cimbali/pympress) 是一种 PDF 演示工具,专为演示文稿和公开演讲等双屏设置而设计。高度可配置、功能齐全且可移植。


## 笔记支持

```typst
#import "@preview/touying:0.4.0": *

#let s = themes.university.register(aspect-ratio: "16-9")

// Set the speaker notes configuration, you can show it by pympress
#let s = (s.methods.show-notes-on-second-screen)(self: s, right)

#let (init, slides, touying-outline, alert, speaker-note) = utils.methods(s)
#show: init

#let (slide, empty-slide) = utils.slides(s)
#show: slides

= Animation

== Simple Animation

We can use `#pause` to #pause display something later.

#pause

Just like this.

#meanwhile

Meanwhile, #pause we can also use `#meanwhile` to #pause display other content synchronously.

#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)`
]
```

![image](https://github.com/touying-typ/touying/assets/34951714/b43c7f99-c5f9-4084-aa70-c1561e8aafee)

然后我们就可以使用 pympress 放映了。

![image](https://github.com/touying-typ/touying/assets/34951714/afbe17cb-46d4-4507-90e8-959c53de95d5)

2 changes: 1 addition & 1 deletion docs/docs/external/typst-preview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
---

# Typst Preview
Expand Down
3 changes: 1 addition & 2 deletions docs/docs/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ you can use the university theme. For more detailed tutorials on themes, you can
#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(aspect-ratio: "16-9")

// Set the numbering of section and subsection
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
sidebar_position: 2
---

# Pympress

[Pympress](https://github.com/Cimbali/pympress) is a PDF presentation tool designed for dual-screen setups such as presentations and public talks. Highly configurable, fully-featured, and portable


## Speaker Notes

```typst
#import "@preview/touying:0.4.0": *

#let s = themes.university.register(aspect-ratio: "16-9")

// Set the speaker notes configuration, you can show it by pympress
#let s = (s.methods.show-notes-on-second-screen)(self: s, right)

#let (init, slides, touying-outline, alert, speaker-note) = utils.methods(s)
#show: init

#let (slide, empty-slide) = utils.slides(s)
#show: slides

= Animation

== Simple Animation

We can use `#pause` to #pause display something later.

#pause

Just like this.

#meanwhile

Meanwhile, #pause we can also use `#meanwhile` to #pause display other content synchronously.

#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)`
]
```

![image](https://github.com/touying-typ/touying/assets/34951714/b43c7f99-c5f9-4084-aa70-c1561e8aafee)

Then we can use the pympress to show it.

![image](https://github.com/touying-typ/touying/assets/34951714/afbe17cb-46d4-4507-90e8-959c53de95d5)

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
---

# Typst Preview
Expand Down
3 changes: 1 addition & 2 deletions docs/i18n/zh/docusaurus-plugin-content-docs/current/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ Hello, Typst!
#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(aspect-ratio: "16-9")

// Set the numbering of section and subsection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ Hello, Typst!
#let fletcher-diagram = touying-reducer.with(reduce: (arr, ..args) => fletcher.diagram(..args, ..arr))

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(aspect-ratio: "16-9")

// Global information configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ Hello, Typst!
#let fletcher-diagram = touying-reducer.with(reduce: (arr, ..args) => fletcher.diagram(..args, ..arr))

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(s, aspect-ratio: "16-9")

// Global information configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ Hello, Typst!
#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(aspect-ratio: "16-9")

// Set the numbering of section and subsection
Expand Down
3 changes: 1 addition & 2 deletions docs/versioned_docs/version-0.3.2+/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ you can use the university theme. For more detailed tutorials on themes, you can
#let fletcher-diagram = touying-reducer.with(reduce: (arr, ..args) => fletcher.diagram(..args, ..arr))

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(aspect-ratio: "16-9")

// Global information configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/versioned_docs/version-0.3.x/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ you can use the university theme. For more detailed tutorials on themes, you can
#let fletcher-diagram = touying-reducer.with(reduce: (arr, ..args) => fletcher.diagram(..args, ..arr))

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(s, aspect-ratio: "16-9")

// Global information configuration
Expand Down
3 changes: 1 addition & 2 deletions docs/versioned_docs/version-0.4.0+/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ you can use the university theme. For more detailed tutorials on themes, you can
#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(aspect-ratio: "16-9")

// Set the numbering of section and subsection
Expand Down
12 changes: 9 additions & 3 deletions examples/example.typ
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)

// Register university theme
// You can remove the theme registration or replace other themes
// it can still work normally
// You can replace it with other themes and it can still work normally
#let s = themes.university.register(aspect-ratio: "16-9")

// Set the numbering of section and subsection
#let s = (s.methods.numbering)(self: s, section: "1.", "1.1")

// Set the speaker notes configuration, you can show it by pympress
// #let s = (s.methods.show-notes-on-second-screen)(self: s, right)

// Global information configuration
#let s = (s.methods.info)(
self: s,
Expand Down Expand Up @@ -57,7 +59,7 @@
#let proof = thmproof("proof", "Proof")

// Extract methods
#let (init, slides, touying-outline, alert) = utils.methods(s)
#let (init, slides, touying-outline, alert, speaker-note) = utils.methods(s)
#show: init

#show strong: alert
Expand All @@ -80,6 +82,10 @@ Just like this.

Meanwhile, #pause we can also use `#meanwhile` to #pause display other content synchronously.

#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)`
]

== Complex Animation

Expand Down
Loading