[Tex/LaTex] Page header – Upper and lower case

bibliographiescapitalizationheader-footertable of contents

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

I have these commands that create my header:

\usepackage[headsepline,plainheadsepline]{scrpage2}    
\pagestyle{scrheadings}

\clearscrheadfoot %clear everything
\ohead[\rightmark ~$\vert$ \pagemark]{\rightmark ~$\vert$ \pagemark} %define header for beginning of chapter and "normal" pages
\renewcommand{\chaptermark}[1]{\markright{\ #1}} %??
\setheadsepline{1pt} %set size of sep-line

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…

Best Answer

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}

\usepackage[headsepline,plainheadsepline,nouppercase]{scrpage2}
\pagestyle{scrheadings}

\clearscrheadfoot %clear everything
\ohead[\rightmark ~$\vert$ \pagemark]{\rightmark ~$\vert$ \pagemark} %define header for beginning of chapter and "normal" pages
\renewcommand{\chaptermark}[1]{\markright{\ #1}} %??
\setheadsepline{1pt} %set size of sep-line

\usepackage{lipsum}

\begin{document}

\tableofcontents

\chapter{foo}

\lipsum[1-12]

\addtocontents{toc}{\protect\newpage}

\chapter{bar}

\lipsum[1-12]

\end{document}