[pdftex] Autoscaling included images

Heiko Oberdiek oberdiek at ruf.uni-freiburg.de
Thu Dec 13 14:00:40 CET 2001


On Thu, 13 Dec 2001, David Carlisle wrote:

> \def\maxwidth{
>  \ifdim\KV at Gin@natwidth>\textwidth\textwidth\else\KV at Gin@natwidth\fi}
>
> \includegraphics{width=\maxwidth}{figure}

Another possibility is the use of \resizebox, here
\width, \height are defined:

\resizebox{%
  \ifdim\width>\linewidth
    \linewidth
  \else
    \width
  \fi
}{!}{\includegraphics{myimage}}

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




More information about the pdftex mailing list