The KOMA-Script classes provide the headsepline
option to switch on a separator between the header and the text area in page style headings or myheadings
:
\documentclass[headsepline]{scrbook} \usepackage{blindtext} \begin{document} \blinddocument \end{document}
Since the first page of a chapter is set in page style plain by default, the separator is missing there. As you can see, this is a good thing. If you insist on the separator on these pages as well, the package scrlayer-scrpage
is needed, which takes over the setting of headsepline
with the additional option plainheadsepline
also for pages in the style plain
:
\documentclass[headsepline]{scrbook} \usepackage[automark,plainheadsepline]{scrlayer-scrpage} \usepackage{blindtext} \begin{document} \blinddocument \end{document}
As you can see from the example, this is not a good idea if you stick to the default settings regarding the content of the header.
If you want to change the thickness of the line, you should also use the scrlayer-scrpage
package. With this package you can, for example, pass values for the thickness of the line to the headsepline
option. The length and orientation of the line can also be influenced by the package. For more details see the manual.
A side effect of using the separator is that the header is automatically considered to be part of the type area. This has optical reasons and is explained in detail in the manual.
Wiki (English): HowTo_FootSepLine
Wiki (English): HowTo_PageHeadFoot