[Tex/LaTex] Headmark on first chapter page with scrlayer-scrpage

header-footerkoma-scriptscrlayer-scrpagescrreprt

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

Best Answer

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