1

I've the following latex-code to get pagenumbers at the top at "normal" pages and at the bottom at the beginning of a chapter.

\documentclass[pdftex,a4paper,11pt,parskip=half,twoside,headings=normal, headsepline,numbers=noenddot,openright, BCOR=5mm, toc=bibliography]{scrbook}
\usepackage{makeidx}
\makeindex
\usepackage{lipsum}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\clearscrheadfoot
\ohead{\pagemark}
\ihead{\headmark}
\deftripstyle{ChapterStyle}{}{}{}{}{\pagemark}{}
\renewcommand*{\chapterpagestyle}{ChapterStyle}

\begin{document}
\chapter{one}
\lipsum
\index{first}\index{second}
\cleardoublepage
\chapter{two}
\lipsum\index{third}
\cleardoublepage
\printindex
\end{document}

The issue is on the first index-page. There, I don't get a pagenumber at the bottom. How can I fix this?

1 Answer 1

1

You have to redefine the \indexpagestyle, too. Use

\renewcommand*{\indexpagestyle}{ChapterStyle}

Note that the package scrpage2 is deprecated. The successor is package scrlayer-scrpage

\documentclass[pdftex,a4paper,11pt,parskip=half,twoside,
  headings=normal, headsepline,numbers=noenddot,open=right,
  BCOR=5mm, toc=bibliography]{scrbook}
\usepackage{makeidx}
\makeindex
\usepackage{lipsum}

\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\ohead{\pagemark}
\ihead{\headmark}

\newpairofpagestyles{ChapterStyle}{%
  \KOMAoptions{headsepline=false}
  \cfoot{\pagemark}
}
\renewcommand*{\chapterpagestyle}{ChapterStyle}
\renewcommand*{\indexpagestyle}{ChapterStyle}

\begin{document}
\chapter{one}
\lipsum
\index{first}\index{second}
\cleardoublepage
\chapter{two}
\lipsum\index{third}
\cleardoublepage
\printindex
\end{document}

In your MWE there are no other pages using the pagestyle plain which is the default for \chapterpagestyle and \indexpagestyle. In that case you could also use

\documentclass[pdftex,a4paper,11pt,parskip=half,twoside,
  headings=normal, headsepline,numbers=noenddot,open=right,
  BCOR=5mm, toc=bibliography]{scrbook}
\usepackage{makeidx}
\makeindex
\usepackage{lipsum}

\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\ohead{\pagemark}
\ihead{\headmark}
\cfoot[\pagemark]{}% pagenumber in the foot on plain pages

\begin{document}
\chapter{one}
\lipsum
\index{first}\index{second}
\cleardoublepage
\chapter{two}
\lipsum\index{third}
\cleardoublepage
\printindex
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .