Page Layout ⇒ fancyhdr | Customized Header for ToC Pages
fancyhdr | Customized Header for ToC Pages
Hello,
When using the fancydr package to create a header (on the left the chaptertitle and the page number on the right) I have to use '\thispagestyle{fancy}' on a page where a new chapter starts cause otherwise the pagestyle is automatically 'plain'. So thats not a problem.
Now I'm trying to do the same for my table of contents, but i'm encountering a problem. If my table of contents is only 1 page long it works just fine, but when its 2 or 3 pages the '\thispagestyle{fancy}' command doesn't seem to have an effect on the first page of the ToC.
I've tried to look in the fancyhdr package documentation but found nothing of help.
I've added a working example.
When using the fancydr package to create a header (on the left the chaptertitle and the page number on the right) I have to use '\thispagestyle{fancy}' on a page where a new chapter starts cause otherwise the pagestyle is automatically 'plain'. So thats not a problem.
Now I'm trying to do the same for my table of contents, but i'm encountering a problem. If my table of contents is only 1 page long it works just fine, but when its 2 or 3 pages the '\thispagestyle{fancy}' command doesn't seem to have an effect on the first page of the ToC.
I've tried to look in the fancyhdr package documentation but found nothing of help.
I've added a working example.
- Attachments
-
- Test.tex
- (1.21 KiB) Downloaded 1057 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
fancyhdr | Customized Header for ToC Pages
Hi Tompoesje,
welcome to the board!
Try
instead or have a look at Modifying plain page style.
Stefan
welcome to the board!
Try
Code: Select all
\addtocontents{toc}{\protect\thispagestyle{fancy}}
Stefan
LaTeX.org admin
Re: fancyhdr | Customized Header for ToC Pages
The solution in your link works like a charm, thank you very much!
Re: fancyhdr | Customized Header for ToC Pages
Hi,
I have a similar problem with fancyhdr and Table of Contents. I have defined my headers and footers (see attached file), but the headers in the Contents, List of Tables, and List of Figures pages still don't change. The first page is fine, but in the following pages I want the header to be lower-case letters, not capitalised.
cheers,
Karianne
I have a similar problem with fancyhdr and Table of Contents. I have defined my headers and footers (see attached file), but the headers in the Contents, List of Tables, and List of Figures pages still don't change. The first page is fine, but in the following pages I want the header to be lower-case letters, not capitalised.
cheers,
Karianne
- Attachments
-
- ex.tex
- (1.64 KiB) Downloaded 761 times
fancyhdr | Customized Header for ToC Pages
Hi,
use the \nouppercase command in the appropritae locations:
use the \nouppercase command in the appropritae locations:
Code: Select all
Code, edit and compile here:
\fancyhead[LE]{\nouppercase\leftmark}\fancyhead[RO]{\nouppercase\rightmark}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
fancyhdr | Customized Header for ToC Pages
Awsome!! Thank you!
I just found out that this also works (after fighting LaTeX all day):
And then including the fancyhead code for the rest of the document below.
Cheers, Karianne
I just found out that this also works (after fighting LaTeX all day):
Code: Select all
Code, edit and compile here:
\tableofcontents{\fancyhead[LE]{\slshape\contentsname}}\listoffigures{\fancyhead[LE]{\slshape\listfigurename}}\listoftables{\fancyhead[LE]{\slshape\listtablename}}
Cheers, Karianne
Re: fancyhdr | Customized Header for ToC Pages
Thanks Stefan, that just saved me a bunch of hassle to get the proper page style on my toc, lof, and lot.