Setting the image base
If graphics files will be incorporated into some of the
questions in your question bank, then a path must be provided
to the location of the folder in your EDU class web site
where the graphics files will eventually reside. This is the
purpose of the \setImageBase
macro.
It is a good idea to set up a separate image location for
each testbank that you create. For example, if your EDU
classname were calculus205
, and you planned to
place your graphics files in the chapter1
folder
of your EDU class web site, then you would
use
\setImageBase{../classes/calculus205/chapter1/}
The final slash is optional.
The \image
macro
This is the preferred method for including graphics in a
question. During preview processing—that is, running
LaTeX locally on your file to preview its contents—if
the file is available locally as an Encapsulated Postscript
(eps or epsf) file, then it will be included in the dvi file
(\image
will call \epsfig
to include the graphic).
Warning: Do
not explicitly call \epsfig
.
Directly using \epsfig
will not
guarantee that proper EDU code results. The same holds for
\includegraphics
.
Here are the necessary steps to follow to place an image:
- Use the
\setImageBase
macro to define the path to your images. - Include graphics in a question using the
\image
macro.\image[ext]{filename}
- ext option
- The extension to be appended to the filename (the second argument) when the testbank is converted to EDU format. If the second argument is a full filename with extension, the first argument is ignored.
- filename
- The filename of the graphic.
Notes
- While the
\epsfig
macro allows various options, such as "width=...
",\image
does not support any options. Encapsulated Postscript files will appear in full size in the dvi file. - The default extension, to be appended to
filenames in the case that the optional argument is omitted
from
\image
, is.jpg
. The\setDefaultExt
macro allows you to customize the default extension. - The conversion tools provide no graphic conversion capabilities. External means are necessary to produce web-friendly graphics and to place them on the server.