#How to undo show rule for text replacement
11 messages · Page 1 of 1 (latest)
It's currently just planned, but you could work around by limiting the scope, so that everything but the that table is included.
You could also contextualize that replacing show rule.
one way to achieve the same result is to use a single show rule that checks which part of the document you're in, e.g.
?r
#show "blob": it => context {
if query(selector(<mylabel>).before(here())).len() == 0 {
// Before first <mylabel> => apply rule
text(red, it)
} else {
// After <mylabel> => leave element as is
it
}
}
1 blob
#metadata("x")<mylabel>
2 blob
#metadata("y")<mylabel>
3 blob
in your case it might be better to do the same with a state you can toggle, instead of labels:
?r
#let s = state("showred", true)
#show "blob": it => context if s.get() { text(red, it) } else { it }
1 blob
#s.update(false)
2 blob
#s.update(true)
3 blob
That is a great solution thank you very much