Hi all,
I'm looking for a simple explanation of how to do a centered header & footer on every page of a document (probably using fancyhdr?). I have the fancyhdr documentation but I can't quite get it to work.
All I need is a string such as "RESTRICTED" as a centered header & footer on every page. Can anyone offer any advice?
I prefer to use Lyx but presumably I can just insert the necessary code into the preamble of the LyX document.
Many thanks
General ⇒ How to do a simple header & footer
NEW: TikZ book now 40% off at Amazon.com for a short time.

How to do a simple header & footer
Hi,
a simple example using fancyhdr:
a simple example using fancyhdr:
Code: Select all
\documentclass{article}
\usepackage{fancyhdr}
\usepackage{lipsum}% just to generate some text
\fancyhf{}
\fancyhead[C]{RESTRICTED}
\fancyfoot[C]{RESTRICTED}
\renewcommand\headrulewidth{0pt}
\pagestyle{fancy}
\begin{document}
\lipsum[1-20]
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: How to do a simple header & footer
That is absolutely just what I wanted! Thank you so much for your help!