Forum archive 2000-2006

Zoran - typeset2 problem

Zoran - typeset2 problem

by Arnold Pizer -
Number of replies: 0
inactiveTopictypeset2 problem topic started 7/16/2003; 11:52:53 AM
last post 8/29/2003; 2:34:08 AM
userZoran - typeset2 problem  blueArrow
7/16/2003; 11:52:53 AM (reads: 4003, responses: 14)
I upgraded WebWork to 1.8 (from 1.7) and everything so far seems to be working fine exept it places all images on seperate lines instead of inline so I don't know if there is a setup file somewhere that controls this behavior. Any hint?

- My output:

If sin A = 4/9 and

pi/2 < A < pi

, then cos A =

 

should be

If sin A = 4/9 and pi/2 < A < pi, then cos A =

 

I am getting "\pi/2 < A < \pi" as an image , and it's OK.

<| Post or View Comments |>


userJohn Jones - Re: typeset2 problem  blueArrow
7/16/2003; 1:06:05 PM (reads: 4362, responses: 0)
Hi,

I have not seen this problem before. Could you post the pg code for the problem?

John

<| Post or View Comments |>


userZoran - Re: typeset2 problem  blueArrow
7/16/2003; 1:48:51 PM (reads: 4312, responses: 0)
OK. Here is the short one (not the one I first sent you). I cut off the answers.

##DESCRIPTION ##KEYWORDS('linear albebra', 'vector space', 'linear transformation') ## ##ENDDESCRIPTION

DOCUMENT(); # This should be the first executable line in the problem.

loadMacros( PG.pl, PGbasicmacros.pl, PGchoicemacros.pl, PGanswermacros.pl, PGgraphmacros.pl, PGnumericalmacros.pl, PGstatisticsmacros.pl );

TEXT(beginproblem()); $showPartialCorrectAnswers = 1;

$d = non_zero_random(2,5,1); $a = non_zero_random(2,5,1); $e = $d*$a -1;

$b = non_zero_random(-4,4,1); $c = non_zero_random(-4,4,1); $f = non_zero_random(-4,4,1); $g = non_zero_random(-4,4,1);

$i = non_zero_random(-4,4,1); $j = random(2,5,1);

$ans1 = ...; $ans2 = ...;

BEGIN_TEXT

$BR If ( T: P_1 rightarrow P_1 ) is a linear transformation such that

( T(1+$a x) = $b + $c x) and ( T($d + $e x) = $f + $g x, ) then

( T($i - $j x) = )\{ans_rule(5)}(+)\{ans_rule(5)}(x).

END_TEXT

ANS(num_cmp($ans1)); ANS(num_cmp($ans2));

ENDDOCUMENT(); # This should be the last executable line in the problem.

<| Post or View Comments |>


userJohn Jones - Re: typeset2 problem  blueArrow
7/16/2003; 2:23:31 PM (reads: 4330, responses: 0)
Hi,

Unfortunately, lots of backslashes get filtered by the discussion board (also double quote marks). So, there is an outside chance that backslashes are somehow involved in the problem. But, this problem worked fine for me.

The next few things I would try are:

  • see if your browser will let you look at the source for the page which has the problem displayed. Some won't because the pages are supposed to expire instantly, but others will. You can see if the page has html forcing the line breaks.
  • look at the images (under html/tmp/png) with xv to make sure they look ok. They may look funny because of the transparent background, but they should look ok aside from that, with the whole image tightly cropped around the math. One guess is that the images are picking up lots of white space, making them extra wide so the browser thinks it needs to wrap the line.
  • test preview/dvipng outside of webwork. One way would be to comment out the line in system/lib/Imagegenerator which cleans up tex files, load a page which needs new images, and then take the latex file. Run latex on it, then dvipng on the result. You should get png files which look nice (no transparent background by default) and they should be small - tightly cropped around the math.

John

<| Post or View Comments |>


userZoran - Re: typeset2 problem  blueArrow
7/16/2003; 5:03:38 PM (reads: 4330, responses: 0)
Hi John.

I found the problem thanx to your suggestion #2, but I don't know how to solve it. Problem is that images are picking up lots of white spaces, for example dimension for an image is 3485x20 pixels. Any suggestion how to correct this?

Regards Zoran.

<| Post or View Comments |>


userJohn Jones - Re: typeset2 problem  blueArrow
7/16/2003; 7:13:49 PM (reads: 4358, responses: 0)
Hi Zoran,

My guess is a problem with the setup for preview/dvipng. Part of what preview does is to set up the tightly cropped images. I will try to input a test file here, but beware of lost backslashes:

 

\documentclass[10pt]{report}



\usepackage[active,textmath,displaymath]{preview}
\begin{document}
Here is \(y=x^2\), and a displayed equation like
\(\displaystyle{ f(z) = \frac{3z+1}{2z-1} .} \)



Finally another inline image \( \Gamma(z) = \int_0^{\infty} t^{z-1} e^{-t}
\, dt\)
.



\end{document}

John

<| Post or View Comments |>


userZoran - Re: typeset2 problem  blueArrow
7/18/2003; 12:44:13 PM (reads: 4413, responses: 0)
Hi John.

You got the point. I generated all three images and they are not looking good from the point of width. Do you know how to change the setup?

Regards Zoran

<| Post or View Comments |>


userArnold K. Pizer - Re: typeset2 problem  blueArrow
7/23/2003; 1:51:45 PM (reads: 4311, responses: 0)
Hi,

In testing WeBWorK 1.9, I downloaded and installed dvipng-0.4 on a Red Hat 9.0 system and had maybe related problems (the images came out as very long white bars). Backing off to version 0.3 solved the problem.

Arnie

<| Post or View Comments |>


userZoran - Re: typeset2 problem  blueArrow
8/21/2003; 12:11:11 PM (reads: 4295, responses: 0)
Hi all.

Sorry for late response. I also lowered my version on dvipng from 0.4 to 0.3 and it's working fine. I am using WebWork 1.8 on RedHat 9.0.

Thanx to John and Arnie for all insight.

Regards Zoran.

<| Post or View Comments |>


userJan-Åke Larsson - Re: typeset2 problem  blueArrow
8/26/2003; 6:27:31 AM (reads: 4338, responses: 0)
Hi there,

Sorry for all the commotion around dvipng 0.4.

Dvipng 0.5 solves this issue (but has a bug in the installation of the docs---which will be fixed in 0.6).

/Jan-Åke

<| Post or View Comments |>


userRobin Cruz - Re: typeset2 problem  blueArrow
8/26/2003; 12:31:13 PM (reads: 4207, responses: 0)
I have another typeset 2 problem. I installed WeBWorK 1.9 on a new machine. I copied over problem sets from a 1.7 version (from an older computer). The sets display fine in formatted-text and typeset modes, but I get a pink page and this error message for any problem with tex code in it when typeset 2 mode is used.

* /usr/local/bin/dvipng -x4000 -bgTransparent -Q6 -mode toshiba -D180 a-prob5image.dvi >>/dev/null 2>>/dev/null -- FAILED in ImageGenerator.pm returned 32512 at /opt/webwork/system/lib//ImageGenerator.pm line 192. ##More details: -------- ImageGenerator::render called at /opt/webwork/system/cgi/cgi-scripts/processProblem8.pl line 470

Help -- rac

<| Post or View Comments |>


userJan-Åke Larsson - Re: typeset2 problem  blueArrow
8/27/2003; 3:34:54 AM (reads: 4250, responses: 0)
What version of dvipng are you using? Just typing

dvipng

(or possibly /usr/local/bin/dvipng) will give you a help text where the version info is included.

/JÅ

<| Post or View Comments |>


userJohn Jones - Re: typeset2 problem  blueArrow
8/28/2003; 10:43:14 AM (reads: 4213, responses: 0)
Hi,

I have not upgraded to version 1.9 yet, so I don't know if there are any special issues there.  I would turn on imageDebugMode in Global.pm, try to generate some images, and then run dvipng by hand on the .dvi file left behind.  You should also be able to run latex on the .tex file left behind.  Look to see if either of those seems to have a problem.  Also, when you run dvipng, try it with  the command line you gave above since that is how WeBWorK is calling it.

John

<| Post or View Comments |>


userRobin Cruz - Re: typeset2 problem  blueArrow
8/28/2003; 10:45:17 AM (reads: 4294, responses: 0)

It is using version 0.4 .

-- rac

<| Post or View Comments |>


userJan-Åke Larsson - Re: typeset2 problem  blueArrow
8/29/2003; 2:34:08 AM (reads: 4289, responses: 0)
I would recommend changing to 0.6, but other than that I don't know. Try John's suggestion.

/JÅ

<| Post or View Comments |>