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

#pause is broken in 0.12 #188

Open
upsj opened this issue Oct 29, 2024 · 5 comments
Open

#pause is broken in 0.12 #188

upsj opened this issue Oct 29, 2024 · 5 comments

Comments

@upsj
Copy link

upsj commented Oct 29, 2024

I tried compiling the examples/demo.typ file with typst 0.12, but it fails due to reasons I can't understand, related to #pause:

error: can only be used when context is known
    ┌─ logic.typ:256:44
    │
256 │     repetitions.update(rep => calc.max(rep, pause-counter.get().first() + 1))
    │                                             ^^^^^^^^^^^^^^^^^^^
    │
    = hint: try wrapping this in a `context` expression
    = hint: the `context` expression should wrap everything that depends on this function

help: error occurred in this call of function `get`
    ┌─ logic.typ:299:15
    │
299 │     let reps = repetitions.get().first()
    │                ^^^^^^^^^^^^^^^^^

Both of those locations are wrapped in context expressions, so something else must be going wrong outside.

@andreasKroepelin
Copy link
Owner

Hmm interesting. I will have a look.

@sebaseb98
Copy link

I also encountered this problem, but I didn't get an error.

In my case there just were no pauses in the most cases on slides between bullet points, but when I called functions as e.g. #v or used math blocks, the pauses worked.

@rmburg
Copy link

rmburg commented Nov 12, 2024

See #185 (comment)

@rmburg
Copy link

rmburg commented Nov 12, 2024

Even with this fix, pause does still not work.
On the current main branch, pause does not hide anything.
I did a bit of bisecting, and found that these two commits broke it:

  • 2c673e4 broke pauses within a paragraph, like the following:
    foo
    #pause
    bar
    This example produces "foo bar" on both subslides.
  • 4b374be also broke pauses between paragraphs.

I'm assuming these show rules were removed for a good reason, but I currently don't understand them.
Maybe we can find a better solution? I'm keen to open a PR on this, let's discuss.

@andreasKroepelin
Copy link
Owner

The show rules were removed because they made Polylux very slow for longer presentations. I'm currently in the process of rewriting the pause implementation. So yeah on current main, pause does nothing.

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

4 participants