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]);

It produces the result:

$$\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

1 Answer 1


I found the following comment about loading the maxima package mactex-utilities on http://maxima-discuss.narkive.com/fenby68e/export-tex-format

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':

(%i1) load("mactex-utilities")$
(%i2) tex(a/b);
(%o2) false

(%i3) tex(matrix([1,2],[3,4]));
$$\begin{pmatrix}1 & 2 \\ 3 & 4 \\ \end{pmatrix}$$
(%o3) false


Therewith it should be no problem to render the equations with cdlatex from orgmode.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.