The labelgraphic environment allows you to add text labels to graphics (gif and jpg files).
To add text labels to graphics in your LaTeX question:
Select a location in your EDU class Web site for graphics files. It is recommended that you use a distinct folder for the images in each testbank. Upload the graphic to your class Web site.
Insert the \setImageBase directive near the top of your testbank TeX source file to specify the path to this location. For example, if your EDU classname is calculus205, and your graphics folder is the chapter1 folder of your EDU class Web site, use the directive:
\setImageBase{../classes/calculus205/chapter1/}
Note: The final slash is optional.
To incorporate the image file into a question, use the labelgraphic environment. The \begin{labelgraphic} command takes three arguments:
(i) The name of the image file.
(ii) The width of the image file in pixels.
(iii) The height of the image file in pixels.
To determine the width and height of the graphic, use a third-party graphics application (for example, Microsoft® Paint).
To label the graphic, use the \grlabel macro. The \grlabel macro takes three arguments:
(i) The text of the label.
(ii) The x-coordinate of the label, in pixels.
(iii) The y-coordinate of the label, in pixels.
The x and y-coordinates are measured from the upper left corner of the graphic.
More than one \grlabel command can be used.
Note: Without any \grlabel commands, the labelgraphic environment only incorporates the image file into a question. To include a graphic, it is recommended that you use the \image macro.
\begin{question}{Numeric}
\qutext{A ball is thrown upward from the top of a 40 foot high tower at
an initial velocity of 64 feet/second. The graph of the height of the
ball versus time is shown below. What is the maximum height of the ball
in feet? Express your answer to an accuracy of at least 3 significant
figures.
\begin{labelgraphic}{ball.gif}{250}{200}
\grlabel{time (seconds)}{120}{10}
\grlabel{height (meters)}{10}{100}
\end{labelgraphic}}
\answer{104 ? 1}
\end{question}