Another probably very simple formatting question!

Is it possible to define a rule that maintains first-line indents in general, but flushes left the first paragraph following a section heading? Including the first paragraph of the whole paper, immediately following title and author declarations?


Ok, here's my current header. I'm not sure what would be throwing this off.



    \fancyhf{} % Clear all header and footer fields
    \fancyhead[LO]{\slshape \rightmark}

% Format section titles

% Add a space after the footnote mark
\hbox {\@textsuperscript {\normalfont \@thefnmark \ }}}%





$if(title)$     \title{$title$}     $endif$
$if(author)$    \author{$for(author)$$author$$sep$\\$endfor$} $endif$
$if(date)$      \date{$date$}       $endif$



Ok, I've isolated the culprit: the \titlespacing declaration. When I cut those two lines, the problem is fixed. Any ideas as to why?

  • Error : Not enough memory! – percusse Nov 30 '11 at 4:31
  • 5
    The is the default behaviour of all standard LaTeX document classes. You must be doing something different (loading a package or using a different document class) to have to require this. Please elaborate. – Werner Nov 30 '11 at 4:33
  • @werner: surely we need an mwe from the op? – wasteofspace Nov 30 '11 at 7:49
  • Ok, I've added my current header. Do you see anything that would be overriding the default format? – Brian Hamilton Nov 30 '11 at 15:08
  • (The if-then statements are there because this is actually a template I use in conjunction with pandoc.) – Brian Hamilton Nov 30 '11 at 15:09

Since you are using the titlesec package with the explicit option, it seems that you need to specify explicitly whether there is no indent after headings. You can do this with the package option [noindentafter]:


Alternatively, as @egreg notes, you can use the starred version of the \titlespacing command:

  • 5
    Or with \titlespacing* instead of \titlespacing. – egreg Nov 30 '11 at 20:54

If you are using package indentfirst just don't use it. If you are using package babel with option french add \StandardLayout to you preamble:


and have a look at the package's manual to learn more about special features of French language definition.

If nothing of this helps, add

  \expandafter\def\csname @afterindentfalse\endcsname{%
    \expandafter\let\csname if@afterindent\endcsname\iffalse

to your document preamble and hope, that this would help. If it doesn't, try to move those lines just before \begin{document}. If this doesn't help, maybe you are using a class with hard coded indent after headings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.