I have a macro to define the scale of my figures:
\newcommand{\myscale}{0.35}
Now I have a figure that needs to be scaled twice as big, so I tried to use something like this:
\begin{figure}[hbt]
\includegraphics[scale=2\myscale]{my-image}
\caption{My Caption}
\label{fig:my-label}
\end{figure}
This results a very big image, as 2\scale expands to 20.35...
I tried/found:
- Using
scale=2*\myscale, but still get errors - Some more things using
calc, again did not work \real{}, but it does not seem to work also- intcalc, but this only seems to work for integers, which is not always the case for
\myscale. - pgf package, but it seems a complex for a simple multiplication
- fp package works, but still somewhat complex
The easiest way (that works for me), is this fp-based implementation:
\begin{figure}[hbt]
\FPeval\calculatedScale{2*\myscale}
\includegraphics[scale=\calculatedScale]{my-image}
\caption{My Caption}
\label{fig:my-label}
\end{figure}
Am I missing something? Is there a more simple/elegant solution? Preferably directly usable with the \includegraphics command without creating the additional \calculatedScale.

Runaway argument? scale=\fpeval {2*\myscale }]{your-image} \end {document} ! Paragraph ended before \Gin@iii was complete.. Is there anything that might went wrong with the\fpeval{}command? – Veger May 22 '13 at 13:44graphicxpackage for keyval syntax: I've edited the answer. – Joseph Wright May 22 '13 at 13:53Undefined control sequence,Missing number, treated as zeroandIllegal unit of measure (pt inserted). Withscale=0.7all errors disappear. Is there another problem with the syntax? – Veger May 22 '13 at 14:13expl3is too old, it does not have\fp_eval:n. – Bruno Le Floch May 22 '13 at 14:23