Hello,
I am a newbe in Latex and I'm wondering how to assign a value to a variable. This could then be useful to give every figure a constant figure width, for example. This is what I am trying to do
\newcommand{\figurewidth}{0.9\textwidth}
% and then later, in the figure enviroment
\begin{figure}
\includegraphics[width=\figurewidth]{dog}
\end{figure}
unfortunately integers do not work with \newcommand. How to do this?
Steven
Graphics, Figures & Tables ⇒ how to assign a value to a variable
NEW: TikZ book now 40% off at Amazon.com for a short time.

how to assign a value to a variable
Just use \newlength{\figurewidth} and then \setlength{\figurewidth}{0.9\textwidth}.
See LaTeX lengths.
See LaTeX lengths.
Re: how to assign a value to a variable
That does the job. Thanks!