# Disable ohead on a single page

i try to disable the ohead on the first page of a section (and only the first page). I tried a lot of things(e.g. \thispagestyle) but nothing really works.

\documentclass[paper=a4,fontsize=12pt,parskip=half,bibliography=totoc,listof=totoc,headings=normal]{scrartcl}

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

\usepackage[headsepline,plainheadsepline,footsepline,plainfootsepline]{scrlayer-scrpage}
\pagestyle{scrheadings}
\automark{section}
\clearscrheadfoot
\ihead{Mr. XY}
\ohead{\headmark}
\ofoot[\pagemark]{\pagemark}

\begin{document}

\section{first}
%here comes a lot of text...
%ein I don't want to have "first" in the header
\section{second}
%here comes a lot of text again...

\end{document}


Hope that someone can give me a solution for that problem. Thanks.

• Do you want/need chapters? They always start on a new page and don't have a header by default. – Johannes_B Nov 19 '16 at 21:25
• I want to have a header an the start of a section, but only with the name (ihead) and not with the section title (ohead). – korny86 Nov 20 '16 at 8:43

## 1 Answer

The following example uses page style plain.scrheadings, which can be defined using the optional arguments of \ihead and \ohead.

Then, it patches \section to append \thispagestyle{plain.scrheadings} to remove the \headmark in the header from pages with section starts.

\documentclass[
paper=a4,
fontsize=12pt,
parskip=half,
bibliography=totoc,
listof=totoc,
headings=normal
]{scrartcl}

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

\usepackage[
headsepline, plainheadsepline,
footsepline, plainfootsepline
]{scrlayer-scrpage}
\pagestyle{scrheadings}
\automark{section}
\clearscrheadfoot
\ihead[Mr. XY]{Mr. XY}
\ohead[]{\headmark}
\ofoot[\pagemark]{\pagemark}

\let\orgsection\section
\def\section#1#{%
\auxsection{#1}%
}
\def\auxsection#1#2{%
\orgsection#1{#2}%
\thispagestyle{plain.scrheadings}%
}

\begin{document}

\section{first}
\lipsum[2-12]
\section{second}
\lipsum

\end{document}

• I bet the users menas on the first page of each section. I.e. what a chapter does. – Johannes_B Nov 19 '16 at 21:26