Hi all, I'm using the fancyhdr package to get headers on each page of my document. I've successfully created the headers but I am unable to highlight the headers. I want to highlight the headers as shown in attached picture or on second page of this pdf file:
http://homepage.boku.ac.at/imrannad/instruct.pdf
Any help will be highly appreciated.
Centurion555
Document Classes ⇒ How to highlight header using fancyhdr package.
-
- Posts: 6
- Joined: Thu Nov 06, 2008 1:15 pm
How to highlight header using fancyhdr package.
- Attachments
-
- header.gif (7.29 KiB) Viewed 3434 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

How to highlight header using fancyhdr package.
Load fancyhdr and color. Then add to the preamble something like:
You will surely need to increase the value of \headheight, for example:
Code: Select all
\definecolor{LightGray}{gray}{0.8}
\newcommand{\BigBox}[2][c]{\makebox[\dimexpr\textwidth-2\fboxsep-2\fboxrule][#1]{#2}}
\fancyhead{}
\fancyhead[C]{\addtolength{\fboxsep}{5pt}%
\colorbox{LightGray}{\BigBox{\sffamily Proceedings ISARS 1998 Vienna}}}
\renewcommand{\headrulewidth}{0pt}
Code: Select all
\addtolength{\headheight}{15pt}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
-
- Posts: 6
- Joined: Thu Nov 06, 2008 1:15 pm
Re: How to highlight header using fancyhdr package.
Hi Juanjo,
Thanks a lot. It worked after slight modifications.
Regards, Nadeem
Thanks a lot. It worked after slight modifications.
Regards, Nadeem
Re: How to highlight header using fancyhdr package.
do you mind sharing the codes with us?