Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In my lab we frequently make several drafts of documents before a final version. We will pass these draft version around for input from many people. It would be convenient to use the 'draft' option that many of the latex classes have, since it does some useful things, but this is impossible because it will always replace images with a framebox the size of the image and the name of the image in the box. Since much text in our docs is usually devoted to discussing those images (plots of data, analysis, etc), removing the images means that evaluating and improving any discussion of the content of an image is not possible, so we cannot use the `draft' option for draft versions.

I've never really understood why draft versions will remove an image and replace it with a framebox. I've assumed it's a holdover from the days when putting an image in a dvi file for viewing was harder. But, today it seemed absurd, and I've decided to do something about it in the new version of a thesis class that I've written.

The class is based on memoir, and I've looked at the memoir code and I can't figure out how it's removing the images when the draft option is called. I've concluded that it's not actually done in memoir, but is done is somewhere else, probably in the latex2e code itself.

So, can anyone tell me how I can remove this functionality from the draft option? If the only way to do it is to hijack the draft option for my class, that's ok, but nothing I've tried works so far, like the answer I got in this question should work, but it doesn't.

Apologies for the length of my question.

From reading the answers I see that I wasn't clear in my question. I want to keep all of the things that a draft version does, and indeed, add some of my own, except the removal of images. I want to have a working option 'draft', but I want to keep all of the images visible.

share|improve this question
    
Related:Turning off and on images in figures –  Vairis May 15 '12 at 9:08

3 Answers 3

up vote 22 down vote accepted

Use the draft option to document class

\documentclass[draft]{article}

and pass the final option to the graphicx package:

\usepackage[final]{graphicx}

It overrides the draft option which has been given to the document class.

share|improve this answer
    
Ah... sorry Stephan. I guess I didn't make myself clear. I want to keep all of the things that a draft version does except the removing of the images. I think your solution is the same as not using the draft option at all, no? –  bev Mar 14 '11 at 23:53
3  
@bev: Stefan's code will only affect the graphicx package—that is, it will cause the graphicx package to include the images regardless of whether or not you pass the draft option to your document class. All other uses of the draft document class option will remain in effect. –  godbyk Mar 15 '11 at 4:23
    
Sorry for taking 4 days to check this answer, but I had to investigate it out using a bunch of different packages and options since this technique seemed to be working some of the time, but not always. Especially not with my class. However, it turns out that I had loaded the graphicx package twice, with different options, which was the reason it was failing. Thanks everybody for your input. –  bev Mar 19 '11 at 3:28

All class options are also passed to the packages which ignore the ones they do not understand. The replacing of images with frame boxes is done by the graphics/graphicx packages which also have the draft option. As you suspected this has nothing to do with the memoir class. Setting the final option to the used graphic package or any other package overrides the class option and disables this feature.

share|improve this answer

Besides replacing images with frameboxes, the draft option will also disable the micro-typographic extensions of the microtype package and in the process cause different line and page breaks. One useful feature of the draft option is marking overfull boxes; this may also be achieved with

\setlength{\overfullrule}{5pt}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.