# Export org-mode tables to LaTeX mathematics matrices?

Does anyone have a good way to produce LaTeX mathematics matrices from org-mode tables?

This gets me close.

#+LATEX: $$#+LATEX: \begin{matrix} | a | b | | c | d | #+LATEX: \end{matrix} #+LATEX:$$


which exports to:

$$\begin{matrix} \begin{center} \begin{tabular}{ll} a & b\\ c & d\\ \end{tabular} \end{center} \end{matrix}$$
\end{document}


And I only have to take out the tabular and center directives.

• Could you be more precise as to what you want? If you write a table in an org file and use the export to latex feature, you obtain a latex table. If you are looking for something integrated in latex documents, radio tables might be what you're looking for. orgmode.org/manual/… – T. Verron Jun 19 '16 at 14:34
• Take a look at (info "(org) LaTeX specific attributes"). The following will change your environment: #+attr_latex: :mode math :environment matrix. – mutbuerger Jun 20 '16 at 14:46

Take a look at (info "(org) LaTeX specific attributes"). The following table attributes
#+attr_latex: :mode math :environment matrix

$\begin{matrix} a & b \\ c & d \\ \end{matrix}$

• For the sake of completeness: If you wish to give your matrix a name, the way to go is inserting the corresponding string (e.g. "M =") as an argument to :math-prefix in the option list of the table. Figuring this out took me a while, so I hope this saves everyone else some time. – Aaron Meinel Nov 6 '19 at 13:45