Package scrlayer-scrpage and \pagestyle{headings}
KOMA-Script is a bundle of versatile LaTeX classes and packages
Brought to you by:
kohm
Using \pagestyle{headings}
after package scrlayer-scrpage
with scrrerpt
gives not the same result as without package scrlayer-scrpage
at all. Is this on purpose?
\documentclass{scrreprt} %\usepackage{scrlayer-scrpage} \pagestyle{headings} \usepackage{blindtext} \begin{document} \blinddocument \blinddocument \end{document}
Yes it is.
scrlayer-scrpage
automatically activates pagestylescrheadings
.scrheadings
is a page style pair consisting of page stylesscrheadings
andplain.scrheasings
.scrheadings
is the so called main (or headings) page style andplain.scrheadings
is the plain page style. Every such pair makesheadings
an alias of the main page style andplain
an alias of the plain page style. This is a documented feature.So
\pagestyle{headings}
activates only the (already selected) main page style ofscrheadings
. And because you've neither uses optionautomark
normanualmark
the mark mechanism is not influenced by loadingscrlayer-scrpage
. And becausescrreprt
does not use automatic marks by default, herescrheadings
behaves likemyheadings
.See also in user guide:
This is the reason why I recommend to always use either option
automark
ormanualmark
or one of the commands\automark
or\manualmark
explicitly.Last edit: Markus Kohm 2021-03-29
I'm totally fine with that. Just for completeness, using
\pagestyle{headings}
beforescrlayer-scrpage
gives a different result:This is also intended and should be expected with my explanation above. With
\pagestyle{headings}
before loadingscrlayer-scrpage
you are activating a page style with automatic marks. And becausethis is still active after loading
scrlayer-scrpage
.