# Place full-page figure float after the page where it's referenced

I have a document with a float figure that occupies the whole page. I want the float page to appear after the page where it is referenced first time. I also want the referring page to be filled with text to the bottom. For example if the reference is on page n, the figure should be on page n+1. If I insert the figure as "\begin{figure}" or "\begin{figure}[p]" the figure is placed on page n+2. How can I move it to page n+1?

Here's an MWE:

\documentclass[12pt]{article}
\pagestyle{plain}
\usepackage{calc}
\usepackage[english]{babel}
\usepackage[pangram]{blindtext}
\usepackage{caption}
\usepackage{floatrow}
\usepackage{afterpage}
\setlength{\textfloatsep}{20pt}
\setlength{\intextsep}{20pt}

\begin{document}
\vspace*{0.9\textheight}

\blindtext[40]

\blindtext[12]\textbf{(See Figure \ref{Fig1})} \blindtext[12]

\begin{figure}[p]
\noindent \centering{}\ffigbox[\FBwidth]{%
\framebox{\begin{minipage}[t][0.8\textheight]{0.8\textwidth}%
\hspace*{\fill}%
\end{minipage}}}{\caption{\label{Fig1}This is figure 1. \blindtext[8]}}
\end{figure}

\blindtext[50] \textbf{(See Figure \ref{Fig2})}. \blindtext[10]

\begin{figure}
\ffigbox[\FBwidth]{%
\framebox{\begin{minipage}[t][3cm]{0.8\textwidth}%
\hfill{}%
\end{minipage}}}{\caption{\label{Fig2}This is figure 2. \blindtext[4]}}
\end{figure}

\blindtext[6] \textbf{(See Figure \ref{Fig3})} \blindtext[3]

\begin{figure}
\noindent \centering{}\ffigbox[\FBwidth]{%
\framebox{\begin{minipage}[t][0.3\textheight]{0.8\textwidth}%
\hspace*{\fill}%
\end{minipage}}}{\caption{\label{Fig3}This is figure 3. \blindtext[2] }}
\end{figure}

\end{document}


And the output:

• the first figure is too large for the page (and generates a warning) and \noindent\centering{} should be \centering . But I do not see the problem, the full page figures do get typeset the page after they are entered. your \ref to figure 1 is a page before that' but latex can not go back after shipping out pages. You need to move the figure environment to the point that you reference it not have paragraphs of text in between if you want it to apear near the point of reference – David Carlisle Mar 16 '15 at 0:38

An alternative to Werner's solution would be to insert the figure environments immediately after the reference, instead of after several more lines of text. For example:

\blindtext[12]\textbf{(See Figure \ref{Fig1})}
\begin{figure}[tbp]
\noindent \centering{}\ffigbox[\FBwidth]{%
\framebox{\begin{minipage}[t][0.8\textheight]{0.8\textwidth}%
\hspace*{\fill}%
\end{minipage}}}{\caption{\label{Fig1}This is figure 1. \blindtext[8]}}
\end{figure}
\blindtext[12]


works with tbp placement or just p placement.

The basic problem here is that you insert a whole bunch of text after the reference using \blindtext:

...
\blindtext[6] \textbf{(See Figure \ref{Fig3})} \blindtext[3]
...


This could imply that the actual float insertion could happen far beyond your reference. Instead, you can use the following generic approach:

...
<reference>
\afterpage{
<figure>
}
...


where <figure> uses the [H] float specifier in order to be placed exactly where it is called. Here is your minimal example, adjusted using the above suggestions:

\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[pangram]{blindtext}
\usepackage{caption}
\usepackage{floatrow}
\usepackage{afterpage}
\setlength{\textfloatsep}{20pt}
\setlength{\intextsep}{20pt}

\begin{document}
\vspace*{0.9\textheight}

\blindtext[40]

\blindtext[12]\textbf{(See Figure \ref{Fig1})}

\afterpage{%
\begin{figure}[H]
\centering
\ffigbox[\FBwidth]{%
\framebox{\begin{minipage}[t][0.8\textheight]{0.8\textwidth}%
\hspace*{\fill}%
\end{minipage}}}
{\caption{\label{Fig1}This is figure 1. \blindtext[8]}}
\end{figure}
\clearpage
}

\blindtext[12]
\blindtext[50] \textbf{(See Figure \ref{Fig2})}.

\afterpage{
\begin{figure}[H]
\ffigbox[\FBwidth]{%
\framebox{\begin{minipage}[t][3cm]{0.8\textwidth}%
\hfill{}%
\end{minipage}}}
{\caption{\label{Fig2}This is figure 2. \blindtext[4]}}
\end{figure}
\clearpage
}

\blindtext[10]
\blindtext[6] \textbf{(See Figure \ref{Fig3})}

\afterpage{
\begin{figure}[H]
\centering
\ffigbox[\FBwidth]{%
\framebox{\begin{minipage}[t][0.3\textheight]{0.8\textwidth}%
\hspace*{\fill}%
\end{minipage}}}
{\caption{\label{Fig3}This is figure 3. \blindtext[2] }}
\end{figure}
\clearpage
}

\blindtext[3]

\end{document}


The addition of \clearpage ensures that only that specific figure is placed on the page.