I know there are related questions, but I am still not getting it to work.

I have a long document with 3 chapters, and in each chapter, there are sections such as "1.2.3" for Chapter 1, section 2.3.

I need the chapters to appear on even pages, on the right. The section (only the first level, i.e. 1.2) needs to appear odd pages, on the left.

I used the following code:

\documentclass[DIV12, a4paper, 12pt, listof=totocnumbered, bibliography=totoc]{book}
\usepackage{float, afterpage, rotating, graphicx}
\usepackage{tikz, epstopdf,pgfplots}
\usepackage{longtable, booktabs, tabularx}
\usepackage{fancyvrb, moreverb, relsize}
\usepackage{eurosym, calc, chngcntr}
\usepackage{amsmath, amssymb, amsfonts, amsthm, bm}
\usepackage[skip=5pt]{caption} %add labelfont={bf} as option to make 'Table 1.x' or 'Figure 3.x' bold (but not rest of caption)
\usepackage{multirow, makecell}

  \monthname[\THEMONTH], \THEYEAR}

\geometry{a4paper, headsep=0.6cm, left=33mm, right=33mm, top=25mm, bottom=20mm} %headsep verschiebt die Kopfzeile (Standard ist etwa bei 1cm)

% Kopfzeile anpassen
\usepackage[autooneside=false,headsepline]{scrlayer-scrpage}% Default headsepline width = 0.4pt


\chapter{Test Chapter}

\section{Test Section}

\subsection{Test Subsection}








  • Does \clearscrheadings \clearscrplain \ihead[\headmark]{\headmark} \cfoot[\thepage]{\pagemark} \pagestyle{scrheadings} give the desired result?
    – leandriis
    Feb 27 '20 at 21:20
  • Yes, I used: \usepackage[autooneside=false,headsepline]{scrlayer-scrpage}% Default headsepline width = 0.4pt \automark[section]{chapter} \clearscrheadings \clearscrplain \ihead[\headmark]{\headmark} \cfoot[\thepage]{\pagemark} \pagestyle{scrheadings} Is there a way to change "Chapter 1. Test Chapter" to "1. Test Chapter" ?
    – MANGo 92
    Feb 27 '20 at 21:48
  • \clearscrheadfoot is a short version of \clearscrheadings\clearscrplain. These three commands are outdated. They should be replaced by \clearpairofpagestyles and \clearmainofpairofpagestyles\clearplainofpairofpagestyles.
    – esdd
    Feb 27 '20 at 22:55

You can use


\clearpairofpagestyles replaces the outdated \clearscrheadfoot. \cfoot*{\pagemark} is a short version of \cfoot[\pagemark]{\pagemark}. If there should be no chapter prefix in header add


Example without the unrelated stuff:

\geometry{headsep=0.6cm, left=33mm, right=33mm, top=25mm, bottom=20mm,
  headheight=14.5pt% <- added


\usepackage{blindtext}% only for dummy text


enter image description here

Additional remark: You have to clean up your preamble. You load the standard class book - so you have to remove the KOMA-Script options DIV=12, listof=totocnumbered and bibliography=totoc. Package a4wide is outdated and useless in the example because you are using geometry. Do not load packages twice (graphicx, amsfonts, eurosym, tabularx, booktabs). Package pgfplots loads packages tikz, xcolor, graphicx, rotating automatically. With an uptodate TeX distribution package chngcntr and package inputenc with option utf8 are not needed.

  • Is there an easy way to have the page numbers in the header? So left alligned for chapter level pages, and right alligned for section level pages.
    – MANGo 92
    Mar 6 '20 at 17:05
  • 1
    Replace \cfoot*{\pagemark} by \ohead*{\pagemark}.
    – esdd
    Mar 6 '20 at 17:51

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.