2

How can I make KOMA-Script package scrlayer-scrpage add a header to every page, even the pages where a new chapter starts?

I got this MWE:

\documentclass[a4paper, 12pt, ngerman, oneside]{scrreprt}
\usepackage[headsepline,automark]{scrlayer-scrpage}
\pagestyle{scrheadings}

\begin{document}
\chapter{Chapter}
\section{Section}
\newpage
\section{2nd Section}
\end{document}

Which adds a header to every page except the pages where a chapter begins.

enter image description here

1 Answer 1

3

The first page of an chapter is formated with style plain.scrheadings so you need to define it.

One possibility is to use something like \chead*{\leftmark}. The asterix marks that also style plain.scrheadings has to be changed too.

Please see the following MWE

\documentclass[a4paper, 12pt, ngerman, oneside]{scrreprt}

\usepackage[%
  headsepline,
  plainheadsepline, % <=================================================
  automark
]{scrlayer-scrpage}

\clearpairofpagestyles % <==============================================
\chead*{\leftmark} % <==================================================
\ihead*{\pagemark} % <==================================================

\pagestyle{scrheadings}

\begin{document}
\chapter{Chapter}
\section{Section}
\newpage
\section{2nd Section}
\end{document}

and its result:

resulting first page

1
  • 1
    Why not using \chapterpagestyle?
    – Johannes_B
    Jul 17, 2018 at 5:25

You must log in to answer this question.

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