Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying change the page header in scrbook so that it contains upper case letters. To do so, I am using fancyhdr which gives me the required look for all the chapters.

enter image description here

Unfortunately there is a problem with the page header in the bibliography that still contains lower case letters.

enter image description here

How can I change this, so that it looks like this?

enter image description here

I know that if use book instead of scrbook everythink works fine, but since I am using a lot of other things from scrbook this is really an unwanted option. Usually scrpage2 is recommended for the use with KOMA-script, but I don't know a way to have upper case letters in the page headers there.

Here is my code

    \begin{filecontents}{mybib.bib}
    @article{Smith2000,
    author = {Smith, John},
    journal = {Journal A},
    number = {1},
    pages = {1--38},
    title = {{Science}},
    volume = {1},
    year = {2000}
    }
    \end{filecontents}

    \documentclass{scrbook}
    \usepackage{biblatex}
    \usepackage{blindtext}
    \bibliography{mybib}
    \usepackage{fancyhdr}

    \makeatletter{%
    \fancyhead[L]{\leftmark}%
    \fancyhead[R]{\thepage}%
    }\makeatother
    \pagestyle{fancy}


    \begin{document}
    \chapter{Test}
    \blindtext[5]
    \cite{Smith2000}
    \printbibliography
    \blindtext[5]
    \end{document}
share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

If you don't want to switch from fancyhdr to scrpage2, add \MakeUppercase to the argument of \fancyhead.

\begin{filecontents}{mybib.bib}
@article{Smith2000,
author = {Smith, John},
journal = {Journal A},
number = {1},
pages = {1--38},
title = {{Science}},
volume = {1},
year = {2000}
}
\end{filecontents}

\documentclass{scrbook}
\usepackage{biblatex}
\usepackage{blindtext}
\bibliography{mybib}
\usepackage{fancyhdr}

\fancyhead[L]{\MakeUppercase{\leftmark}}
\fancyhead[R]{\thepage}
\pagestyle{fancy}


\begin{document}
\chapter{Test}
\blindtext[5]
\cite{Smith2000}
\printbibliography
\blindtext[5]
\end{document}
share|improve this answer
    
after researching quite some time I didnt't expect the answer to be that simple, thanks –  maetra Oct 15 '11 at 14:19
    
adding the babel package to this actually produces the error: You haven't defined the language yet. –  maetra Oct 17 '11 at 7:50
    
@maetra: You need to specify at least one language option, e.g., \usepackage[ngerman,english]{babel}. (The last language is regarded as the document's default language.) –  lockstep Oct 17 '11 at 14:39
    
that is actually what I did, adding the line \usepackage[ngerman, english]{babel} without this babel works fine. But I found a solution that also works with babel. –  maetra Oct 18 '11 at 6:48
add comment

Here the way to use the package scrpage2:

\usepackage[automark]{scrpage2}
\clearscrheadings
\ohead{\MakeUppercase{\headmark}}
\pagestyle{scrheadings}

The same method is used by fancyhdr to get capital letters.

To disable slanted use :\addtokomafont{pagehead}{\normalfont} (Thanks to lockstep)

share|improve this answer
    
You may add \addtokomafont{pagehead}{\normalfont} to disable slanted. –  lockstep Oct 15 '11 at 9:32
    
@lockstep: Thanks. –  Marco Daniel Oct 15 '11 at 11:44
    
thanks Marco, I take a closer look at scrpage now –  maetra Oct 15 '11 at 14:21
add comment

Another solution that works fine with the babel package is the following code from Markus Kohm

   \newcommand*{\MarkBoth}{}
   \let\MarkBoth\markboth
   \renewcommand*{\markboth}[2]{\MarkBoth{\MakeUppercase{#1}}{\MakeUppercase{#2}}}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.