[Tex/LaTex] \titlespacing + scrreprt not working

spacing

I am currently trying to change the titlespacing after a \subsection*{}.
Tried

\titleformat{\subsection}[hang]{\large\bfseries}{\thesubsection\quad}{0pt}{}
\titlespacing{\subsection}{0pt}{6pt}{2pt}

But changing the value to 2pt isn't working. Just has no effect at all.
Packages in use:

\usepackage{titlesec}
\usepackage{titletoc}

Would be glad for any hints to a solution. Not a latex pro here, but still trying to learn =)

Best Answer

Note, that the usage of titlesec together with a KOMA-Script class is not recommended. With an up to date KOMA-Script version (current version on CTAN is 3.17a) you can use instead

\RedeclareSectionCommand[beforeskip=6pt,afterskip=2pt]{subsection}
\renewcommand*\subsectionformat{\thesubsection\quad}
\setkomafont{subsection}{\normalfont\large\bfseries}

Example:

enter image description here

\documentclass{scrreprt}[2015/05/06]

\RedeclareSectionCommand[beforeskip=6pt,afterskip=2pt]{subsection}
\renewcommand*\subsectionformat{\thesubsection\autodot\quad}
\setkomafont{subsection}{\normalfont\large\bfseries}

\usepackage{blindtext}
\begin{document}
\chapter{Chapter One}
\KOMAScriptVersion{} is used.
\section{Section One}
\blindtext
\subsection{Subsection One}
\blindtext
\subsection*{Subsection with Star}
\blindtext
\end{document}

If you still use version 3.15 or 3.16 add the following lines before the redefinition of \subsectionformat:

\renewcommand*\othersectionlevelsformat[3]{#3\autodot%
  \ifstr{#1}{subsection}{\quad}{\enskip}% change the space only for subsection
}
\providecommand*\subsectionformat{}