You are on page 1of 1

The tricky problem when customizing headers and footers is to get things like running section

and chapter names in there. Standard LaTeX accomplishes this with a two-stage approach. In
the header and footer definition, you use the commands \rightmark and \leftmark to
represent the current section and chapter heading, respectively. The values of these two
commands are overwritten whenever a chapter or section command is processed. For ultimate
flexibility, the \chapter command and its friends do not
redefine \rightmark and \leftmark themselves. They call yet another command
( \chaptermark , \sectionmark , or \subsectionmark ) that is responsible for
redefining \rightmark and \leftmark , except if they are starred -- in such a
case, \markboth{Chapter/Section name}{} must be used inside the sectioning
command if header and footer lines are to be updated.

You might also like