Matrix tex output doesn't work for MimeTeX or MathTeX



On Wed, 6 Aug 2008, Nathaniel E. Powell wrote:
> tex(matrix([1,1,1],[1,1,1],[1,1,1]));
> outputs:
> $$\pmatrix{1&1&1\cr 1&1&1\cr 1&1&1\cr }$$
> Which does not render properly for MimeTex, which is the program we?re using to display
> the output of Maxima. However, this would work:
> $$\begin{pmatrix}1&1&1\\ 1&1&1\\ 1&1&1\end{pmatrix}$$
This is LaTeX, not plain TeX. maxima traditionally generated plain TeX. If 
we want LaTeX generation, this should be done separatately, not by 
replacing valid TeX generation.

> Would this be hard to fix in the source? Do you need me to send a patch so that it can
> be included in the next release?
Isn't it easier to define \pmatrix in some .sty file and just use it in 
your preamble?

Andrey