I'm trying to create a function which would render the Heisenberg matrix. This is the code
#let heis(a, b, c) = $mat(1, a, c; 0, 1, b; 0, 0, 1)$
The problem is that calling #heis(1,2,3) renders a matrix [1, a, c; 0, 1, b; 0, 0, 1] without replacing the variables. What am I doing wrong?
I have also tried #let heis(a, b, c) = $mat(1, #a, #c; 0, 1, #b; 0, 0, 1)$ but that seems broken.
This one kinda works but the single numbers are wrapped in parentheses.
#let heis(a, b, c) = $mat(1, (#a), (#c); 0, 1, (#b); 0, 0, 1)$