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}
Best Answer
It's quite strange that the model requires both ABNT and no indentation after a section title.
setspace
andtitlesec
are not needed. Rather you have to revert the modification made byindentfirst
, which is loaded byabnt.cls
. The following document shows how: