I have a text with several figures, and I want to change their size in order to see the effect (position, for example) in the text. To define its size, I am using the scale parameter in the \includegraphics. As I have a lot of figures I would no like to change each one in each test.

So I was wondering if there is a way to set a variable, for example figureSize = 0.8, and use it as a parameter to scale in the \includegraphics. This way, I could only change the value in the variable and all the figures would have its size changed.

Or, is there a way better than that to do so?


You can define your variable via:


and use it via:


Here is an example:


| improve this answer | |

Some of the key-values used in \includegraphics can be set using globally


However, for scale (because it's special...) you can do the following:


The above code redifines \includegraphics to always the option scale=.2 to all images, so you don't have to worry about including it. Of course, you can add other defaults too.

Note that since scale is handled differently to some other key-values, multiple uses of scales (as in \includegraphics[.., scale=X, .., scale=Y, ..]{..}) is actually compounded. That is, scale=.2, scale=.5 is similar to scale=.1.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.