I have quite a big document and got an Underfull \hbox (badness 10000) warning at each and every caption I have in a figure, subfigure or table. I didn't find any notes about similar problems and I have no idea what could cause this. Maybe someone has an answer on this? I am coding in overleaf, if this makes a difference.

Here is a example of what I mean:

enter image description here













\usepackage[americaninductors, straightvoltages, european resistors, nooldvoltagedirection]{circuitikz}

\pgfkeys{/pgf/number format/.cd,use comma, 1000 sep={\,}}




    \caption{Falschstromkennlinie des Kabels}



      width = 0.9\textwidth,
      height = 0.3\textheight,
        \addplot coordinates {(0,0) (1,1)};
  • 2
    There could be tens of reasons for that. To be able to help, try to prepare a file showing the problem --- if it happens for every figure, it will suffice a file with just one figure and the preamble code that creates the problem.
    – Rmano
    Jan 22, 2023 at 18:03
  • I added my preamble and a figure as an example.
    – DraUX
    Jan 22, 2023 at 18:42
  • I'm not sure why, but it looks like the problem boils down to \usepackage{subcaption} \usepackage[NewCommands]{ragged2e}. (Also, this isn't really an overleaf problem, so that tag should be removed.)
    – Teepeemm
    Jan 22, 2023 at 19:04
  • Are you sure you need all those packages to produce the problem? It would be nice if you try to trim it down...
    – Rmano
    Jan 22, 2023 at 22:49

1 Answer 1


A real minimal code showing the problem is the following one(Note 1):



    \fbox{\Huge\strut image here}
    \caption{Falschstromkennlinie des Kabels}


It seems that the problem is the [NewCommands] option for the ragged2e package. If you remove it, there is no more "underfull hbox" warning. Why this is happening, I do not know --- but the NewCommand option changes the original LaTeX commands and it seems that \caption is expecting something different from them.

Note 1: I copied your huge example, and removed (binary search) all packages until I found the minimal example showing the problem. Please, repeat this process next time!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .