Overfull \hboxes can be highlighted/marked in the output document by enabling draft=true or overfullrule=true in the \documentclass settings.

Furthermore, slightly overfull or underfull horizontal boxes can often be somewhat reduced by using the microtype package (since draft mode disables microtyping, the final option has to be specified for the microtype package).

A detailed overview on draft mode can be found here, microtype is elaborated here.

However, is there a way to highlight/mark underfull boxes in the output document?

  • 2
    with lualatex, lua-visual-debug pakage will colour code shrunk or stretched spaces Commented Apr 1, 2023 at 21:03
  • I did not yet switch to lualatex in my production environment. Is there any approach for pdflatex?
    – albert
    Commented Apr 1, 2023 at 21:21
  • no, only \showoutput and look in the log, you can not access the information from within tex Commented Apr 1, 2023 at 21:24
  • the draft option for the microtype package no longer exists, so you do not have to load the package with the final option (which doesn't exist anymore, either).
    – Robert
    Commented Apr 3, 2023 at 22:54


You must log in to answer this question.

Browse other questions tagged .