fancyhdr package: unwanted page number with tableofcontents, chapter, part, bibliography
Roger Price <[email protected]> Thu, 2 Apr 2026 15:01:02 +0200 (CEST)
| Newsgroups | gmane.comp.tex.texhax |
|---|---|
| Message-ID | <[email protected]> |
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---636875520-351213901-1775130497=:3056912 Content-Type: text/plain; CHARSET=ISO-8859-15 Content-Transfer-Encoding: 8BIT Content-ID: <[email protected]> My document uses class \documentclass[a4paper,twoside,onecolumn,12pt]{book} with package \usepackage{fancyhdr} . The command \fancyhead does an excellent job of setting up the headers and footers, and I would like to see the fancy header and footer on \textbf{every} page. But with the commands \tableofcontents, \chapter, \part, \bibliography and \printindex fancyhdr places a page number in the footer, probably by forcing a \thispagestyle{plain}. I understand from the fancyhdr documentation, section 10 "The default layout" that this is the default behaviour. But I see in section 9 "A simple example" that I can change the behaviour by issuing \thispagestyle{empty} to remove the page numer, or \thispagestyle{fancy} to restore the headers and footers. Quoting from the fancyhdr doc : « So if you do want the fancy layout on a page containing \maketitle you must issue a \thispagestyle{fancy} after the \maketitle. ». This does not work as advertised. 1) With \thispagestyle{fancy} after \tableofcontents, \bibliography, \printindex I still get a page number centered in the footer. 2) With \thispagestyle{fancy} after \chapter I get no header or footer. How can I override the fancyhdr default and place fancy layout on every page? Thanks for any suggestions, Roger Price ---636875520-351213901-1775130497=:3056912--