The following solution patches the output routine using everyshi
to check whether you're on the page where the "special float" resides or not. And, accordingly, change the page style to "something special".
The user interface is the following:
Use a \label{<label>}
in your "special float";
In the preamble, use \specialpagelabel{<label>}
to insert label associated with a "special float". Use \specialpagelabels{<csv labels>}
to process a list of "special labels".

\documentclass{article}
\usepackage{lipsum,fancyhdr}
\usepackage{everyshi,etoolbox,refcount}
\fancypagestyle{flpage}{%
\fancyhf{}% Clear header/footer
\fancyhead[C]{this is a special header}
\fancyfoot[C]{this is a special footer}
}
\EveryShipout{%
\renewcommand*{\do}[1]{%
\ifnum\value{page}=\number\numexpr\getpagerefnumber{#1}-1\relax
\thispagestyle{flpage}%
\fi
}
\dolistloop{\splab}%
}
\newcommand{\specialpagelabel}[1]{\listgadd{\splab}{#1}}% Process single label
\newcommand{\specialpagelabels}[1]{% Process multiple labels
\renewcommand*{\do}[1]{\listgadd{\splab}{##1}}% Each entry gets added to \splab
\docsvlist{#1}}% Process list
\specialpagelabels{fig:special1,fig:special2}
\setcounter{topnumber}{1}% Just for this example (allow only 1 float at the [t]op of the page)
\begin{document}
\begin{figure}[t]
\caption{A top float; processed on page~\thepage, placed on page~\pageref{fig:normal1}.}
\label{fig:normal1}
\end{figure}
\lipsum[1]
\begin{figure}[t]
\caption{Another top float; processed on page~\thepage, placed on page~\pageref{fig:special1}.}
\label{fig:special1}
\end{figure}
\lipsum[2-35]
\begin{figure}[t]
\caption{A top float; processed on page~\thepage, placed on page~\pageref{fig:normal2}.}
\label{fig:normal2}
\end{figure}
\begin{figure}[t]
\caption{Another top float; processed on page~\thepage, placed on page~\pageref{fig:special2}.}
\label{fig:special2}
\end{figure}
\end{document}
List processing is provided by etoolbox
. Each "special label" is added to a g
lobal list
called \splab
, and processed via \dolistloop{\splab}
just before \shipout
.
The above solution is somewhat general. If you have only a couple of images, then a more manual solution with strategic placement of (say) afterpage
or atbegshi
macros might suffice.
titleps
(an alternative tofancyhdr
) and macros\nextfloathead
and\nextfloatfoot
. – Javier Bezos Jun 3 '15 at 17:30