I am currently trying to fulfill the layout requirements of my university, which request vertical spacing of 24pt before and 12pt after section titles. I am using the titlesec
package, but every time I try to set the document, I only get problems. In my document, I am using \section, \subsection, \section* and \subsection*
, yet it doesn't work. My preamble`s code looks like this:
\documentclass[a4paper,12pt,draft]{article}
\usepackage{ucs}
\usepackage[utf8x]{inputenc} % Eingabekodierung: UTF-8
\usepackage{fixltx2e} % Schickere Ausgabe
\usepackage[T1]{fontenc} % ordentliche Trennung
\usepackage[french,USenglish,UKenglish,ngerman]{babel}
\usepackage{lmodern} % ordentliche Schriften
\usepackage[babel,style=swiss]{csquotes}
\usepackage{extsizes}
\usepackage{graphicx}
\usepackage[top=2.5cm,bottom=3.5cm,left=2.5cm,right=4cm]{geometry}
\usepackage{fancyhdr}
\usepackage{lettrine}
\usepackage{titlesec}
\titlespacing*{\section}{}{24pt}{12pt}
\titlespacing{\section*}{}{24pt}{12pt}
\titlespacing*{\subsection}{}{24pt}{12pt}
\titlespacing*{\subsection*}{}{24pt}{12pt}
\usepackage[]{acronym}
\usepackage{hyperref}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\fancyhf{}
\rhead{\rightmark}
\lhead{}
\rfoot{\thepage}
% \pagenumbering{arabic}
titlesec
provides thenumberless
key. Also, beware the*
after\titlespacing
is there to kill indentation of the first section paragraph.fixltx2e
unless you have an old distribution.fixltx2e
. Do you have any idea, how to stop that?