# Automatically adding \noindent after \section{*}

I'm using titlesec package and a document class ABNT Class which follows a Brazilian standard for document development. So far I've managed to follow the Brazilian Computer Association guidelines for making a scientific article (which is my real objective, for further reuse), however using both the abnt class and the titlesec package breaks document indentation, as each paragraph had a fixed indentation which titlesec could not manage, adding [noindentafter]{titlesec} produces no results, so I've decided to force document's whole indentation by using setspace and using the following code

\setlength{\parindent}{1.25cm}

To prevent first paragraph's indentation (which is required by this scientific article model), I've to use \noindent after \section{}, \subsection{} and \subsubsection which is really annoying, is there any way to automatically embed \noindent to the end of the section function call? this would be as simple as \section{*}\noindent

\edit I'm providing a MWS for further checking

\documentclass[12pt,a4paper]{abnt}

\usepackage{setspace,titlesec,setspace}
\usepackage[utf8]{inputenc}
\titleformat{\section}{\fontsize{13.5pt}{12pt}\selectfont\bfseries}{\thesection}{0.75cm}{}[]
\renewcommand{\thesection}{\arabic{section}.}
\setlength{\parindent}{1.25cm}
\titlespacing*{\section} {0pt}{0pt}{0pt}

\begin{document}
\section{Lorem Ipsum}
This first paragraph is indented, consectetuer adipiscing elit. Etiam lobortis facilisis sem.
Nullam nec mi et neque pharetra sollicitudin.

This paragraph is also indented, ultricies vel, semper in, velit. Ut porttitor. Praesent in
sapien.

\section{Pellentesque Placerat}\noindent
This first paragraph is using noindented, praesent in
sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

This paragraph is indented, ultricies vel, semper in, velit. Ut porttitor. Praesent in
sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis fringilla tristique neque.
Sed interdum libero ut metus.
\end{document}
-
Have you tried \titlespacing*{\section}{left margin space}{vertical space before}{vertical space after}? According to the manual this kills the indentation after the sectioning unit. –  guillem Jun 29 '12 at 5:55
I'm currently using \titlespacing*{\section} {0pt}{0pt}{0pt} but like I said before, the whole document indentation was broken, and using this has no result as well (the expected result), if there is any way to embed \noindent this serves me well. I think that \titlespacing works on title and not exactly after it, I need a text which is non indented in the first paragraph, moreover the subsequent paragraphs doesn't follow this rule at first glance I thought of \titleformat{\section}{}{}{}{}[insertingindentationhere] however it does not produce the result I need –  richard_ba Jun 29 '12 at 6:11
Welcome to TeX.sx! The standard LaTeX approach automatically adds \noindent after sections. Please add a minimal working example (MWE) that illustrates your problem. –  Joseph Wright Jun 29 '12 at 6:17
Perhaps the abnt package requires the babel package with brazilian/portuguese option?. I recall having similar indentation problems using the babel package with the spanish option. –  guillem Jun 29 '12 at 6:46
Take a look here, it may help. –  Jellby Jun 29 '12 at 7:25

It's quite strange that the model requires both ABNT and no indentation after a section title.

setspace and titlesec are not needed. Rather you have to revert the modification made by indentfirst, which is loaded by abnt.cls. The following document shows how:

\documentclass[12pt,a4paper]{abnt}

\makeatletter
% package indentfirst says \let\@afterindentfalse\@afterindenttrue
% and we revert this modification, reinstating the original definitio
% of \@afterindentfalse
\def\@afterindentfalse{\let\if@afterindent\iffalse}
\makeatother

\begin{document}
\section{Lorem Ipsum}
This first paragraph is \emph{NOT} indented, consectetuer adipiscing elit.
Etiam lobortis facilisis sem. Nullam nec mi et neque pharetra sollicitudin.

This paragraph is indented, ultricies vel, semper in, velit. Ut porttitor.
Praesent in sapien.

\section*{Pellentesque Placerat}
This first paragraph is \emph{NOT} indented, praesent in
sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

This paragraph is indented, ultricies vel, semper in, velit. Ut porttitor.
Praesent in sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Duis fringilla tristique neque. Sed interdum libero ut metus.

\end{document}
-
It works perfectly, thanks! –  richard_ba Jun 30 '12 at 4:36