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

Feature request - Nested subslides #134

Open
bram209 opened this issue Jan 15, 2024 · 6 comments
Open

Feature request - Nested subslides #134

bram209 opened this issue Jan 15, 2024 · 6 comments

Comments

@bram209
Copy link

bram209 commented Jan 15, 2024

Hey, creating my first presentation and loving polylux so far, great work!

I currently have a utility function like so:

#let effect(fn, start: 1, body) = [
  #only("0-" + str(start), body)
  #only(str(start + 1) + "-", fn(body))
]

Usage:

#slide(title: "Some slide")[
   - Option A
   - Option B
   - #effect(strike)[Option C]
]

I would love to be able to create nested subslides; a way to reset the subslide counter for a block of content:

#slide(title: "Some slide")[
   #subslide[
     First list:
     - #effect(strike, start: 1)[Option A]
     - Option B
     - #effect(strike, start: 2)[Option C]
   ]
   
   // should automatically pause between subslides

   #subslide[
     Second list:
     - Option A
     - Option B
     - #effect(highlight, start: 1)[Option C]
   ]
@bram209
Copy link
Author

bram209 commented Jan 15, 2024

thinking about it some more, I would love a utility that, similar to pause, does the following:

  • initial state: show content untouched
  • next step: apply the effect
  • consecutive steps: leave the effect applied (default) or restore the untouched content (setting)

@KronosTheLate
Copy link
Contributor

I am not sure, but would nested subslides solve the following use case?

I want to reveal a list line-by-line, and then cover the content (maintaining title and slide-counter) with an image. It would be great if I could give #alternatives two content blocks: #line-by-line and #image, to achieve this. However, that feels a lot like nesting subslides, and would likely require some rather advanced internals. I just wanted to throw it in here as a related usecase, that might also be solved by a flexible solution to the original problem.

@OrangeX4
Copy link

I am not sure, but would nested subslides solve the following use case?

I want to reveal a list line-by-line, and then cover the content (maintaining title and slide-counter) with an image. It would be great if I could give #alternatives two content blocks: #line-by-line and #image, to achieve this. However, that feels a lot like nesting subslides, and would likely require some rather advanced internals. I just wanted to throw it in here as a related usecase, that might also be solved by a flexible solution to the original problem.

For this case, how about trying pinit?

@KronosTheLate
Copy link
Contributor

For this case, how about trying pinit?

Wow, excatly what I was looking for. Thanks!

@bram209
Copy link
Author

bram209 commented Jan 24, 2024

Pinit looks like a lovely addition to polylux!

Maybe a good idea to reference it in the readme?

@andreasKroepelin
Copy link
Owner

Pinit looks like a lovely addition to polylux!

Maybe a good idea to reference it in the readme?

see #143

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