I’m trying to add a show rule for headings with level >= 5, but I don’t know if there’s a way to do it. I can’t seem to find it in the documentation nor in any other forum post. I’d like to know if I could do something like show heading.where(level: some-predicate): ....
Until Ability to pass any value type to type-limited field in where clause · Issue #6991 · typst/typst · GitHub is opened, you can use sela – Typst Universe for that. Though it also shows the native approach in examples.
1 Like
Seems reasonable. Is the plan to eventually add support for this level of flexibility or will we always have to manually list every level with the .or() method? The way that the issue #6991 is presented gives me hope that we could pass a closure instead.