-
-
Notifications
You must be signed in to change notification settings - Fork 45
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] Make CetZ compatible with Polylux #251
Comments
That is possible. It would be easier if Polylux exposed some public functions that take the location from |
Thanks for considering this! Maybe I can open an issue in polylux about this. |
(Polylux author here) |
Yes, that is because cetz lines or paths are not Typst content but dictionaries. But Polylux' I mean you could hide paths in cetz by setting their stroke and fill to |
Well, you still can't hide them, regardless of how CeTZ represents them intermediately. But using And you're right, Polylux should export some more overlay functions. Currently I'm thinking about good ways to provide information about the current subslide via a function. You could then do something like #name-tba(args => {
cetz.canvas({
if "we're at the correct subslide" {
cetz.stroke(red)
} else {
cetz.stroke(none)
}
// ...
})
}) |
What would real hiding them look like? I mean, I could also suppress the draw call, without the stroke/fill none hack, but there is no such flag as of now. |
I was referring to the builtin #hide(line()) still shows a line, and this effect propagates to CetZ. |
That's pretty clearly a bug in Typst and not something polylux or cetz should have to work around. |
There's an existing issue, just under a somewhat specific name |
Sry for posting to a closed issue. But I want to share a workaround for polylux' #polylux-slide[
#for i in range(1,4) [
#only(i)[
#cetz.canvas({
// only(1) in CeTZ
cetz.draw.rect((0,0), (rel: (3,3)), stroke: if (i == 1) {5pt + red} else {none})
cetz.draw.rect((4,0), (rel: (3,3)), stroke: 5pt + green)
// uncover(3-) in CeTZ
if (i >= 3) {
cetz.draw.rect((8,0), (rel: (3,3)), stroke: 5pt + blue)
}
})
]
]
] |
Hi, thanks for staring this project and give Typst some nice graphic library!
I was thinking of using CetZ in a presentation with Polylux and in general it works very good. However, one feature that is not working is the use of the special functions of polylux to uncover elements (e.g.
only
,uncover
), equivalent to "overlays" in LaTex+Beamer. It would be nice if CetZ could understand/use those functions within a figure, in order to make nice animations. Certainly this has not a great urgency, but it would be a nice addition :) .The text was updated successfully, but these errors were encountered: