1

I tried to change the page numbering to the bottom left/right. My old template makes the numbering at the top of the page left/right. Now I still need the page numbering display at the first page of each Chapter. Can anyone give me some hints? My MWE is like this:

\RequirePackage{fix-cm}
\documentclass[openright,twoside,headinclude,headsepline,headline=2.1]{scrbook}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[nouppercase,automark]{scrpage2}

\pagestyle{scrheadings}
\renewcommand*{\chapterpagestyle}{scrheadings} 
\clearscrheadfoot
\lefoot[\pagemark]{\pagemark}
\rofoot[\pagemark]{\pagemark}
\rohead[\partmark]{\leftmark}
\lehead[]{\rightmark}
\begin{document}
\frontmatter

\mainmatter
\chapter{Introduction}
\thispagestyle{empty}
\pagenumbering{arabic}
\lipsum
\section{History}
\lipsum
\subsection{Literature}
\lipsum
\end{document}
  • Please don't use markup. We are using markdown here for the formatting. – Schweinebacke Mar 9 '17 at 10:49
  • I found the other commands in another file. Maybe they are responsible for the numbering. <code>\usepackage[nouppercase,automark]{scrpage2} \pagestyle{scrheadings} \renewcommand*{\chapterpagestyle}{scrheadings} \renewcommand{\cftaftertoctitle}{\thispagestyle{empty}} \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}</code> – Peter Yang Mar 9 '17 at 11:18
2

Update because of the changed MWE in the question

Note that the \partmark command does not make sense in your MWE.

Your desired result still seems to be the default behavior of scrbook. So remove all code that changes header and footer settings. Especially do not use \thispagepagestyle{empty} on a page where a page number should be.

\RequirePackage{fix-cm}
\documentclass[openright,twoside,headinclude,headsepline,
  headlines=2.1% <- changed because of a typo
]{scrbook}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
%\usepackage[nouppercase,automark]{scrpage2}
%
%\pagestyle{scrheadings}
%\renewcommand*{\chapterpagestyle}{scrheadings} 
%\clearscrheadfoot
%\lefoot[\pagemark]{\pagemark}
%\rofoot[\pagemark]{\pagemark}
%\rohead[\partmark]{\leftmark}
%\lehead[]{\rightmark}
\begin{document}
\frontmatter

\mainmatter
\chapter{Introduction}
%\thispagestyle{empty}% this would remove page header and footer on the current page
%\pagenumbering{arabic}
\lipsum
\section{History}
\lipsum
\subsection{Literature}
\lipsum
\end{document}

If you want to change page header and/or footer use package scrlayer-scrpage instead the obsolete package scrpage2. Note that the following example only reproduces the default behavior of scrbook.

\RequirePackage{fix-cm}
\documentclass[openright,twoside,headinclude,headsepline,
  headlines=2.1% <- changed because of a typo
]{scrbook}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[automark]{scrlayer-scrpage}% sets pagestyle scrheadings automatically
\clearpairofpagestyles% removes the default page header and footer entries
\ofoot*{\pagemark}% pagenumber in the outer footer with scrheadings and plain style
\ohead{\headmark}% headmark only with scrheadings

\begin{document}
\frontmatter

\mainmatter
\chapter{Introduction}
\lipsum
\section{History}
\lipsum
\subsection{Literature}
\lipsum
\end{document}

Original answer

As @Schweinebacke mentioned the disered result is the default behavior of scrbook. So you can remove all packages and changes related to page header and footer.

Do not use package tocloft with a KOMA-Script class. To get pagestyle empty on the first page of TOC and lists use

\AfterTOCHead{\thispagestyle{empty}}

And to get dots between the chapter entries and the page number in TOC set the class option

toc=chapterentrywithdots

Example:

\documentclass[
  %open=right,% default for scrbook
  listof=totoc,
  bibliography=totoc,
  %twoside,% default for scrbook
  fontsize=12pt,
  english,
  DIV = 17,
  parskip=half,
  headinclude,
  footinclude=false,
  headsepline,
  BCOR=16mm,
  numbers=noenddot,
  headlines=2.1,% <- changed
  appendixprefix,
  %cleardoublepage=empty,% default
  toc=chapterentrywithdots% <- added
]{scrbook}
\usepackage{blindtext}
\usepackage{babel}% <- added

\AfterTOCHead{\thispagestyle{empty}}% if you really want to use pagestyle empty on first page of TOC and lists

\begin{document}

\begin{titlepage}
  Title page
\end{titlepage}
\frontmatter
\addchap*{Abstract}
\Blindtext[2]
\tableofcontents
\listoffigures
\listoftables

\mainmatter
\chapter{Introduction}\label{chapter:introduction}
\Blindtext

\blinddocument
\end{document}

enter image description here


If you want to change the default header entries then load package scrlayer-scrpage and maybe ask a new question to get help for the correct settings.

| improve this answer | |
  • Thanks, @esdd. I am sorry to change the old codes with a real MWE. Thank god. In your comment there is still some old codes there. – Peter Yang Mar 15 '17 at 22:03
  • I have updated my answer because of the changed MWE in the question. – esdd Mar 16 '17 at 9:18

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.