\triangle in LaTeX vs. $triangle.t$ in Typst

I’m trying to get this:

image

But in Typst I get:

image

I’m using:

#set text(font: "New Computer Modern")
#show math.equation: set text(font: "New Computer Modern Math")

Let $A triangle B$.

What exactly causes this difference (spaces between the letters and the triangle)? Is there a way to get the LaTeX look?

I believe Typst decides math.class for every operator, and triangle.stroked.t appears to be "binary" by default.

Follow this other solution to alter math.class of a symbol:

So, for example:

#set text(font: "New Computer Modern")
#show math.equation: set text(font: "New Computer Modern Math")

#show sym.triangle: math.class.with("unary")

Let $A triangle B$.

2 Likes

Thank you so much for your quick reply. I really appreciate it. I learned something new.

1 Like