LaTeX builder adds unnecessary split environment

Alex Reinhart avatarAlex 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{split}\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\end{split}\notag\\\begin{split}\end{split}\notag
Test paragraph.
\begin{split}\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\end{split}\notag
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.

Comments (2)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.