How can I set the header of only one specific page in the LaTeX document? \markboth does not seem to fit, as I have the document class report & it would affect more than one page somehow. Setting \rhead{} new would change the header completely for the pages after that one specific page too..
- 109,596
1 Answers
A thorough review of the fancyhdr documentation would be helpful to you. It will only take a few minutes, and will pay huge dividends in your future LateX endeavors.
Your particular task here is simple; the \thispagestyle command exists for precisely this purpose. So define a pagestyle and use \thispagestyle to apply it to a particular page.
\documentclass{report}
\usepackage{fancyhdr}
\usepackage{lipsum}
\fancypagestyle{mystyle}{%
\fancyhead{Special Header}\fancyfoot{}
}%
\fancyhead{Normal Header}
\fancyfoot{}
\pagestyle{fancy}
\begin{document}
\lipsum
\thispagestyle{mystyle}
\lipsum
\end{document}
\fancypagestyle{mystyle}{*header stuff*} is what defines your pagestyle; here, "Special Header". We then use the normal \fancyhead and \fancyfoot commands to define our normal fancy header (or whatever variants you may prefer). When we reach the page we want to have the special header, we use \fancypagestyle{mystyle} (with "mystyle" replaced with whatever name you may have given it). This will produce the following:
Hope that helps.
- 4,270
- 1
- 19
- 36

\thispagestyle{specialheading}– David Carlisle Dec 03 '19 at 23:48\rheadso presumably you are using fancyhdr style? which provides those commands to define to define page styles. – David Carlisle Dec 04 '19 at 00:11