8

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?

EDIT:

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

\documentclass[11pt,article,oneside]{article}
\usepackage{amssymb,amsmath}

\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setromanfont{Palatino}
\setsansfont{Helvetica}
\setmonofont{Monaco}

\usepackage{fancyhdr}
\pagestyle{fancy}
    \fancyhf{} % Clear all header and footer fields
    \fancyhead[LO]{\slshape \rightmark}
    \fancyhead[RO]{$author$}
    \fancyfoot[CO]{\thepage}

% Format section titles
\usepackage[explicit]{titlesec}
\titleformat{\section} 
  {\normalfont}{\thesection}{1.2em}{\MakeUppercase{#1}}
\titlespacing{\section}
  {0pt}{*6}{*2}

% Add a space after the footnote mark
\makeatletter%
\long\def\@makefnmark{%
\hbox {\@textsuperscript {\normalfont \@thefnmark \ }}}%
\makeatother

\usepackage{biblatex}
$if(biblio-files)$
    \bibliography{$biblio-files$}
$endif$

\usepackage{enumerate}

$if(numbersections)$
$else$
    \setcounter{secnumdepth}{0}
$endif$

$for(header-includes)$
$header-includes$
$endfor$

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

\begin{document}

EDIT 2:

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

2 Answers2

13

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]:

\usepackage[explicit,noindentafter]{titlesec}

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

\titlespacing*{\section}
   {0pt}{*6}{*2}
Alan Munn
  • 218,180
9

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:

\documentclass{article}
\usepackage[french]{babel}
\StandardLayout
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}

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

\AtBeginDocument{%
  \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.

Schweinebacke
  • 26,336