Page Layout ⇒ fancyhdr | Customized Header for ToC Pages
fancyhdr | Customized Header for ToC Pages
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 1076 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
fancyhdr | Customized Header for ToC Pages
welcome to the board!
Try
Code: Select all
\addtocontents{toc}{\protect\thispagestyle{fancy}}Stefan
Re: fancyhdr | Customized Header for ToC Pages
Re: fancyhdr | Customized Header for ToC Pages
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 786 times
fancyhdr | Customized Header for ToC Pages
use the \nouppercase command in the appropritae locations:
Code: Select all
\fancyhead[LE]{\nouppercase\leftmark}
\fancyhead[RO]{\nouppercase\rightmark}
fancyhdr | Customized Header for ToC Pages
I just found out that this also works (after fighting LaTeX all day):
Code: Select all
\tableofcontents{\fancyhead[LE]{\slshape\contentsname}}
\listoffigures{\fancyhead[LE]{\slshape\listfigurename}}
\listoftables{\fancyhead[LE]{\slshape\listtablename}}Cheers, Karianne