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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}


\renewcommand{\chaptermark}[1]{\markboth{\small\tt\color{black}\chaptername\ \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\small\sf\color{black}\thesection\ #1}}


share|improve this question
up vote 4 down vote accepted

Use the first variant. The second variant will, possibly among other things, not account for your header changes in the table of contents:


% \renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}}
% \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
% \fancyhead[RO,LE]{\small\sffamily\rightmark}
% \fancyhead[LO,RE]{\small\ttfamily\leftmark}
\renewcommand{\chaptermark}[1]{\markboth{\small\ttfamily\chaptername\ \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\small\sffamily\thesection\ #1}}






(The blindtext package is only used to add some dummy text to the example.)

EDIT: Replaced LaTeX 2.09 commands \sf and \tt with \sffamily resp. \ttfamily.

share|improve this answer
thanks. It is useful info for my life. – xport Jan 17 '11 at 13:03

Your Answer


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.