Is there anyway to measure a cell in math.mat?


This is what I want. but I have tried a lot, still cannot find a proper way to get the size of the cell where U(N-1) is in, so that I can put it in a stroked block with specific size.

pavemat can not work properly as well, since it cannot handle nested matrix well, I have post a issue to it.

Unless I’m missing something, this is the solution:

#show square: set align(center + horizon)
$mat(#square($U(N - 1)$), 0; 0, e^(i alpha))$

So I can only assume you were using the math.rect and math.square symbols, not the rect and square functions.

The only difference I can see now is that the delimiters aren’t exactly aligned, but that’s probably not relevant for this post. I also recommend a different title now that the cause for this issue in question is known.