TeXForm¶
Convert expressions to LaTeX notation.
A matrix becomes a parenthesized LaTeX array:
$ wo 'ToString[TeXForm[{{1, 2}, {3, 4}}]]'
\left(
\begin{array}{cc}
1 & 2 \\
3 & 4 \\
\end{array}
\right)
TableForm pads short rows out to the widest one instead:
$ wo 'ToString[TeXForm[TableForm[{{1}, {2, 3}}]]]'
\begin{array}{cc}
1 & \text{} \\
2 & 3 \\
\end{array}
Greek letters carry their macro, and a rule its arrow:
A complex number prints as one atom, real part first:
A machine real is typeset in its display form: