i1 : R = ZZ[a..f];
i2 : tex matrix {{a^2+2,b,c},{d,e,f^3-a}} o2 = $\left(\begin{smallmatrix} a^{2}+2&b&c\\ d&e&f^{3}-a\\ \end{smallmatrix}\right)$
The object tex is a method function with a single argument.