I found this great example in an answer of this question How to use custom page style on a single page and another for all subsequent pages? and changed it a little bit.
\documentclass{scrbook}
\usepackage{scrlayer-scrpage}
\newpagestyle{StyleA}{{StyleA left page}{StyleA right page}{Style A onesided document}}{{}{}{}}
\newpagestyle{StyleB}{{StyleB left page}{StyleB right page}{Style A onesided document}}{{}{}{}}
\usepackage{lipsum}
\begin{document}
\pagestyle{StyleB}% use StyeleB for the document
\chapter{chapter 1}
\lipsum[1-15]
\chapter{chapter 2}
\pagestyle{StyleA}% use StyleA only for this page
\cleardoublepage
\chapter{special chapter}
\lipsum[16-30]
\pagestyle{StyleB}% use StyleB for the document
\cleardoublepage
\chapter{Kapitel 3}
\lipsum[1-15]
\end{document}
This works quite good for me since I only want to change the headers for my chapters.
But there are some questions I could not find an answer to so I ask them here.
- How can I define the left, center and right part of the header or footer? I normally use
\ohead{},\chead{},\ihead{}, etc. - Is it possible to add these created styles so that they also will be used for the first page of the chapter? Using
\chapterpagestyle{StyleA}is not working. - I have created my own section command with
\DeclareNewSectionCommand{}. Is it possible to automate it in a way, that the\pagestyle{StyleB}-command is added automatically to the normal chapter-command\chapter{}, so that the usage of it resets the changed pagestyle to StyleB?

