Upon compiling, I routinely get a lot of "Underful \hbox" warnings from the compiler. Whereas I take "Overful \hbox" warnings seriously since they often mean that somewhere text goes into the margin, I find "Underful \hbox" is of little worry and anyway there is often very little one can do against these. So, I would simply like to get rid of the compiler warning message, such that they don't clog the compiler output which means a lot of scrolling to find important warnings and messages. How can I achieve that? Is there a flag that I can run e.g. pdflatex with? Or something to put in the header to avoid the warnings? Note that I don't necessarily want to fix the underlying issue, I don't really care that much, it's just the compiler warning messages themselves that I find annoying.
Get rid of compiler warnings? (in particular “Underful \hbox”)
compilingwarnings
Best Answer
You can use TeX primitive register
\hbadness
. Its value is maximal badness value for suppressing the Underfull message. For example\hbadness=10000
suppress all Underful messages.\hbadness=9999
suppress almost all but only very serious problems (badness=10000) are printed.