1

I would like to customise how my odd and even header looks like in scrbook class.

Even pages should look like this:

Pagenumber (left) Chapter 1: Title of the first Chapter (center) empty (right)

Odd pages should look like this for the first section:

empty (left) 1. Title of the first Section (center) Pagenumber (right)

Odd pages should look like this for the second section:

empty (left) 2. Title of the second Section (center) Pagenumber (right)

Here is the MWE of what I have so far:

\documentclass[twoside]{scrbook}
\usepackage[]{scrlayer-scrpage}
\usepackage{lipsum}
\clearpairofpagestyles
\lehead{}
\cehead{Chapter\space\leftmark}
\lehead{\pagemark}
\lohead{}
\cohead{\rightmark}
\rohead{\pagemark}
\lefoot{}
\cfoot{}
\begin{document}
\chapter{CHTITLE}
\lipsum[1-20]
\section{STITLE}
\lipsum[21-40]
\end{document}

Note that the section number should not include number of the chapter as it does now (instead of 1.1. or 1.2 it should be just 1 or 2)

  • What should be in header/footer on chapter pages? And what should be in header of odd pages if there did not start a section yet? – esdd Oct 18 '17 at 20:35
1
\documentclass[twoside]{scrbook}
\usepackage{scrlayer-scrpage}
\usepackage{lipsum}
\clearpairofpagestyles
\ohead*{\pagemark}
\chead{\headmark}

\renewcommand\sectionmarkformat{\arabic{section}.\enskip}
\renewcommand\chaptermarkformat{\chaptername\ \thechapter:\enskip}

\begin{document}
\chapter{CHTITLE}
\lipsum[1-20]
\section{STITLE}
\lipsum[21-40]
\section{SECOND STITLE}
\lipsum[41-60]
\end{document}

results in

enter image description here

|improve this answer|||||
  • This works perfectly, thanks, except in the case when chapter is set with \chapter*. In that case there should be nothing on the even page. Can this be achieved? – eklisiarh Oct 18 '17 at 21:46
  • 1
    @eklisiarh Replace \chapter* by \addchap*. – esdd Oct 18 '17 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.