# Org-mode to Latex matrix automatically escapes ampersand

I am trying to write LaTex matrizes in org-mode. It works fine with exporting tables via #+attr_latex :mode math :environment matrix.

However, when I try

\begin{pmatrix}
1 & 2\\
3 & 4\\
\end{pmatrix}


this exports to

\begin{pmatrix}
1 \& 2\\
3 \& 4
\end{pmatrix}


in the latex document. And that gives me a literal & in the final latex document.

Is this default behaviour? How can I fix this?

• The strange thing is that it exports just fine for me to both latex and HTML without any ampersand escaping. I tried with emacs -Q and it exports just fine as well. It might be due to something in your configuration. Try exporting with emacs started with the -Q option. – darcamo Nov 10 '20 at 18:47