tex x -- convert x to TeX format.
i1 : R = ZZ[a..f] o1 = R o1 : PolynomialRing
i2 : tex matrix {{a^2+2,b,c},{d,e,f^3-a}} o2 = $\begin{pmatrix}a^{2}+{2}& {b}& {c}\\ {d}& {e}& f^{3}-a\\ \end{pmatrix}$
See also:
Class of returned value: String -- the class of all stringsWays to use tex :