Hi all,

I encounter a BUG with org-toggle-latex-fragment on an equation that
uses amsmath's split environment.

(Exporting of the document works fine.)


The problem is that the \begin{equation},\end{equation} get stripped of
the temporary tex file.


Here is some test doc

--8<---------------cut here---------------start------------->8---
#+TITLE: Test amsmath's split

* Some equation
with some split expression, e.g.
\begin{equation}
  \begin{split}
    w \cdot x + b &= 1, \text{ and}\\
    w \cdot x + b &= -1
  \end{split}
\end{equation}

To reproduce try to org-toggle-latex-fragment (C-c C-x C-l) on that
latex expression.

Export of this works fine.
--8<---------------cut here---------------end--------------->8---

which results in this /tmp/foobar.tex document (relevant parts shown):

--8<---------------cut here---------------start------------->8---
\begin{document}
\definecolor{fg}{rgb}{0.996109,0.996109,0.996109}
\definecolor{bg}{rgb}{0.197269,0.197269,0.197269}

\pagecolor{bg}

{\color{fg}
\begin{split}
    w \cdot x + b &= 1, \text{ and}\\
    w \cdot x + b &= -1
  \end{split}
}

\end{document}
--8<---------------cut here---------------end--------------->8---

The compilation of that results in
,----
| ERROR: Package amsmath Error: \begin{split} won't work here.
| ...
| \Did you forget a preceding \begin{equation}?
`----

Regards,
Andreas


Reply via email to