-
Notifications
You must be signed in to change notification settings - Fork 61
Rework of dynamic content API #16
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
Conversation
drupol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested it on my own slides ... I just love it.
Please merge it :)
|
It looks great, I'll test that soon! |
|
I think there is a bug with Also, if you add |
The issue here is the |
Argh that's so unfortunate :( |
The bug is actually with the |
I made some changes and I got it working ! |
How? 😮 |
|
Check the link: https://typst.app/project/r7yTm5eybG7JmVb4m1oU61 |
Okay so both of these issues are fixed now, however with some disadvantages to the API 😞 First, we can't have a simple For that reason, we have to fall back to the "do something with the rest of this scope"-mechanism that Typst provides: I think using Next, there is the issue with the cover mode. As explained in an earlier comment, this behaves somewhat inpredictably and makes the #uncover(2, mode: "transparent")[still visible]
#show: pause(3, mode: "transparent")
#one-by-one(mode: "transparent")[a][b][c]etc. now. This is also a bit inconvenient but at least this could be fixed in the future when Typst allows P.S.: states and counters can be really confusing and I get somewhat annoyed that it's so hard to predict how they behave... |
|
As @palainp has found out, it doesn't work to have To relieve the pain a tiny bit, you can at least write #let pc = 1
some text
#{ pc += 1 } #show: pause(pc)
more text
#{ pc += 1 } #show: pause(pc)
yet another textKinda frustrating that this seems to be the best option for now. |
This PR makes the API for dynamic content much more convenient and also closer to what LaTeX beamer offers.
In particular, we now have
a poor man's version of#pause(pretty much like in beamer)\pausein beamer using#show(you have to track the "progress" of it manually)#onlywithout reserving space#uncoverreserving space#alternatives,#one-by-one,#line-by-line)"-2, 5-7, 9, 11-"for#uncoverand#only"invisible"and"transparent"as in beamer and are not handled globally anymoreTo do:
If you want to review this, it is probably a good idea to go through
examples/demo.typand see if the API actually is pleasant to work with.Any opinions are welcome! Pinging @drupol @PgBiel @astrale-sharp @palainp