# Unexpected “Float too large for page”

My client wants the illustrations in her book to have the page to themselves, so I’ve been using code like this for the floats:

\documentclass{memoir}

% Page layout: 6″×9″ , no trim; type-block: 4.75″×7.5″
\setstocksize{9in}{6in} \settrimmedsize{9in}{6in}{*} \settrims{0in}{0in}
\setbinding{0.375in} \setlrmarginsandblock{0.375in}{0.5in}{*} \setulmarginsandblock{0.75in}{0.75in}{*}

\usepackage{calc}

\checkandfixthelayout[nearest]

\usepackage{graphicx}

\begin{document}
\begin{figure}
% type-block is 4.75″×7.5″, picture is 2850×2850 @600dpi = 4.75″×4.75″,
% so add (7.5″−4.75″)÷2 = 1.375″ vspace on each side of the picture
% to force it to occupy a full page
\vspace{1.375in}
\centering
\includegraphics{illustration.png}
\vspace{1.375in}
\end{figure}
\end{document}


Despite my math, I’m getting the message, “LaTeX Warning: Float too large for page by 16.02414pt on input line 23.”

Following the answers to How can I get rid of the LaTeX warning: Float too large for page?, I can certainly reduce the vspace I’m adding, but I’d like to understand where the error is coming from. What am I not accounting for that’s eating 14–16 points in every picture?

• The text height is 538pt, that is, 7.44in. But why not just doing \begin{figure}[p] and forget about manually centering the object, as LaTeX does it by itself? – egreg Nov 27 '17 at 17:20
• \begin{figure}[p] pushes the illustration to the end of the chapter; I’d like it to not float so far. – J. C. Salomon Nov 27 '17 at 17:24
• No, why should it? – egreg Nov 27 '17 at 17:26
• something else is wrong if [p] is pushing large floats to end of chapter )it holds back small floats, to try to fill a page) – David Carlisle Nov 27 '17 at 17:34
• What counts as “large”? Most of these pictures are 3″–4½″ tall, not much more than half the \textheight. – J. C. Salomon Nov 27 '17 at 19:19

Let TeX do the computations:

\documentclass{memoir}
\usepackage{calc}
\usepackage{graphicx}

\setstocksize{9in}{6in}
\settrimmedsize{9in}{6in}{*}
\settrims{0in}{0in}
\setbinding{0.375in}
\setlrmarginsandblock{0.375in}{0.5in}{*}
\setulmarginsandblock{0.75in}{0.75in}{*}

\setmarginnotes{0.25\spinemargin}{0.5\spinemargin}{0pt}

\checkandfixthelayout[nearest]

\begin{document}

\begin{figure}

\begin{minipage}[c][\textheight]{\textwidth}
\centering
\rule{4.75in}{4.75in}
%\includegraphics{illustration.png}
\end{minipage}

\end{figure}

\end{document}

• Thank you also for the \rule{4.75in}{4.75in}; I hope I remember it next time I need a standalone MWE. – J. C. Salomon Nov 27 '17 at 19:21