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 breaks easily #142

Open
KronosTheLate opened this issue Jan 23, 2024 · 10 comments
Open

#pause breaks easily #142

KronosTheLate opened this issue Jan 23, 2024 · 10 comments

Comments

@KronosTheLate
Copy link
Contributor

KronosTheLate commented Jan 23, 2024

Example 1

#polylux-slide[
first #pause

second #pause

- third #pause

- fourth #pause

- fifth #pause
- sixth
]

Below I made a table of what appears on what subslide:

subslide new content
1 "first"
2 "second" through "fifth"
3 "sixth"
4 nothing
5 nothing
6 nothing

The troublesome part is that any pair of lines (1 and 2, or 3 and 4, or 5 and 6) produce the expected output.

Example 2

#polylux-slide[
  first #pause
  second
]
subslide new content
1 "first second"
2 nothing

This is warned about in the documentation. But the problem is that the only pause in the code is between the content, but happens in the end. I believe this is the effect that goes wrong many times in example one, where any "untrigger" #pause is just collected until the end, and used then.

Desired/Target behaviour

Below I collected a couple of "rules" that I would like the #pause command to follow:

  • New subslides without new content can not be produced by #pause commands with content between
  • If there is a #pause between any two pieces of content, both pieces can not appear on the same subslide

If we agree that this would be ideal and technically possible, I think that these rules could serve as a good reference of what the behaviour should be.

@KronosTheLate
Copy link
Contributor Author

KronosTheLate commented Jan 23, 2024

This one is fixed

Example 3

#polylux-slide[
  #set text(15pt)
  - 1 #pause
  - 2 #pause
  - 3 #pause
  - 4 #pause
  - 5 #pause
  - 6 #pause
  - 7 #pause
  - 8 #pause
  - 9 #pause
  - 10 #pause
  - 11 #pause
  - 12 #pause
  - 13 #pause
  - 14 #pause
  - 15 #pause
  - 16 #pause
  - 17 #pause
]

Stops producing sub-slides after 10. After that, the rest of the content is simply ignored.

@andreasKroepelin
Copy link
Owner

Example 3

#polylux-slide[
  #set text(15pt)
  - 1 #pause
  - 2 #pause
  - 3 #pause
  - 4 #pause
  - 5 #pause
  - 6 #pause
  - 7 #pause
  - 8 #pause
  - 9 #pause
  - 10 #pause
  - 11 #pause
  - 12 #pause
  - 13 #pause
  - 14 #pause
  - 15 #pause
  - 16 #pause
  - 17 #pause
]

Stops producing sub-slides after 10. After that, the rest of the content is simply ignored.

This is due to an old limitation of Polylux that is fixed on main.

@KronosTheLate
Copy link
Contributor Author

This is due to an old limitation of Polylux that is fixed on main.

Awesome! That is great to hear. i only came here to say that I see that this aspect is documented under "internals", but having it be a non-issue is even better than having it documented. Thanks!

@KronosTheLate
Copy link
Contributor Author

KronosTheLate commented Jan 26, 2024

Example 3

Code:

#polylux-slide[
  *Manual heading* #pause

  - New line #pause

  - Second line
]
subslide new content
1 "Manual heading"
2 "New line" and "Second line"
3 nothing
4 nothing

So not only are both bullets revealed on the same subslide, despite a #pause between, but there are 4 subslides as a result of 2 pauses.

The results are the same if I remove the blank line between each line, and if I remove blank lines and add \ after the manual heading line.

@KronosTheLate
Copy link
Contributor Author

This is due to an old limitation of Polylux that is fixed on main.

I am unable to set max-repetitions for #slide (as is explicitly recommended here. I just wanted to mention is, as there is no workaround until a new version is tagged (other than using the main branch).

@andreasKroepelin
Copy link
Owner

It's an argument to #polylux-slide. On main, this is gone anyways.

@KronosTheLate
Copy link
Contributor Author

Example 4

This issue is related to using pause both inside and outside #side-by-side at the same time.

If I only use #pause inside, it works as expected:
image

But when I add a pause after the first line, I get no transitions:
image

@andreasKroepelin
Copy link
Owner

Yeah i think nesting overlay functions should not be done 🤔

@KronosTheLate
Copy link
Contributor Author

I was thinking that because #side-by-side only changes layout, it changes to subslides should be orthogonal. But perhaps not...

Sorry for giving you a headache, and thanks for putting up with me. If this turns out to be fruitful, Polylux will certainly be more battle-tested xD

@KronosTheLate
Copy link
Contributor Author

The first 3 examples just work as expected using Touying, with the following code:

#import "@preview/touying:0.2.0": *
#import "@preview/pinit:0.1.3": *

#let s = (s.methods.enable-transparent-cover)(self: s)
#let (init, slide, slides, uncover, only, alternatives) = utils.methods(s)
#show: init

//#show: slides

#slide[
first #pause

second #pause

- third #pause

- fourth #pause

- fifth #pause
- sixth
]

#slide[
  first #pause
  second
]

#slide[
  *Manual heading* #pause

  - New line #pause

  - Second line
]

The last example can not be reproduced because there is no #side-by-side function in touying. Would it be possible to take inspiration from how toying implement #pause? I am not at all sure about the implications for internal structure, but it seems to "just work", which is fantastic.

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