2

I want to change the header/footer of every page starting with "chapter". Now the header and footer of chapter pages are empty, but I will change it to only the page number in the middle of the footer.

For example, here is a MWE:

\documentclass[
ngerman,
12pt,
BCOR=0mm,
DIV=calc,
bibliography=totoc,
listof=entryprefix,
listof=totoc,
headings=optiontoheadandtoc,
captions=tableheading,
chapterprefix=true
]{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\usepackage[a4paper]{geometry}
\geometry{left=3.5cm,right=3.5cm,top=3cm,bottom=3cm}
\usepackage[headsepline,automark]{scrlayer-scrpage}         
\renewcommand*{\chaptermarkformat}{Kapitel~\thechapter.~}
\clearscrheadfoot                               
\ohead[]{\pagemark}
\ihead[]{\rightmark}
\usepackage{blindtext}

\begin{document}
    \chapter{Test}
    \blindtext[5]
\end{document}

Header of "normal" pages now (footer empty):

enter image description here

And the pagestyle of the first page in a chapter:

enter image description here

Thank you!!!

1
  • Not related to your question, but do you want to have a full stop after the chapter number in the header? You don't have it in the chapter headline as it is the preferred way to set it. Commented Apr 7, 2021 at 20:59

1 Answer 1

2

Either use \clearmainofpairofpagestyles to only clean the settings for page style scrheadings

\clearmainofpairofpagestyles
\ohead{\pagemark}
\ihead{\rightmark}

or use \cfoot[\pagemark]{} to add the page number in footer for page style plain:

\clearpairofpagestyles
\ohead{\pagemark}
\ihead{\rightmark}
\cfoot[\pagemark]{}

Example:

\documentclass[
ngerman,
12pt,
BCOR=0mm,
DIV=calc,
bibliography=totoc,
listof=entryprefix,
listof=totoc,
headings=optiontoheadandtoc,
captions=tableheading,
chapterprefix=true
]{scrreprt}

\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc}% only needed with older TeX distributions
\usepackage{babel}

\usepackage[a4paper]{geometry}
\geometry{left=3.5cm,right=3.5cm,top=3cm,bottom=3cm}
\usepackage[headsepline,automark]{scrlayer-scrpage}
\renewcommand*{\chaptermarkformat}{Kapitel~\thechapter.~}
\clearpairofpagestyles
\ohead{\pagemark}
\ihead{\rightmark}
\cfoot[\pagemark]{}
\usepackage{blindtext}

\begin{document}
\chapter{Test}
\Blindtext
\end{document}

Remark: \clearscrheadfoot is depraceted. It only exists for reasons of compatibility with the outdated package scrpage2.

You must log in to answer this question.

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