# Export org-mode tables to LaTeX mathematics matrices?

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

I found this thread but it doesn't seem to have a ready-made solution.

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

## 1 Answer

Take a look at (info "(org) LaTeX specific attributes"). The following table attributes

#+attr_latex: :mode math :environment matrix
| a | b |
| c | d |


will export a LaTeX matrix in math mode:

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