# Page header - Upper and lower case

First of all: this is the first time that I use LaTeX.

I have these commands that create my header:

\usepackage[headsepline,plainheadsepline]{scrpage2}

\ohead[\rightmark ~$\vert$ \pagemark]{\rightmark ~$\vert$ \pagemark} %define header for beginning of chapter and "normal" pages
\renewcommand{\chaptermark}[1]{\markright{\ #1}} %??


Everything works as intended, except: On the pages containing the bibliography or the ToC, the name of the chapter is in upper case letters, and elsewhere it is as in the chapter headline.

How can I change that so that the chapter title is not formatted to upper case in the ToC and bibliography?

PS: It would be great if you also could explain the second last line. I understand what it does, but I don't know where \chaptermark is used and thus why it affects the header...

-

## migrated from stackoverflow.comApr 11 '12 at 20:22

This question came from our site for professional and enthusiast programmers.

Your problem description points to a "feature" in the LaTeX standard classes like book and report: Headers for standard chapters are formatted using \chaptermark which in turn calls the \MakeUppercase macro which does exactly what it name suggests. Your redefinition of \chaptermark removes \MakeUppercase for standard chapters. However, \MakeUppercase is hard-coded into the header of the ToC and the bibliography. Solution: Use the nouppercase option of scrpage2 which disables \MakeUpperCase in the header.

\documentclass{book}

\ohead[\rightmark ~$\vert$ \pagemark]{\rightmark ~$\vert$ \pagemark} %define header for beginning of chapter and "normal" pages
\renewcommand{\chaptermark}[1]{\markright{\ #1}} %??

\usepackage{lipsum}

\begin{document}

\tableofcontents

\chapter{foo}

\lipsum[1-12]