Is it possible to create two commands \disableOverfullWarnings and \enableOverfullWarnings that respectively disable and enable the printing of messages such as

Overfull \hbox (12.92616pt too wide) in paragraph at lines 157--158 ...

in the console (in the output of pdftex)?


PS: If not possible, is it possible to disable all warnings for some part of the document?

EDIT: This is not a duplicate of How to suppress overfull hbox warnings up to some maximum?.

  • No, it is not a duplicate!
    – Colas
    Sep 20, 2016 at 8:15
  • in what way is it not a duplicate? (I could re-open but I couldn't give any other answer than the one there) Sep 20, 2016 at 8:51
  • \disableOverfullWarnings is \hfuzz=\maxdimen and that will turn off at the end of the current environment or if you do \hfuzz=0.1pt Sep 20, 2016 at 8:53
  • Ah! I see what you mean now. I thought one could disable a warning without any consideration on dimensions. But your idea is fine! Thanks! If you wish to make it an answer (I still think it is not a duplicate).
    – Colas
    Sep 20, 2016 at 8:56


Browse other questions tagged .