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 am creating a test question using exam.cls and I think it would be different if i will include image in the question. But i dont really know how should I insert it. i found a solution code that does exactly what I am expecting but these only compiles in 2012 version of TeXLive. Mine was 2009. Is there other posible solution for this to work in 2009 version? Or is there other possible package inspite of using adjustbox?


You can insert image here as
and your text can continue after it
and spill onto the next line as well, so you can see how this works.


share|improve this question
up vote 4 down vote accepted

This will put the picture half above and half below the baseline:


The macro uses only standard LaTeX constructions. Of course, graphicx must be loaded for \includegraphics (but it's a package included in all LaTeX distributions since the introduction of LaTeX2e).

If you want a default width for the image, but in some cases you want to modify it, then


will allow the syntaxes

\Image{../Activity/ddd}      % default width 1cm
\Image[2cm]{../Activity/ddd} % width 2cm

If you need to specify other keys to \includegraphics, it's better to pass the whole thing:


so you can say


just as if \ImageF was \includegraphics.

share|improve this answer
\raisebox and \includegraphics are part of graphicx and no standard LaTeX constructions, aren’t they? – Tobi Feb 15 '13 at 15:24
\raisebox is provided by the LaTeX kernel, not by graphicx; in general I consider standard LaTeX whatever is documented in Lamport's manual and \includegraphics is there. – egreg Feb 15 '13 at 15:29
Exactly! :) Thanks. – Kayla Feb 15 '13 at 15:49
@egreg: OK, thanks :-) “in general I consider standard LaTeX whatever is documented in Lamport's manual” ok for me – certainly graphicx is a standard package – but maybe not for absolute beginners ?! – Tobi Feb 15 '13 at 16:13
Is it possible for the image be modified? Seeing the image will be 1cm width in default I think is fine but if image size can be modified which depends on the decided size of the image would be better. Is it possible? Example \Image{../Activity/ddd}[2cm]. – Kayla Feb 15 '13 at 16:17

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.