[Tex/LaTex] Avoid indentation of new paragraph with sloppypar

formattingindentationinline()

I would normally write an equation followed by some text like this:

  \begin{equation}
     2+1
  \end{equation}
  where...

In which case the where clause is NOT indented.

Now, I need to use sloppypar in the paragraph with the where clause because the inline math formulas will run into the margin otherwise, like this:

  \begin{equation}
    2+1
  \end{equation}
  \begin{sloppypar}
    where...
    \end{sloppypar}

The problem is that when I do it, the paragraph gets indented, like a new paragraph. How to avoid it?

Best Answer

The environment sloppypar is basically defined as

\newenvironment{sloppypar}{\par\sloppy}{\par}

Just define a new environment that omits the initial \par to be used in this and similar cases (that is, after math displays).

\documentclass[draft]{article}

\newenvironment{sloppypar*}
 {\sloppy\ignorespaces}
 {\par}

\begin{document}

Some normal paragraph, with text running smooth for justification.
Some normal paragraph, with text running smooth for justification.
Some normal paragraph, with text running smooth for justification.
Some normal paragraph, with text running smooth for justification.
\begin{equation}
    2+1
\end{equation}
\begin{sloppypar*}
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$
\end{sloppypar*}

Some normal paragraph, with text running smooth for justification.
Some normal paragraph, with text running smooth for justification.
Some normal paragraph, with text running smooth for justification.
Some normal paragraph, with text running smooth for justification.
\begin{equation}
    2+1
\end{equation}
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$
here many long formulas $aaaaaaaa$ $bbbbbbbb$ $ccccccccccccc$ $dddddddddddddd$

\end{document}

enter image description here

Related Question