I am getting the following error while using figure and subfigure to create a 2 x 1 environment for my figures (i.e. one figure on top and two figures on the bottom) in an unexpected situation.

The document is generated successfully and my figures clearly fit on a single page and I can confirm this even visually, i.e. the page still has a lot of empty space left! But I still want to understand why this error is generated.

Float too large for page by 14.86864pt on input line 58.

This is the block of code I am using:


     \caption{No. 1 }
    \caption{No. 2 }
    \caption{No. 3 }
  \caption{\textit{40 characters here in the original version} 544 characters here}

I have already tried:

  1. Remove \centering
  2. Remove [htbp!] (in the first line)
  3. Remove [b] (those next to subfigure commands)
  • 1
    with test of your code i can't confirm your findings. compilation not gives any warning nor bad boxes. please provide complete small document, which demonstrate your problem. welcome to tex.se! – Zarko Feb 22 '18 at 18:54
  • i took liberty and complete your code snippet to compilable document. please test it and show us results. i'm convinced, that this code cannot produce what you claim. btw, figure position not influence on image size. please clarify what is your problem. – Zarko Feb 22 '18 at 19:09
  • in editing i forgot to add package subcaption. please add it yourself! – Zarko Feb 22 '18 at 19:22

If the float extends to the footer area, then the float is still too large.

The page layout can be made visible by option showframe of package geometry. Add this option or if the package is not used add:

\usepackage[pass, showframe]{geometry}% pass does not change the layout

The macro \DebugBox, defined below, prints the dimensions to the console and the .log file and adds borders. The border lines are put inside the box to prevent that the box with border becomes larger.

    \typeout{\string\DebugBox: wd=\the\wd0, ht=\the\ht0, dp=\the\dp0}%
    \setlength{\fboxrule}{.1pt}% thin border line
    \setlength{\fboxsep}{-\fboxrule}% border line inside

Macro \DebugBox can be used like \mbox, example:

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.