Forum archive 2000-2006

Jason Edgecombe - Display Problems in WebWork 1.8

Jason Edgecombe - Display Problems in WebWork 1.8

by Arnold Pizer -
Number of replies: 0
inactiveTopicDisplay Problems in WebWork 1.8 topic started 12/9/2002; 9:52:17 AM
last post 12/18/2002; 3:19:39 PM
userJason Edgecombe - Display Problems in WebWork 1.8  blueArrow
12/9/2002; 9:52:17 AM (reads: 1386, responses: 3)
Hi everyone,

I am testing WebWork 1.8 on a Redhat 7.2 box. Webwork is working, but I have a couple of problems. In typeset mode, the formulas appear with a black border on the left and bottom of the imgae, but not the right or top. In typeset2 mode, eveything appears fine, but when using multiple choice, the answers are too close together. When using exponents, the exponent of one answer could be misinterpreted at the subscript of the answer above it.

<| Post or View Comments |>


userArnold K. Pizer - Re: Display Problems in WebWork 1.8  blueArrow
12/11/2002; 10:28:21 AM (reads: 1649, responses: 0)
Hi Jason,

The problem with black frames or borders around LaTeX2HTML images (i.e. typeset mode) is a well known LaTeX2HTML problem. Supposedly it's due to using an old version of netpbm.

Look at the instructions http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$390 which say to add one "-verbose" and three "-black" to pstoimg.

However, depending on your version, the way pstoimg is written may be different so where you add these fixes has changed. Thus if the above is not applicable in your case, try the following which are based on Revision 1.11 1999/10/25 of pstoimg.

Edit pstoimg (which you might find at /usr/bin/pstoimg) as follows:

In lines 1086 and 1088 add "-black" to the $croparg argument in the two places indicated below:

  # RRM: Remove justification bars
$EXTRA_CROP =~ s/h/bt/gi; # crop horizontally
$EXTRA_CROP =~ s/v/rl/gi; # crop vertically
while ($EXTRA_CROP =~ /([atblrs])/gi) {
my $edge = $1;
my $croparg = '';
if($edge =~ /b/i) {
$croparg = '-bot -black ';
} elsif($edge =~ /[tlr]/i) {
$croparg = "-$edge -black ";
} elsif($edge =~ /s/i) {

Next in line 1098 also add "-black" as indicated:

 

      my ($type,$width,$height) = get_image_geometry($in);
next unless($type); # skip if no geometry
if(&do_cmd_norename("$PNMCROP -bot -black< $in",$tmp)) {
my ($type,$width,$height2) = get_image_geometry($tmp);
if($type && ($height - $height2) < 3 ) {
# command succeeded and shaved less than 3 rows

Concerning your trouble with dvipng (i.e. typeset2 mode), can you give us a reference to a specific problem in the library which illustrates the trouble?

Thanks.

Arnie

<| Post or View Comments |>


userJohn Jones - Re: Display Problems in WebWork 1.8  blueArrow
12/11/2002; 12:34:05 PM (reads: 1691, responses: 0)
Hi,

On the black borders, the information on how to correct it should be right. I have observed another cause for them (aside from old netpbm). If you update your version of netpbm utilities after latex2html has been installed, then you may get the problem. The installation process for latex2html tries to adjust to the version of netpbm on your system. So ironically, updating netpbm can cause the problem. On the bright side, editting pstoimg should still fix the problem.

John

<| Post or View Comments |>


userJohn Jones - Re: Display Problems in WebWork 1.8  blueArrow
12/18/2002; 3:19:39 PM (reads: 1606, responses: 0)
Hi Jason,

I just checked in new versions of PGbasicmacros.pl and PGchoicemacros.pl to CVS which should fix the problem you noticed when using dvipng.

The cause, for those who are interested, is that dvipng produces images which are tightly cropped around the image. Latex2html produces images with a buffer of blank space around the printed material. The spacing between lines in latex2html mode is really from the images themselves. The changes refered to above adds vertical space in the known instances where you really want more.

John

<| Post or View Comments |>