I would like to insert the chapter number and name on the left header of a page. So far, I have used the following code, which works very well:

\renewcommand{\chaptermark}[1]{\markright{\thechapter\;\; #1}{}}




However, if I happen to include sections, this code does not work anymore, replacing the chapter number and name by the section number and name (capitalised, for some reason).

Could anybody please help? Thanks.

1 Answer 1

\usepackage[a6paper]{geometry}% just for the example

\renewcommand\chaptermark[1]{\markboth{\thechapter\ #1}{}}
\renewcommand\headrulewidth{0pt}% suppress the header rule


\chapter{A test chaper}
\section{A test section}


The result:

enter image description here

You must log in to answer this question.