# scrlayer-scrpag - Different headers for first page of a chapter ( --> \chaptermarkformat)

I'm a bit lost using the scrlayer-scrpage package.

I want to have have an \ohead{...} header on the first page of a chapter that slightly differs from the other headers.

So I started by using the scrlayer-scrpag package:

\documentclass[a4paper,ngerman]{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[paper=a4paper, top=3.5cm]{geometry}
\usepackage{blindtext}

\clearpairofpagestyles
\leftmark \thepage
}

\begin{document}
\Blinddocument
\end{document}


In my document, the \ohead{} field is a little bit more complex and there are \lhead{} and \ofoot{} definitions too, but this should just fit for our example right now.

Now, as intended by LaTeX, the first page of every chapter looks different to the other pages, because there are neither headers and footers.

So I used the

\renewcommand\chapterpagestyle{scrheadings}


command to apply the same style to all pages.

That's kind of pretty near to where I want to go, but I just don't want to have the \leftmark (meaning the title) in the header of the first page of every chapter due to the fact that it is standing right below in the "normal" text.

So for the first page of every chapter, the header shall look like that:

\ohead{
\\thepage
}


On on the other pages, it should look like that:

\ohead{
\leftmark \thepage
}


So is there a possibility to make LaTeX just make ignore the \leftmark on every first page of a chapter? Or, alternatively, is there a possibility to define a seperate \ohead{} for the first page of every chapter?

BR, Toni

By default (without any change of \chapterpagestyle) chapter pages use page style plain.

You can use the optional argument of \ihead, \ohead etc. to set the content of header and footer for pages with page style plain:

\documentclass[ngerman]{scrreprt}% paper=a4 is default

\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc}% only needed with outdated TeX distributions
\usepackage[top=3.5cm]{geometry}
\usepackage{blindtext}

\clearpairofpagestyles
{\leftmark\ \pagemark}
\setkomafont{pagenumber}{}

\begin{document}
\Blinddocument
\end{document}


Additional remark: If the content of a header or footer element should be the same for both page styles plain and scrheadings, you can use the starred version for this element. Eg. \ohead*{<content>} is the short version of \ohead[<content>]{<content>}.

\newpairofpagestyles[scrheadings]{specialchapter}{\ohead*{\thepage}}