# KOMA: \pagestyle{empty} works but \pagestyle{plain} doesn't

I have headmarks appearing on the first site of a chapter and I would like to make them disappear.

\automark[chapter]{chapter}
\cfoot[]{}  % Remove pagenumber in center of page
%\refoot[\chaptermark {\vline height 13pt width 13pt} \pagemark]{\chaptermark {\vline height 13pt width 13pt} \pagemark}
%\rofoot[\chaptermark {\vline height 13pt width 13pt} \pagemark]{\chaptermark {\vline height 13pt width 13pt} \pagemark}
%\refoot[\chaptermark ~{\vline height 13pt width 1pt} \pagemark]{\chaptermark ~{\vline height 13pt width 1pt} \pagemark}
%\rofoot[\chaptermark ~{\vline height 13pt width 1pt} \pagemark]{\chaptermark ~{\vline height 13pt width 1pt} \pagemark}
\rofoot[]{\pagemark}
\refoot[]{\pagemark}

\pagestyle{scrplain}
%\renewcommand*{\chapterpagestyle}{plain}  % has no effect
%\renewcommand*{\chapterpagestyle}{empty}  % works, but removes also pagemark


The optional argument of \rehead and \rohead sets the content for the right side of page headers for pagestyle plain.scrheadings. Note that plain and scrplain are aliase for plain.scrheadings:

\rohead[<content for plain.scrheadings>]{<content for scrheadings>}


Unfortunaly we do not know which class is used and if the document is onesided or twosided. And we do not know what the desired result is.

Example for an onesided document with chapter title and pagenumber on the right side on "normal" pages and only pagenumber on chapter pages:

\documentclass{scrreprt}

\usepackage{blindtext}% only for dummy text
\begin{document}
\blinddocument
\end{document}


Example for a twosided document with chapter title and pagenumber on the right side on "normal" pages and only pagenumber on chapter pages:

\documentclass{scrbook}
\usepackage{scrlayer-scrpage}
\automark[chapter]{chapter}

\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}


If the document is twosided and the chapter entry and pagenumber should be to the right on odd and even pages (this is unusual):

\documentclass{scrbook}
\usepackage{scrlayer-scrpage}
\automark[chapter]{chapter}

\clearpairofpagestyles

Thanks a lot for your comments and excuse me for not having mentioned that it's a onesided scrbook document (which is doesn't matter in this case).
I had missed an important point about KOMAscript's \cfoot[]{} and \chead[]{} macros: The optional argument in square brackets is intended to set the content of the head- or footline on plain pages, like for example the first page of a chapter. Therefore, I one needs to leave out the optional argument like in \rhead[]{\headmark} in order to prevent LaTeX from putting a headmark on the first page of a chapter.