Document Classesmakeindex headers and footers

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

makeindex headers and footers

Post by Bozack »

Another makeindex-related question: How do you make the makeindex \printindex command use the same headers and footers as in the rest of the document? On the screenshot below here you can see my normal header to the right, at the second page of the index, but the first page of the index seems to simply ignore the headers:

Image
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: makeindex headers and footers

Post by localghost »

How do you create your page headers?


Best regards
Thorsten¹
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

makeindex headers and footers

Post by Stefan Kottwitz »

Hi Bozack,

perhaps use \thispagestyle or provide some more information.

Stefan
LaTeX.org admin
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

makeindex headers and footers

Post by Bozack »

localghost wrote:How do you create your page headers?
I use fancyhdr. The following is the code from my preamble to define my fancy-style:

Code: Select all

\usepackage{fancyhdr}
	\fancyhead{} % clear all header fields
	\fancyhead[RE,LO]{\bfseries\nouppercase{\leftmark}}
	\fancyhead[RO,LE]{\thepage}
	\fancyfoot{} % clear all footer fields
	\renewcommand{\headrulewidth}{0.2pt}
	\renewcommand{\footrulewidth}{0.0pt}
Stefan_K wrote:perhaps use \thispagestyle or provide some more information.Stefan
I've tried with \thispagestyle, but it doesn't seem to work out. The code

Code: Select all

\thispagestyle{fancy}
\printindex
produces the same output as the one showed in the picture in my first post.
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

makeindex headers and footers

Post by localghost »

Take a look at the fancyhdr documentation (Section 7 - Redefining plain syle, p. 7f). Just define the pagestyle plain in the same way as your fancy pagestyle.
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

makeindex headers and footers

Post by Bozack »

localghost wrote:Just define the pagestyle plain in the same way as your fancy pagestyle.
That worked :) thanks!
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
Post Reply