Hi,

The status of when warious LaTeX related markers are escaped or not has moved over time, but the situation reached is still not very clear. 

If I do the following test with yesterday's git org-mode :

#+LaTeX_CLASS: article
#+OPTIONS: H:2 <:nil toc:nil
* Test
[2013-10-11 ven. 10:45]
** Subsection
[2013-10-11 ven. 10:46]

 Let blah blah blah ...
  \[ \tilde{\delta}(q, w) = \left\{\begin{array}{ll}
      q & \text{ si }  w = \epsilon \\ \delta(\tilde{\delta}(q,w'),a) &
\text{ si } w = w'a \text{ et } a \in \Sigma
    \end{array}\right. \]
** Subsection
[2013-10-11 ven. 10:48]

 Let blah blah blah ...
\[\begin{array}{c}
  \begin{array}{|c|c|c|}
    \hline
    \delta_{1} & 0 &  1 \\
    \hline
    p & \{p, q\} & \{q\} \\
    \hline
    q & \{r\} & \{q, r\} \\
    \hline
    r & \{s\} & \{p\} \\
    \hline
    s & \{s\} & \{p\} \\
    \hline
  \end{array}
\]

The first \[ is left as-is but the second one is translated into $\backslash$[ which is obviously weird.

Moreover Mathjax being able to interpret this, it should be better if these equations where all left as-is in the text for both html and latex exporters. Unless there is something I can't see that prevents to do it?

I have two other examples of the same kind of problem:

1- Same thing with \( ... \) instead of \[ ...\] :

** Subsection
[2013-10-11 ven. 11:05]

- \(\min(x,y)\) , \(\max(x,y)\)
- \(\operatorname{Prime}(x) = \left\{ \begin{array}{cl} 1 & \text{ if }
  x \text{ is prime } \\ 0 & \text{ if } x \text{ is not prime }
\end{array} \right. \)

I ended up in surrounding the second item text into #+begin_latex ... #+end_latex.

2 - Quoting of {} may also happen in unwanted places. If I write a complex author line like :

#+AUTHOR: \IEEEauthorblockN{Foo, Bar} \IEEEauthorblockA{ Somewhere\\ Over the Rainbow \\ Email: \{foo,bar\}@baz.fr } \and \IEEEauthorblockN{foobar} \IEEEauthorblockA{somewhere else \\ Email: foobar@baz.fr}

I get with the latex export :

\author{\IEEEauthorblockN{Foo, Bar} \IEEEauthorblockA\{ Somewhere\\ Over the Rainbow \\ Email: \{foo,bar\}@baz.fr \} \and \IEEEauthorblockN{foobar} \IEEEauthorblockA{somewhere else \\ Email: foobar@baz.fr}}

It seems impossible to avoid that the curly braces of \IEEEauthorblockA be left as-is.

I guess all of this is about tweaking regular expressions, but I'm afraid I won't be aware of other side effects.
I would be glad to whoever can offer a better handling of these situations.

Another related question also : did anybody managed to hilghlight LaTeX equations inside org-mode ?
It could be very helpful to detect missing end markers.

Thanks for your work on Org mode and for you help :-)

--
Fabrice Popineau
-----------------------------
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
------------------------------