3

The attached latex produces header of page 2 and page 4 to look like

enter image description here enter image description here

where I would have liked "CONTENTS" to be "Contents" and "Chapter 0: Rresumé" to be "Rresumé".

All the following chapter headers should still be "Chapter 1: Something".

Question

Does anyone know what I am doing wrong?

Latex

\documentclass[a4paper,12pt]{book}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage[nottoc]{tocbibind}

\pagestyle{fancyplain}
\renewcommand{\chaptermark}[1]{\markboth{Chapter \thechapter{}: #1}{}}
\lhead[\fancyplain{}{\bfseries\thepage}]
    {\fancyplain{}{\bfseries\rightmark}}
\rhead[\fancyplain{}{\bfseries\leftmark}]
    {\fancyplain{}{\bfseries\thepage}}
\cfoot[]{}
\addtolength{\headheight}{1.6pt}
\renewcommand{\sectionmark}[1]{\markright{\thesection{} #1}}
\lhead[\fancyplain{}{\bfseries\thepage}]
    {\fancyplain{}{\bfseries\rightmark}}
\rhead[\fancyplain{}{\bfseries\leftmark}]
    {\fancyplain{}{\bfseries\thepage}}
\cfoot[]{}
\addtolength{\headheight}{1.6pt}

\renewcommand{\chaptertitlename}{}
\titleformat{\chapter}[hang]{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter:}{1em}{} 

\begin{document}
\tableofcontents
\chapter*{Resum\'{e}}
\addcontentsline{toc}{chapter}{Resum\'{e}}
\chaptermark{Rresum\'{e}}
aaa
\newpage
aaa
\end{document}

2 Answers2

6

Change the definition of \chaptermark to

\renewcommand{\chaptermark}[1]{%
  \ifnum\value{chapter}>0
    \markboth{Chapter \thechapter{}: #1}{}%
  \else
    \markboth{#1}{}%
  \fi}
egreg
  • 1,121,712
0

This seams to solve the "Contents" issue.

\makeatletter
\renewcommand\tableofcontents{%
    \chapter*{\contentsname
        \@mkboth{%
%           \scshape\MakeLowercase{\contentsname}}{\scshape\MakeLowercase{\contentsname}}}%
           \scshape Contents}{\scshape Contents}}%
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    }
\makeatother      

\begin{document}

...

Although I don't understand why it have to be \scshape Contents}{\scshape Contents}} and not just \scshape Contents}}.