TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to change the header and footer to only a group of pages in my document. I'm using the fancyhdr package with these settings:


  \markboth{\format@sec@number{\ifnum\c@secnumdepth>\m@ne\@chapapp\ \thechapter\, \fi}{#1}}{}}
  \markright{\format@sec@number{\ifnum\c@secnumdepth>\z@\thesection\, \fi}{#1}}}


I would likt to not use these settings for some pages. How can I accomplish this?

share|improve this question
up vote 9 down vote accepted

This is a job for the command \fancypagestyle from the fancyhdr package. You can define two styles and alter between them at your wish.



\fancyhead[C]{style 1 with thin line}

\fancyhead[C]{STYLE 2 WITH THICK LINE}
\fancyfoot[C]{= \thepage{} =}









share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.