[Tex/LaTex] Latex inserting blank pages between figures

blank-pagefloats

I have a large number of (.eps) figures which I want to put into a stand-alone .pdf document. I have a script which puts together the code shown below twice (but is repeated dozens of times). The problem is that if the figure size (set below with the 0.58\paperheight) gets too large (i.e., 0.59\paperheight), LaTeX starts putting a blank page between figures. If the size gets larger (i.e., 0.7\paperheight) then it starts putting ~15 blank pages and then puts all the figures together (as I would like them to be) on subsequent pages.

Visually, it isn't an issue of the figure being too large for the page as when it finally does put the figure in, it fits nicely. I've tried using

\afterpage{

and

\lipsum

as suggested in this thread, but haven't had any luck.

Is this an issue with floats? with my document margins? Something else I'm missing? Thanks

\clearpage
\newpage
\begin{center}
  \mbox{}\vfill
  \begin{figure}[htp]
    \includegraphics[angle=0,height=0.58\paperheight]{Figure1.eps}
    \caption{}
  \end{figure}
  \vfill\mbox{}
\end{center}

\clearpage
\newpage
\begin{center}
  \mbox{}\vfill
  \begin{figure}[htp]
    \includegraphics[angle=0,height=0.58\paperheight]{Figure2.eps}
    \caption{}
  \end{figure}
  \vfill\mbox{}
\end{center}

...and so on

Best Answer

Replace

\clearpage
\newpage
\begin{center}
  \mbox{}\vfill
  \begin{figure}[htp]
    \includegraphics[angle=0,height=0.58\paperheight]{Figure2.eps}
    \caption{}
  \end{figure}
  \vfill\mbox{}
\end{center}

by

 \documentclass{article}
  \usepackage{capt-of}
 \begin{document}
  \raggedbottom
  \centering

 \begin{minipage}{\textwidth}
 \includegraphics[angle=0,height=0.58\paperheight]{Figure2.eps}
 \captionof{figure}{...}
 \end{minipage}


 \begin{minipage}{\textwidth}
 \includegraphics[angle=0,height=0.58\paperheight]{Figure2.eps}
 \captionof{figure}{...}
 \end{minipage}


 ...
\end{document}

If your document just consists of a sequence of figures you don't want them to float (they have nowhere to float to) so using a float environment is massively inefficient and will cause latex all kinds of problems as it saves them hoping to find some text over which it can distribute the figures. Just put the figures in a minipage to keep them with their caption, and put a blank line between each minipage.