TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a thesis to submit tomorrow as .pdf. The University requires written permission from the copyright holder for every figure taken from book/journal--a thing I don't have, and I didn't know was required until today.

The images in question are .pdf, .png and .jpg, typeset with pdflatex.

Is there some kind of environment I can wrap around the \includegraphics{} that will produce a replacement of the exact same size?

Checking width and height for each and every graph (sometimes I use the [resolution=300] statement) would take quite a while.

share|improve this question
[draft] option should do that. – David Carlisle Oct 15 '12 at 11:12
Not the best approach but maybe a quick fix: Use TikZ to draw a grey box over the images. TikZ can automatically use the same size as the figures as shown here: tex.stackexchange.com/questions/9559/…. Alternatively David's suggestion which will only show the filename. – Alexander Oct 15 '12 at 11:12
I don't understand how that will solve your problem. The thesis will be fine without the pictures? Cannot you just redraw them by yourself and cite the source (you don't reuse them so you don't need the permission)? And if you cannot do this, think it's much better to remove them completely than to replace them with empty squares. – yo' Oct 15 '12 at 11:27
I second David; \usepackage[draft]{graphicx} will do; for the pictures you want to include anyway, just add the option draft=false to \includegraphics: \includegraphics[draft=false,...]{file} – egreg Oct 15 '12 at 12:00
@tohecz: That's a thing I didn't want to do. Page-breaks and page numbers would change in the whole document if deleting figures completely. So if I told somebody "I wrote this and that on page X", there would be some ambiguity. And I might get permission for some of the figures later on... – user334287 Oct 16 '12 at 10:08
up vote 15 down vote accepted

The draft option to graphicx will do what you want. It will make an empty box of the exact size that would be occupied by the picture, since the dimensions are still computed from the picture after applying all the options:


If you want to include a particular picture, use the draft=false option:

\includegraphics[draft=false,<other options>]{filename}

The draft option will print the file name inside the box; if you want something else, the following patch, to be added to your preamble after loading graphicx, will do:


    Figure omitted due to\\
    missing permission\\
    % comment the following line if you don't want to show the file name

I've added a possible definition of \@missingcopyright which should explain why the picture is missing; if you don't want the file name, just remove the line starting with \ttfamily. If you want no message at all, just remove \@missingcopyright from the \patchcmd line (and the definition of \@missingcopyright).

share|improve this answer
Beautiful solution! Saving me hours of time. Just had some trouble to get [draft]-option activated. Was conflicting with \usepackage{rotating}, so I made a modified document class (containing \usepackage[draft]{rotating} instead of \usepackage{rotating}) and using this to switch the inclusion of figures on/off. – user334287 Oct 15 '12 at 17:53
You can simply add \PassOptionsToPackage{draft}{graphicx} before the \documentclass line. – egreg Oct 15 '12 at 17:56

Your Answer


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.