[pdftex] debugging pdf(la)tex
Heiko Oberdiek
oberdiek at uni-freiburg.de
Tue Jul 30 01:27:00 CEST 2002
On Mon, Jul 29, 2002 at 05:08:36PM -0400, Mark Moll wrote:
>
> I'm wondering how I can debug underfull/overfull boxes with pdflatex.
There is nothing special with pdfTeX, you can use the
normal LaTeX or plain-TeX methods:
Option "draft" with LaTeX standard classes sets
\overfullrule, so overfull boxes are marked in the
output with a rule.
* \documentclass[draft]{article}
* \setlength{\overfullrule}{5pt} % LaTeX2e
* \overfullrule=5pt % plain-TeX
For debugging you can use \showlists, \showbox. The amount of
contents that these commands show can be controlled by
\showboxbreadth and \showboxdepth
Eg.:
\setlength{\showboxbreadth}{\maxdimen}
\setlength{\showboxdepth}{\maxdimen}
\showlists
A speciality of pdfTeX is only \pdfavoidoverfull. If set to
a positive number and the other parameters would lead to overfull
boxes, then pdfTeX tries to avoid them, where possible.
> I
> think Context has some debugging functionality, but I am using LaTeX. What
> I'd like to have is something that shows underfull/overfull boxes in the
> pdf file by drawing a rectangle or by inserting a pdf annotation. Is there
> some kind of exception handler in TeX so that I can do something like: "if
> an under/overfull error occurs execute my debug routine"?
No, exception handling and TeX are orthogonal terms :-(
But the sources are available, so you can experiment and
extend the sources for your desired effects.
Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
More information about the pdftex
mailing list