Dvipng generated images is already available to the public for WeBWorK.
Here's some basic information. Using dvipng gives a faster way of
generating images in typeset mode. If a single problem has a huge
number of images, it is actually faster than tth. For a just couple of
images in a problem (which is more typical), it is slower than tth, but
Dvipng mode will leave its images on the disk and reuse them if they
are there. So, the first time a problem is rendered WeBWorK generates
the images. Hitting the submit button does need to create them again.
For our system, I have a daily cron job which deletes everything which
has not been accessed recently in CourseNames/html/tmp/*, including
images produced by dvipng. If a student works on a problem one day, and
then comes back 2 days later, we end up regenerating the images. With
more students, we might want to clean less frequently, or use a
different parameter for "accessed recently" above (I use 20 minutes).
Implimenting this for your system takes two things: replacing relevant
WeBWorK files and adding the additional software. The WeBWorK files are
all in the Rochester CVS. At this point, I would advise get a whole new
set for installation. Dvipng mode is not the only change since 1.7 and
changes in one file may require a newer version of another file.
The extra software can be installed separately. It consists of "dvipng"
itself, which takes a dvi file and converts each page into a png image,
and "preview", which is a latex package that can be used to produce the
special dvi file (with one formula per page, and with page sizes
cropped tightly to the formulas).
I would recommend installing dvipng/preview first since it will not
interfere with current system operation. Depending on how similar your
system is to mine, this could take as little as a few minutes (or as
long as, well, don't ask). Ultimately, we will have a better
installation process. You can download it from
It is near the top of the page.
Let me know about successes/difficulties in installing the parts from my page.
<| Post or View Comments |>