You can use the package fancyhdr to simplify the creation and modification of page styles.
However, doing it manually isn’t that hard either. It basically boils down to redefining the \ps@plain command, so that this redefines \@oddfoot and \@evenfoot:
% Define a nice example stamp.
\newcommand\myoverlay{
% Taken from the TikZ documentation.
% NB: This requires \usepackage{tikz}!
\begin{tikzpicture}[remember picture,overlay]
\node [rotate=60,scale=10,text opacity=0.2]
at (current page.center) {Example};
\end{tikzpicture}
}
% Save the old definition:
\let\old@ps@plain\ps@plain
\renewcommand\ps@plain{
% First, load the old definition:
\old@ps@plain
% Now, save the previously (by \@old@ps@plain) defined footers:
\let\old@oddfoot\@oddfoot
\let\old@evenfoot\@evenfoot
% Actual redefinition of the footer to include the overlay stamp.
\gdef\@oddfoot{
\old@oddfoot
\myoverlay
}
\gdef\@evenfoot{
\old@evenfoot
\myoverlay
}
}
Now tested, it works. But notice that it only works on pages whose page style is actually plain. Some pages – e.g. \part title pages – automatically define their page to have some other page style. This can of course be addressed by redefining those page styles as well. But I guess that using fancyvrb or the packages mentioned by Charles save a bit of work.