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 want to enclose all \includegraphics into \shadowbox. Therefore I thought to re-define \includegraphics:


so that each time \includegraphics is called, actually the graphic is enclosed in a \shadowbox. But the above does not work:

Missing { inserted. \do@VerbBox l.80 \includegraphics {0_home_rkrug_Documents_Publications_2012_handbook_Mana... A left brace was mandatory here, so I've put one in. You might want to delete and/or insert some corrections so that I will find a matching right brace soon. (If you're confused by all this, try typing `I}' now.)

Any suggestions how I can redefine \includegraphics ?

share|improve this question
up vote 12 down vote accepted

I assume you're using \shadowbox from the fancybox package. You need to save the definition of \includegraphics and to pass it to \shadowbox:


% save the meaning of \includegraphics

% pass the image to \shadowbox


In this particular case \LetLtxMacro is not really needed and the primitive \let would have sufficed, but this approach is safer whenever commands with optional arguments are redefined.

Note that you lose the possibility of using the *-form, use the clip option instead.

share|improve this answer
Very nice - thanks. – Rainer Sep 7 '12 at 11:30

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.