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

2

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
    Why not using \chapterpagestyle? – Johannes_B Jul 17 '18 at 5:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.