Let's create a single-sided (!) document made in scrbook
-class (e.g. scientific work) by setting \documentclass[twoside=false]{scrbook}
.
Working minimum-example:
\documentclass[twoside=false]{scrbook}
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}
Screenshot of the initial state
Consequently, the chapter will be placed in the middle of the head (on non-plain-pages).
Screenshot of the desired end state
But now how is it possible to place the chapters name to the left edge and the sections name to the right edge?
In a two-sided layout it would be really simple by typing…
\automark[section]{chapter} % chapter in \leftmark; section in \rightmark
\lehead[]{\leftmark}{\leftmark} % \leftmark placed in even-side left-edges
\rohead{\rightmark} % \rightmark placed in odd-side right-edges
… into the preambel. But how does it work for single-sided documents (with declaration twoside=false
)?
It is a well known fact that popular KOMA-classes like…
\lehead[content plain.scrheadings]{content scrheadings}
\rehead[content plain.scrheadings]{content scrheadings}
… only will work fine in double-sided layouts.
Thank you very much for your help, I'm curious about your solutions! 🙂
Best Answer
If you want to use both
\leftmark
and\rightmark
in a one-sided document with packagescrlayer-scrpage
you have to set the optionautooneside=false
Note that option
automark
does the same as\automark[section]{chapter}
and\cfoot*{\pagemark}
is a short version of\cfoot[\pagemark]{\pagemark}
.Update
To avoid identical entries in left and right header you can change the definition of
\ohead
toCode: