# Automatically add \noindent for short paragraphs

Is there a way to activate \noindent to each line which is so small that there is no line break in the paragraph?

An example: The code

This is a long paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud             exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

\begin{align*}
a=b
\end{align*}

a short line without \textbackslash noindent

\begin{align*}
a=b
\end{align*}


It shall become:

not like this:

Thereby I do not want to write \noindent in front of a short line....

• You should not have blank lines around the "short paragraph" – egreg Oct 24 '15 at 16:39

First, you shouldn't leave blank lines. You should leave blank lines when a paragraph ends; in that case it's just a sentence divided over several lines, you don't leave blank lines. Second, you can use \intertext (or \shortintertext from mathtools).

If you want the “whitespace structure” in your code to see things clearly, add %.

\usepackage{mathtools}
...
\begin{align*}
a &= b \\
%
\shortintertext{a short line without \texttt{\string\textbackslash} noindent}
%
a &= b
\end{align*}