I am trying to compose an exam with a figure as part of the question. However, I am having trouble using the standard \includegraphics command with pdflatex. I can not specify the arguments to \includegraphics in the square brackets. If I remove the square bracket (optional arguments), then it compiles without issue. I've tried wrapping it in the \fullwidth{} command to no avail.
Here is a minimal example:
\documentclass[addpoints,11pt]{exam}
\usepackage{graphics}
\begin{document}
\begin{questions}
\question[] True/False questions.
\begin{parts}
\part[2] True or False.\vspace*{1in}
An image:
\begin{figure}
\includegraphics[width=\textwidth]{file-which-exists}
\end{figure}
\end{parts}
\end{questions}
\end{document}`

\linewidthinstead of\textwidthmight be more appropriate. The reason for this is that\textwidthmay be fixed across your entire document, while\linewidthmay vary, depending on the environment you're in. For example, inenumerateoritemize(typical for question-style documents like an examination), the\linewidthis smaller than\textwidth(due to the added indent). This leads to a better horizontal fit on the page. – Werner Oct 1 '11 at 0:02