I've searched many sites but I couldn't get any answer. Here is this mystical question:

How can i reduce the spacing after headings?

Here is my code.

\usepackage[left=3.50cm, right=2.50cm, top=3.00cm, bottom=3.00cm,nohead,nofoot]{geometry}


\addto\extrasturkish{\uccode`i=\string"9D \lccode`I=\string"19 }
\addto\noextrasturkish{\uccode`i=`I \lccode`I=`i }



My actual purpose is to set line spacing 1.5 lines. This is a MS Word template that I must use for my project report. When I use \setlength{\parskip}{\baselineskip} with \linespread{1.5} the gap between section headings and paragraphs are huge, so huge it is funny. If I don't use \linespread{1.5} the lines are not spreading as expected. If I don't use \setlength{\parskip}{\baselineskip} this time there is no spacing between paragraphs.

| improve this question | | | | |

You've loaded the titlesec package- it provides the command \titlespacing which has the format

\titlespacing{command}{left spacing}{before spacing}{after spacing}[right]

From the titlesec package

% spacing: how to read {12pt plus 4pt minus 2pt}
%           12pt is what we would like the spacing to be
%           plus 4pt means that TeX can stretch it by at most 4pt
%           minus 2pt means that TeX can shrink it by at most 2pt
%       This is one example of the concept of, 'glue', in TeX

A complete MWE follows


\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}


| improve this answer | | | | |
  • Thank you. Good explanation and good answer. I've changed 0pt to -5 pt and this really looks good. – interlude Apr 25 '12 at 20:22
  • Do you know how the gap between "1" and "Section" is set? The \titlespacing parameters don't seem to adjust that. – Steven B. Segletes Jan 13 '15 at 15:56
  • @steven: I believe that titlespacing is vertical space only; not sure of the official way to tweak the gap you describe, but I usually use an ugly hack involving titleformat and hspace – cmhughes Jan 13 '15 at 16:39
  • Found it. In the definition of \@sect, one will find \begingroup #6{\@hangfrom {\hskip #3\relax\@svsec}\interlinepenalty\@M #8\@@par}\endgroup. A kern can be added after \@svsec... Actually, that's close, but it's more complicated than that, to account for * sections. But I'll get there. – Steven B. Segletes Jan 13 '15 at 17:59
  • But even better, \@seccntformat is defined as {\csname the#1\endcsname\quad} The \quad represents the gap of interest and can be changed. – Steven B. Segletes Jan 13 '15 at 18:27

You can use the \titlespacing command from the titlesec package. For example:


See titlesec.pdf for more options.

| improve this answer | | | | |
  • I found this suggestion work the best for markdown with YMAL header rendered by pandoc – Yu Shen Mar 21 '17 at 0:20
  • Does \parskip include the "glue" that the author of titlesec describes? There's no mention of ± anything in the documentation. Why would you use \parskip instead of the more specific lengths that @cmhughes advocates? – Merchako Apr 27 at 23:46

If you are using setspace, then mixing it with your own \linespread{1.5} is probably not a good idea.

Try to delete the line about \linespread and use instead


The package documentation says that it does more than just change line spread: it also take care of skips before and after headings, displays, etc. - the things you say you need.

| improve this answer | | | | |

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.