Malabarba / latex-extra

A series of usability improvements for Emacs latex-mode.
GNU General Public License v3.0
71 stars 14 forks source link

latex/clean-fill-indent-environment adds extra blank lines #15

Closed dinojr closed 8 years ago

dinojr commented 8 years ago

Consider the MWE

\documentclass{article}

\begin{document}
\begin{minipage}{0.5\linewidth}
[]
\end{minipage}
\begin{minipage}{0.5\linewidth}

\end{minipage}
\end{document}

With point at the [] position, C-q adds a blank line between \end{minipage} and the following \begin{minipage} and the two minipages end up on different lines.

According to the docstring, latex/clean-up-whitespace is supposed to remove some blank lines, not add some new ones.

dinojr commented 8 years ago

Artur Malabarba notifications@github.com writes:

Closed #15 via 72fc297ffda2041acb20db2d9daf12276789f3f3.

Thanks for this fix. I just noticed another problem, with commented lines this time (see https://github.com/Malabarba/latex-extra/issues/18).

Despite this, this filling command is very useful. I had given up on filling for some environments before I discovered your package.

Julien.