Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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

2 Answers 2

up vote 8 down vote accepted

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}
share|improve this answer
4  
Or with \titlespacing* instead of \titlespacing. –  egreg Nov 30 '11 at 20:54
    
Thank you! That fixed it. –  Brian Hamilton Dec 1 '11 at 0:55

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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