2

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}
  • 1
    Also, are you sure you want Rresumé and not Résumé? – Micah Walter Sep 16 '14 at 16:08
5

Change the definition of \chaptermark to

\renewcommand{\chaptermark}[1]{%
  \ifnum\value{chapter}>0
    \markboth{Chapter \thechapter{}: #1}{}%
  \else
    \markboth{#1}{}%
  \fi}
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}}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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