# Spacing before Chapter not removeable using titlesec

I am trying to remove the spacing before the chapter. I have found several solutions using titlesec. Whenever I use such solutions I get errors of missing numbers and illegal units of measures for \section.

Since I am just working myself into using LaTeX I don't have a good understanding about the packages and how they affect each other.

This is what I have tried

\documentclass[a4paper,12pt]{scrreprt}

\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{blindtext}

\usepackage{titlesec}

% this isn't working
\titlespacing*{\chapter}{0pt}{0pt}{40pt}

\begin{document}
\blinddocument
\end{document}

So what is a good way to reduce the spacing before the chapters?

• Off topic: Load hyperref after your other packages. \usepackage[utf8]{inputenc is not needed with an uptodate TeX distribution. Do not change \parskip and \parindent manually. You could use KOMA-Script option parskip=half or \parskip=half- or \parskip=full. – esdd Mar 8 at 10:57