Latex provides a draft-mode as an optional argument to the document class, having two main effects on the whole document.
Draft is an optional argument of the document class and is therefore used as follows
\documentclass[draft]{...}
The two main effects mentioned before are:
- Marking overfull hboxes (no line-break within the margin) by a vertical line, helping to locate overfull hbox warnings. This affects text, but also figures and tables.
- Embedded images are not displayed in the generated PDF. Instead only an outline including the file path is shown.
A similar effect as the latter can also be achieved by drafting the graphicx package (\usepackage[draft]{graphicx}
).
aditi
How can I suppress the filenames of the images as well – so that I see only the outline boxes?
Thanks!
tom
Hi!
This is tricky. The only way I can think of is to change how graphics behaves in draft mode and suppress the filename directly. Unfortunately, I couldn’t find a solution how to do it.
Shreevatsa
If one wants only the former (overfull boxes marked) but not the latter (pictures not being displayed), then instead of the [draft] option, one can use something like:
\overfullrule=5pt
This works even in plain TeX.
ketan
thanks. That helped. I remember there was a similar tag that also made a version of doc with date printed on each page. But dont remember which.
Else
How can I get rid of underfull \hboxes ?
tom
Hi Else,
Thanks for your question. Most probably you get this warning when you force a linebreak at the end of a paragraph. The correct way to end a paragraph is through a blank line or
\par
without linebreak (i.e.\\
).... End of previous paragraph. Beginning of new paragraph ...
If you prefer space between paragraphs, you can use
\vspace{12pt}
or even better\setlength{\parskip}{12pt}
or load the parskip package (\usepackage{parskip}
).Cheers, Tom.
Gitte
What does overfull hboxes mean or do?
I have lots of them when I run my Latex script. Is that a problem, if everything else in the final PDF/DVI-file looks fine?
regards, Gitte
tom
Hey!
It means that your contents is wider than the margins of your document. You can make them visible by making your document a
draft
:It’s good to omit them where possible.
For graphics, set them to be at most
textwidth
in width:For text it usually means there is a hyphenation problem. Try loading the
babel
package and see if it helps:You can also force the words that cause the issue to be split locally using
\-
at the corresponding locations within the word. It will only be applied where needed. In other words, the word will only be split in case it hangs over the edge.Hope it helps.
Cheers, Tom.