# typesetting matrix output from maxima using org-mode

How can I make org-mode typeset matrices output from maxima?

For example, the following code produces tex output that display

#+BEGIN_SRC maxima :results raw
m: matrix([1, 2], [3, 4]);
tex(m);
#+END_SRC

It produces the result:

#+RESULTS:
$$\pmatrix{1&2\cr 3&4\cr }$$

This does not display anything. Is there an easy way to make this code valid so that it will display?

Apparently I had mostly the same question 2 years ago (but with a more complicated example). Unfortunately, I didn't get a reproducible answer at the time:

Getting maxima source block to return and display latex equations

Post by Paul RIVIER

I take this opportunity to ask you if there is a work in progress to include a latex export as well. I don't know of anybody that is working on this. To generate LaTeX output for fractions and matrices, load 'mactex-utilities':

$$\frac{a}{b}$$
$$\begin{pmatrix}1 & 2 \\ 3 & 4 \\ \end{pmatrix}$$