touying-typ / touying

Touying is a powerful package for creating presentation slides in Typst.
https://touying-typ.github.io/touying/
MIT License
461 stars 10 forks source link

`#pause` abnormal when manually setting text size and `list` longer than a page #16

Closed astrojhgu closed 4 months ago

astrojhgu commented 4 months ago

The minimum reproducing code is attached as follows:

I find in two conditions, the #pause command does not work normally:

  1. When in a pate, #set text(size: ??pt) exists
  2. When the length of the content is longer than a page (overflow to a next page)
#import "@preview/touying:0.3.1": *

// Make the paper dimensions fit for a presentation and the text larger
// 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")

// Global information configuration
#let s = (s.methods.info)(
  self: s,
  title: [Title],
  subtitle: [---Subtitle],
  author: [Some one],
  date: datetime.today(),
  institution: [Beijing],
)

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

#show strong: alert

// Extract slide functions
#let (slide,) = utils.slides(s)
#show: slides

#slide(
  title: [Title here, this page is ok]
)[
  - item 1 #pause
  - item 2 #pause
  - item 3
]

#slide(
  title: [Title here, this page does not \#pause normally]
)[
  #set text(size:25pt)
  - item 1 #pause
  - item 2 #pause
  - item 3
]

#slide(
  title: [Title here, this page is ok]
)[
  - item 1 #pause
  - item 2 #pause
  - item 3 #pause
  - item 4 #pause
  - item 5 #pause
  - item 6 #pause
  - item 7 #pause
  - item 8 #pause
  - item 9 #pause
  - item 10 #pause
  - item 11 #pause
  - item 12
]

#slide(
  title: [Title here, this page does not \#pause normally]
)[
  - item 1 #pause
  - item 2 #pause
  - item 3 #pause
  - item 4 #pause
  - item 5 #pause
  - item 6 #pause
  - item 7 #pause
  - item 8 #pause
  - item 9 #pause
  - item 10 #pause
  - item 11 #pause
  - item 12 #pause
  - item 13 #pause
]
OrangeX4 commented 4 months ago
  1. Known issue. You can use setting parameter in #slide(setting: ..)[], see document.
  2. Known issue, this is the expected behavior. Touying can only duplicate your content multiple times without being able to determine how many pages Typst has displayed for these contents. You should manually divide long slide into multiple slides.
astrojhgu commented 4 months ago

Thanks. My problem is now solved according to your suggestion.

OrangeX4 commented 3 months ago

The first point was fixed in 0.3.3, you can use set-rule in slide directly now :-)