86

Is it possible to make LaTeX mark overfull boxes in the output, for example by drawing red rectangles in the PDF where the boxes overflow? The purpose -- to more easily "see" where the problems are in the output.

5
  • 16
    \documentclass[draft]{article} Commented Oct 3, 2012 at 10:29
  • 12
    This is the duty of the draft option to \documentclass
    – egreg
    Commented Oct 3, 2012 at 10:30
  • 2
    Out of curiosity: are there other visual warnings available? Commented Oct 3, 2012 at 11:05
  • 1
    @ChristianLindig unfortunately, not really. You cannot visualize underfull \hbox, nor over/underfull \vbox nor over/underfull \vbox while \output is active. You have to read the .log to find these.
    – yo'
    Commented Oct 3, 2012 at 11:27
  • 1
    @ChristianLindig: Unrelated to overfull boxes, there are packages that provide visual debugging/warnings. Some are even colored :-)
    – raphink
    Commented Oct 3, 2012 at 11:54

1 Answer 1

105

As David Carlisle and egreg said, you can use the draft option in most classes.

If you wish to do it by hand (for example, you need a final option to check for another package's rendering) or tune it, you can use

\overfullrule=1mm

in the document preamble.

4
  • 6
    You're my hero. :-) Microtype was turning off its stuff because of [draft], which apparently can have significant effects on the output.
    – EvanED
    Commented Aug 27, 2013 at 17:15
  • 3
    Seems like tex.stackexchange.com/q/28294/412 provides a way to color the marker.
    – Dror
    Commented Feb 4, 2014 at 20:31
  • 23
    @EvanED Just for the sake of completeness, you can pass the final option to the microtype package to make it do its thing even in draft mode. I always do this because frankly the whole display overfull boxes thing is completely useless if it doesn't respect microtype's changes.
    – Christian
    Commented Mar 20, 2014 at 1:48
  • I would suggest using \overfullrule=5mm, so it shows up in the PDF page thumbprints in the side panel. Commented Jul 30, 2023 at 14:34

You must log in to answer this question.

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