#show math.equation.where(block: false): it => {
return it.body.func() == math.display
}
$0$, $display(a / b)$.
1 Like
Since math.display
is not an element, you can’t make a transparent wrapper or search for it.
I don’t know why you need this, but here it is:
#let display(..args) = metadata("is-display") + math.display(..args)
#show math.equation.where(block: false): it => {
if (
it.body.func() != [].func()
or it.body.children.first().func() != metadata
or it.body.children.first().value != "is-display"
) { return false }
true
}
$0$, $display(a / b)$.
#let is-display = state("is-display", false)
#let display(..args) = {
is-display.update(true)
math.display(..args)
is-display.update(false)
}
#show math.frac: it => context is-display.get()
$0$, $a / b$, $display(a / b)$.