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

In a LaTeX document I have about 70 images which are scaled using the graphicx-package and \includegraphics[scale=0.8]{foo.pdf}

where the scaling factor varies. Now I would like to rescale them all with a common factor, like

\includegraphics[scale=\factor * 0.8]{foo.pdf}

except that is no LaTeX syntax. Can anyone provide a smart solution?

share|improve this question
\includegraphics[scale=\factor , scale= 0.8]{foo.pdf}
share|improve this answer
Thanks a bunch! That was quite a bit more elementary to solve than I anticipated. – Holtor Aug 11 '14 at 16:11
I would have thought [scale=0.8, scale=\factor]! – Yiannis Lazarides Aug 11 '14 at 16:21
@YiannisLazarides in an ideal world (not this one, admittedly) multiplication is commutative. – David Carlisle Aug 11 '14 at 16:39
I wonder if you could explain this a bit: it seems entirely non-intuitive to me (keys normally override each other, so I'd expect the scale here to be 0.8 not 0.8 times \factor). – Joseph Wright Aug 11 '14 at 16:48
@JosephWright includegraphics keys don't overight they are cumulative and read left to right, mainly so that [height=1cm,angle=90] makes something 1cm wide but [angle=90,height=1cm] makes something 1cm high the fact that you can use two scale is an artifact of the implementation (and not something I've done before this answer I suspect:-) – David Carlisle Aug 11 '14 at 21:00

Another solution with fp package.



share|improve this answer

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.