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

Overflowing content + one-by-one is not handled #129

Open
trustedtomato opened this issue Jan 5, 2024 · 2 comments
Open

Overflowing content + one-by-one is not handled #129

trustedtomato opened this issue Jan 5, 2024 · 2 comments

Comments

@trustedtomato
Copy link

Overflowing content results in empty slides and unnecessarily repeated content.
In the following example, the expected result would be to have page 1, 2, 3, 9, 10, 11, 12. (Meaning 4 to 8 are redundant.)

Code to reproduce:

#import "@preview/polylux:0.3.1": *

#set page(paper: "presentation-16-9", footer: counter(page).display())
#set text(size: 25pt)

#polylux-slide[
  #one-by-one[
    THE FIRST ONE STARTS HERE.
    #lorem(300)
  ][
    THE SECOND ONE STARTS HERE.
    #lorem(300)
  ] 
]

Demo: https://typst.app/project/roiL5M6_QK1nrbEezOk1q3

The issue is also there with #pause, I haven't tried the other constructs, but I'm assuming they use the same base.

@andreasKroepelin
Copy link
Owner

This is the expected behaviour at the moment. Fixing this would require to know how many pages each bit of content spans. I am currently unaware of a solution but I agree that this is not desirable.

@trustedtomato
Copy link
Author

Hmm... I'm not aware of the capabilities of Typst, and I find it amazing what you did so far, but if it's just about calculating how many pages a content spans, maybe the page counter could be used for this purpose? Something like, get the location, lay out the first chunk of content, then get the location again, get the current page at both locations, get their difference, and add one. If that doesn't work, then just ignore my comment, and I'll hope that a new Typst patch will come out which can resolve this 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants