The page style of first page of a chapter of most book classes, distinguishes from the page style of the other pages. Standard class book
uses hard coded \thispagestyle{plain}
for the first page of a \chapter
. KOMA-Script class scrbook
uses \thispagestyle{\chapterpagestyle}
and the default of \chapterpagestyle
is plain
too.
And if you have a look at the result of your scrlayer-scrpage
example:

there are several differences between the first page of the chapter (left side) and other pages (right side):
- no head separation line/rule on first page vs. head separation line/rule in other pages
- no running head on first page vs. running head on other pages
- no page number on first page vs. page number on other pages
This first is, because option headsepline
does not set a head separation rule on page style plain. You could switch it on using plainheadsepline
. But I think, you do not want it. So this is good
The second is, because you have removed the defaults for page style scrheadings
and plain.scrheadings
(which is the same like plain
after the \pagestyle{scrheadings}
, that is done while loading scrlayer-scrpage
) using \clearpairofpagestyls
and you've added \headmark
only to scrheadings
but not to plain.scrheadings
. That is absolutely correct.
The third has almost the same reason as the second, but you've added \pagemark
only to scrheadings
. So if you like to have a page number on the first page of a chapter, you have to add \pagemark
to plain.scrheadings
. This could be done replacing \ihead
by \ihead*
. But this would add the page number to the head. I think, you want the page number at the middle of the foot. So you have to use
\cfoot[\pagemark]{}
Note, the optional argument of \cfoot
etc. does change the corresponding element of the plain page style.
So with:
\documentclass[oneside, openany, headsepline]{scrbook}
\usepackage{lipsum}
\usepackage[]{scrlayer-scrpage}
\clearpairofpagestyles
\ihead{\pagemark}
\ohead{\headmark}
\usepackage{etoc}
\renewcommand{\etocaftertitlehook}{\pagestyle{plain}}
\renewcommand{\etocaftertochook}{\thispagestyle{plain}}
\begin{document}
\title{title}
\maketitle
\tableofcontents
\thispagestyle{empty}
\addtocontents{toc}{\protect\thispagestyle{empty}}
\addchap{Copyright}
\pagenumbering{roman}
\chapter{Chapter}
\pagenumbering{arabic}
\section{hello}
\lipsum[1-20]
\end{document}
You will get

You could even remove using etoc
and use \BeforeStartingTOC
and \AfterStartingTOC
to set the first page of the table of contents using page style empty
but the rest of the table of contents with page style plain
:
\documentclass[oneside, openany, headsepline]{scrbook}
\usepackage{lipsum}
\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\ihead{\pagemark}
\ohead{\headmark}
\cfoot[\pagemark]{}
\BeforeStartingTOC{\pagestyle{plain}\thispagestyle{empty}}
\AfterStartingTOC{\clearpage}
\begin{document}
\title{title}
\maketitle
\tableofcontents
\addchap{Copyright}
\pagenumbering{roman}
\chapter{Chapter}
\pagenumbering{arabic}
\section{hello}
\lipsum[1-20]
\end{document}
BTW: Your fancyhdr
definition distinguish from your description. It does also set a separation line on the plain
pages. I would not recommend this, but you can do it:
\documentclass[oneside, openany, headsepline,footlines=1]{scrbook}
\usepackage{lipsum}
\usepackage[plainfootsepline]{scrlayer-scrpage}
\clearpairofpagestyles
\ihead{\pagemark}
\ohead{\headmark}
\cfoot[\pagemark]{}
\BeforeStartingTOC{\pagestyle{plain}\thispagestyle{empty}}
\AfterStartingTOC{\clearpage}
\AddToLayerPageStyleOptions{plain.scrheadings}{% whenever page style plain.scrheadings is selected
onselect={\KOMAoptions{footsepline}}% activate footsepline
}
\AddToLayerPageStyleOptions{scrheadings}{% whenever page style scrheadings is selected
onselect={\KOMAoptions{footsepline=false}}% deactivate footsepline
}
\begin{document}
\title{title}
\maketitle
\tableofcontents
\addchap{Copyright}
\pagenumbering{roman}
\chapter{Chapter}
\pagenumbering{arabic}
\section{hello}
\lipsum[1-20]
\end{document}

Here I've used \AddToLayerPageStyleOptions
to set KOMA-Script option footsepline
depending on the selected page style
If you also want to have upper case running head see option markcase
in the KOMA-Script manual. If you want the prefix CHAPTER
see \chaptermarkformat
. If you want to change the font, see elements pageheadfoot
, pagehead
, pagenumber
and commands \setkomafont
and \addtokomafont
.