LaTeX warning "Float too large for page by 99.90506pt": cause and fix
A figure or table is taller than the text area of a page. The number is the excess in points (72.27 pt are one inch, 28.45 pt one centimetre). LaTeX places the float on a page of its own anyway, and the excess runs into the bottom margin.
Why it happens
- An image is scaled by width or by a fixed height and comes out taller than the page, for example a portrait image with
width=\textwidth. - The image has
height=\textheight. The caption is part of the float, so image and caption together are too tall. - A long table stands in a
tableenvironment. A float cannot break across pages.
How to fix it
- Limit width and height together and keep the proportions:
\includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{...}. See Resize an image in LaTeX. - Leave room for the caption: 0.8 to 0.9 of
\textheightfor the image. - Set a table that is longer than a page with
longtable, which breaks across pages. See Table across multiple pages in LaTeX.
A document that produces the message
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[height=22cm]{image}
\caption{A tall figure}
\end{figure}
\end{document}The corrected document
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{image}
\caption{A tall figure}
\end{figure}
\end{document}Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.
Finding the line in the editor
The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.