2

I'm using the KOMA-script scrbook to write my document. I've customized to chapter headings to look like example 1 below (from this question). These are chapters with numbers. However, when using unnumbered chapters, the heading is pushed to the top of the page. How can I change it so, that unnumbered chapter headings ar at the same level as chpapters with numbers?

Example 1 enter image description here

Example 2 enter image description here

EDIT: I've simplified my code, so it just shows the relevant part.

MWE:

\documentclass[11pt, a4paper, numbers=noenddot, headinclude, chapterprefix]{scrbook}

\usepackage[left=30mm,right=20mm,top=25mm,bottom=20mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage[headsepline]{scrlayer-scrpage}
\RedeclareSectionCommand[
    beforeskip=0pt,
    innerskip=0pt,
    afterskip=1.725\baselineskip plus .115\baselineskip minus .192\baselineskip
  ]{chapter}
  \renewcommand\raggedchapter{\raggedleft}
  \renewcommand\chapterformat{{\fontsize{80pt}{80pt}\selectfont{\thechapter}}}
  \renewcommand\chapterlineswithprefixformat[3]{%
    #2#3%
    \vspace*{-.5\baselineskip}
    \rule{\textwidth}{.4pt}\par\nobreak
  }


\begin{document}

\chapter*{Abstract}

\chapter{Einleitung}

\end{document}
fuj36840
  • 550
  • I cannot test your code, it also looks a bit too complicated, but why don't you use a higher level command like \addchap? – Johannes_B Mar 03 '20 at 04:42
  • I've simplified the code. When using \addchap instead of \chapter I get the same results for the Abstract chapter – fuj36840 Mar 03 '20 at 09:15

1 Answers1

1

You could enlarge beforeskip and put the chapter number in this space before the chapter title:

\documentclass[
  %11pt, a4paper,% <- default
  numbers=noenddot, headinclude, chapterprefix
]{scrbook}

\usepackage[left=30mm,right=20mm,top=25mm,bottom=20mm]{geometry}
%\usepackage[utf8]{inputenc}% <- needed with older TeX distributions
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage[headsepline]{scrlayer-scrpage}
\RedeclareSectionCommand[
    beforeskip=60pt,% <- changed (vertical space for the chapter number)
    innerskip=0pt,
    afterskip=1.725\baselineskip plus .115\baselineskip minus .192\baselineskip
  ]{chapter}
  \renewcommand\raggedchapter{\raggedleft}
  \renewcommand\chapterformat{{\fontsize{80pt}{80pt}\selectfont{\thechapter}}}
  \renewcommand\chapterlineswithprefixformat[3]{%
    \parbox[b][\baselineskip]{\linewidth}{\raggedchapter#2#3}\par\nobreak% <- changed
    \vspace*{-.5\baselineskip}
    \rule{\textwidth}{.4pt}\par\nobreak
  }

\begin{document}
\addchap*{Abstract}
\chapter{Einleitung}
\end{document}

Note that I have added option twoside=false to visualize the result:

enter image description here

esdd
  • 85,675