5

KOMA-Script allows many customizations, but I do not know where to start to add some extra horizontal space (via addmargin) to a chapter's head. It is similar to the question here, but this refers to memoir.

Basically I want the chapter title use the whole available width (\textwidth+\marginparsep+\marginparwidth) and not to be typeset like in the following picture. How can I achieve this (best in a KOMA way)?

chapterexample

\documentclass[twoside=semi]{scrreprt}
\usepackage[a4paper,left=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,%
    textheight=49\baselineskip,headheight=\baselineskip,asymmetric]{geometry}%
\usepackage{showframe} % for demonstration

\begin{document}
    \chapter{Test with a very very very long title}
\end{document}
Schweinebacke
  • 26,336
TeXnician
  • 33,589

1 Answers1

2

You can redefine \chapterlinesformat:

\documentclass[twoside=semi]{scrreprt}
\usepackage[a4paper,left=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,%
    textheight=49\baselineskip,headheight=\baselineskip,asymmetric]{geometry}%
\usepackage{showframe} % for demonstration
\usepackage{lipsum}% for demonstration
\makeatletter
\renewcommand*{\chapterlinesformat}[3]{%
  \makebox[\textwidth][l]{% avoid overfull \hbox
    \parbox[t]{\dimexpr\textwidth+\marginparsep+\marginparwidth}{% use more width
      \raggedchapter
      \@hangfrom{#2}{#3}%
    }%
  }%
}
\makeatother

\begin{document}
    \chapter{Test with a very very very long title}
    \lipsum
\end{document}

chapter into the margin

Schweinebacke
  • 26,336