[Tex/LaTex] scrbook twoside=off but alternating headings like with twoside=on

double-sidedheader-footerkoma-script

I use scrbook for a large document and decided to print it out one sided only. So I added twoside=off to the scrbook class options.

However, that's not quite what I wanted to achieve. There is only a non-altenating header now and header and pagenumbers are centered.

How do I get alternating headers (chapter title on even, section title on odd pages) and headers and footers aligned to the right?

Best Answer

You can either use twoside=semi:

\documentclass[twoside=semi]{scrbook}
\usepackage{scrpage2}
\automark[section]{chapter}
\clearscrheadfoot
\rohead{\leftmark}
\rehead{\rightmark}
\refoot{\pagemark}
\rofoot{\pagemark}

\pagestyle{scrheadings}
\usepackage{blindtext}

\begin{document}
\Blinddocument
\end{document}

Or you can use non robust test:

\documentclass[twoside=off]{scrbook}
\usepackage{scrpage2}
\automark[section]{chapter}
\clearscrheadfoot
\ohead{\ifodd\value{page} \rightmark\else\leftmark\fi}
\ofoot{\pagemark}
\pagestyle{scrheadings}


\usepackage{blindtext}

\begin{document}
\Blinddocument
\end{document}