# LaTeX builder adds unnecessary split environment

Alex Reinhart created an issue

I have the following ReST code:

.. math:: \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Test paragraph.

.. math::

\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Test paragraph.


This generates the following LaTeX source when I use make latex:

\begin{gather}
\begin{split}\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\end{split}\notag\\\begin{split}\end{split}\notag
\end{gather}
Test paragraph.
\begin{gather}
\begin{split}\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\end{split}\notag
\end{gather}
Test paragraph.


Notice the empty \begin{split}\end{split} pair in the first equation block. This adds an extra blank space after the equation in the PDF, which looks rather ugly in some circumstances. I'd expect both equation blocks to produce identical results, without the empty split environment. If this is intended behavior, it's not documented.

Tested in 1.2b3 and also present in 1.1.3.

Thanks for the otherwise excellent project. I'm using Sphinx to produce a non-fiction book and finding it very useful.

1. Closes #1299: Make behavior of the :rst:dir:math directive more consistent and avoid producing empty environments in LaTeX output.