Dynamic scaling of figure width

I recently found the following Latex code snippet in the web and thought it is worth to share it with you. If you have large figures that stretch over the linewidth or textwidth, whatever you prefer and want to reduce them automatically, the following piece of code will do it for you:


%Document content

This piece of code was published here under the GNU Free Documentation License, Version 1.2.

One Comment

  1. Will Robertson

    Nice. This would be handy to add as a keyval option such as


    with a convenient method to specify this as a default option. Perhaps someone should write a package for CTAN 🙂

    I can’t really comment whether this sort of thing would ever have a chance of being incorporated into graphicx directly, however.

Leave a Reply