[pdftex] Autoscaling included images

Heiko Oberdiek oberdiek at ruf.uni-freiburg.de
Fri Dec 14 09:58:24 CET 2001


On Thu, 13 Dec 2001, Jens-Uwe Morawski wrote:

> > \resizebox{%
> >   \ifdim\width>\linewidth
> >     \linewidth
> >   \else
> >     \width
> >   \fi
> > }{!}{\includegraphics{myimage}}
>
> Restricting the problem to only the width of an image is easy.
> Have you any solution that regards width _and_ height?

This is trivial. You can apply the same procedure on the height
and have a construct with two nested \resizeboxes. Then you
can define a macro for this and use the macro in the document.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>




More information about the pdftex mailing list