[Tex/LaTex] How to edit header of one page of book class


I use the book document class and make the headers with fancyhdr:

\documentclass[12pt, a4paper, reqno, oneside]{book}

\usepackage{amsmath,amsxtra,amssymb,latexsym, amscd,amsthm}

\lhead{gggggggggggggggggggg }









Now I want to change right header on one page, can you help me ??

I tried to use : \thispagestyle{empty} to delete the header on one page.

Best Answer

I'll do with the assumption that you don't want the header in the chapter starting page:

\documentclass[12pt, a4paper, reqno,oneside]{book}

\usepackage{amsmath,amsxtra,amssymb,latexsym, amscd,amsthm}
\usepackage{lipsum} % just for the example



\setlength{\headheight}{14.5pt} % as recommended by fancyhdr




There's no need for a \parbox, unless your titles are unusually long. However I'd set them flush right. If you really need a \parbox, don't use \begin{center}...\end{center} in it, but

\parbox{<length>}{\centering <contents>}

and don't forget to look at the warnings by fancyhdr to know the correct value to assign to \headheight.

If you need to change the page style for other pages, define a specific style:

\fancypagestyle{peculiar}{% use whatever name you please
  \fancyhf{}% clear all the headers and footers
  % now define the contents of the various fields
  \renewcommand{\headrulewidth}{0pt}% rule at the top
  \renewcommand{\footrulewidth}{0.2pt}% rule at the bottom

and issue \thispagestyle{peculiar} where you need it. By redefining the plain page style you have a different style on the chapter starting pages.