Is there a way of removing automatically the indent of a paragraph if it directly follows a figure? Other paragraphs should be normally indented.
Because it is a floating environment it would be desirable if you did not need to manually add \noindent or the like after looking at the output.
Example:
After image A and image C there should not be an indent.
Code:
\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\section{Paragraph}
\lipsum[2]
\begin{figure}[h]
\centering
\includegraphics[width=0.5\textwidth]{example-image-a}
\caption{image A}
\end{figure}
\lipsum[2]
\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{example-image-b}
\caption{image B}
\end{figure}
\lipsum[3]
\lipsum[2]
%abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
%abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst Uvwxyu.
Abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{example-image-c}
\caption{image C}
\end{figure}
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
abcdefghijklm nopqrstuvwxyz abcde fghijklmnopqr stuvwxyz abcdef ghijklmnopqrst uvwxyz
\end{document}
References:

LaTeX2e Proceedings Templates (zip)insamplepaperit sais: "The first paragraph that follows a table, figure, equation etc. does not need an indent, either." – dexteritas Apr 11 '18 at 19:13