2

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.

rfl
  • 233
  • 2
  • 7
  • Ah, the "related" tab refers me to this one: https://tex.stackexchange.com/questions/54344/is-there-a-way-to-avoid-repetitive-compiler-warning-messages?rq=1 --- that might be a duplicate, unless somebody has another suggestion. – rfl Sep 15 '21 at 11:27
  • ah, no, that doesn't work, as is elaborated here: https://tex.stackexchange.com/questions/434830/how-to-use-silence-package-to-silence-underfull-and-overfull-warnings which now truly looks like a duplicate... except that it doesn't provide a solution :( – rfl Sep 15 '21 at 11:30
  • you have not given any example but if the underful box is just slightly underfull eg badness 2000 or so it just means some inter word spaces are over stretched and might be OK. If it is 10000 (maximum) it's usually a miplaced \\ which is a syntax error that you should definitely fix. – David Carlisle Sep 15 '21 at 13:45
  • 1
    https://tex.stackexchange.com/questions/334246/what-does-the-phrase-underfull-hbox-badness-10000-in-paragraph-actually-mea/334249#334249 – David Carlisle Sep 15 '21 at 13:46
  • 1
    https://tex.stackexchange.com/questions/50830/do-i-have-to-care-about-bad-boxes/50850#50850 – David Carlisle Sep 15 '21 at 13:47

1 Answers1

3

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.

wipet
  • 74,238