Documentation for datatypes?

Hello!
I’m trying to create a show rule that wraps in-line equations inside boxes to prevent them from being line-broken. Currently the best I can do is:

#show math.equation: (x) => box[#x]

However, I want to exclude block equations, since they already cannot be affected by unwanted line breaks. Currently, the documentation for equations Equation Function – Typst Documentation only covers parameters of the function math.equation. Where can I get documentation for the returning equation data type?

This exact problem was already solved in:

The issue was already solved by flokl, but I think this adds some context to the code that was posted.

It’s possible to filter show rules using the .where() method:

#show math.equation.where(block: false): (x) => box[#x]

This is mentioned here in the docs.

3 Likes

Thanks. That seems like an exotic feature to me, being able to call a member function of another function. I hope this feature is also mentioned in scripting.