latex variable image size based on text width
The best way to have an image in latex with width depending on text width in my opinion is:
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.4 \textwidth]{path/to/image.eps}
\end{center}
\caption{Sample image description}
\label{fig:image_sample}
\end{figure}
Use of the [H] makes the image not float around. To use it you have to download and include the library: http://www.ctan.org/tex-archive/help/Catalogue/entries/float.html
Notice the “width=0.4 \textwidth”, which makes the images width 40% times the text width.