UK TeX FAQ -- question label fancyhdr

### Alternative head- and footlines in LaTeX

The standard LaTeX document classes define a small set of 'page styles' which (in effect) specify head- and footlines for your document. The set defined is very restricted, but LaTeX is capable of much more; people occasionally set about employing LaTeX facilities to do the job, but that's quite unnecessary - Piet van Oostrum has already done the work.

The fancyhdr package provides simple mechanisms for defining pretty much every head- or footline variation you could want; the directory also contains some documentation and one or two smaller packages. Fancyhdr also deals with the tedious behaviour of the standard styles with initial pages, by enabling you to define different page styles for initial and for body pages.

While fancyhdr will work with KOMA-script classes, an alternative package, scrpage2, eases integration with the classes. Scrpage2 may also be used as a fancyhdr replacement, providing similar facilities. The KOMA-script classes themselves permit some modest redefinition of head- and footlines, without the use of the extra package.

Memoir also contains the functionality of fancyhdr, and has several predefined styles.

Documentation of fancyhdr is distributed with the package, in a separate file; documentation of scrpage2 is integrated with the scrgui* documentation files that are distributed with the KOMA-script classes.

`fancyhdr.sty`
  macros/latex/contrib/fancyhdr (zip, browse)
`KOMA script bundle`
  macros/latex/contrib/koma-script (zip, browse)
`memoir.cls`
  macros/latex/contrib/memoir (zip, browse)
`scrpage2.sty`
  Distributed as part of macros/latex/contrib/koma-script (zip, browse)

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=fancyhdr