[Tex/LaTex] How to suppress indentation of first paragraph after heading

elsarticleindentationparagraphssectioning

I am writing a document in a class (elsarticle) that indents the first lines of all paragraphs, including the ones following headings. However, I would like to revert back to the default Latex behavior indenting all but the first paragraphs.

Of course I can do this manually using \noindent, but isn't there a better way?

Best Answer

You can set the internally used condition \if@afterindent for this indentation permanently to "false".

\documentclass[11pt]{elsarticle}
\usepackage[T1]{fontenc}
\usepackage{blindtext}  % drop in actual document

\makeatletter
\let\@afterindenttrue\@afterindentfalse
\makeatother

\begin{document}
  \blinddocument  % drop in actual document
\end{document}

Note that the »blindtext« package is only used for creating the dummy document here, thus is not part of the solution.