2

I would like to have the following spacing:

\titlespacing*{\chapter}{0pt}{50pt}{30pt}
\titlespacing*{\section}{0pt}{13.2pt}{*0}
\titlespacing*{\subsection}{0pt}{13.2pt}{*0}
\titlespacing*{\subsubsection}{0pt}{13.2pt}{*0}

When I'm using titelspacing I'm getting an error due to KOMA-script. I think I have to do it with the following command:

\RedeclareSectionCommand[
  beforeskip=50sp,
  afterskip=30\baselineskip]{chapter}

\RedeclareSectionCommands[
  beforeskip=0\baselineskip,
  afterskip=13.2\baselineskip
]{section,subsection,subsubsection}

But what values do I have to insert and how can they be calculated? When I use it, there is no change in the spacing.

Moreover, I have recognized that the following part of my code template somehow changes the space before the chapter. Which part of it should I keep or should I throw away everything?

\renewcommand*{\chapterheadstartvskip}{\vspace*{215pt}}  % different hack to keep spacing to chapter artwork
\addtokomafont{paragraph}{\sffamily}

\def\mychpstyleintl{%
{\noindent\setlength{\tabcolsep}{0pt}\setlength{\arrayrulewidth}{2pt}%
\begin{tabular}{c}
\\[100pt]
\begin{tabular}{lr}
\begin{tabular}{p{0.6\linewidth}}
\\
\end{tabular}
&
\begin{tabular}{p{0.4\linewidth}}
\rightline{{%
\sffamily%
\fontseries{bx}%
\fontshape{n}%
\fontsize{100}{120}%choose baselineskip to be 1.2 times font size
\selectfont
\thechapter}}
\end{tabular}
\end{tabular}\\[300pt]
\end{tabular}
}}
1
  • Since you're using KOMA-script, there's probably a way to do this without the titlesec package, though I don't know how myself. Jan 27, 2016 at 23:22

1 Answer 1

4

Update

KOMA-Script version 3.26 provides afterindent as new option for \RedeclareSectionCommand and \RedeclareSectionCommands, see the documentation or Adjusting spacing around section/subsection titles with koma-script.

So now you can use

\documentclass{scrbook}

\RedeclareSectionCommand[
  beforeskip=50pt,% <- changed
  afterskip=30pt,
  afterindent=false% <- added
]{chapter}

\RedeclareSectionCommands[
  beforeskip=0pt,% <- changed
  afterskip=1.2pt,
  afterindent=false%<- added
 ]{section,subsection,subsubsection}

\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}

to get the same result as in the original answer below.


Original answer

Do not use package titlesec together with a KOMA-Script class. There is the command \RedeclareSectionCommand to change the space before and after a section title. But use the correct units ...

\RedeclareSectionCommand[
  beforeskip=-50pt,
  afterskip=30pt
]{chapter}

\RedeclareSectionCommands[
  beforeskip=-1sp,
  afterskip=1.2pt
 ]{section,subsection,subsubsection}

Note that the beforeskip must be lower than 0 to remove the par indent for the text directly following after the section command. So you have to use -1sp that is nearly 0pt.

Example:

\documentclass{scrbook}

\RedeclareSectionCommand[
  beforeskip=-50pt,
  afterskip=30pt
]{chapter}

\RedeclareSectionCommands[
  beforeskip=-1sp,
  afterskip=1.2pt
 ]{section,subsection,subsubsection}

\usepackage{blindtext}

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

The line

 \renewcommand*{\chapterheadstartvskip}{\vspace*{215pt}}

has the same effect as

\RedeclareSectionCommand[
  beforeskip=-215pt
]{chapter}

So you have to decide if you want 50pt or 215pt space before your chapter title??

1
  • Such a nice suggestion... Wow
    – MadyYuvi
    May 23, 2023 at 7:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .