[LON-CAPA-users] prettyprint going to pdf question

lon-capa-users@mail.lon-capa.org lon-capa-users@mail.lon-capa.org
Sun, 18 Jun 2006 00:39:05 -0700


Hi Brew,
	 I think you should place your variable inside <display></display>
tags.

i.e.

<startouttext />The answer is <display>$right</display> <endouttext />

Cheers,
Ray




On Sat, 17 Jun 2006 17:32:50 -0400 lon-capa-users@mail.lon-capa.org wrote:
> 
> Hi,
> 
> I am chasing down a minor issue, which I assume is some formatting issue I
> am ignoring.
> 
> In a problem, I format a number for displaying (either in the text of the
> problem, or in a multiple choice foil) as prettyprint "2e".
> 
> In html, this looks fine.
> In the printed pdf file, I get something like
>      \ensuremath{2.25\times 10^{5}}
> every time I use any variable formatted in this way.
> 
> Sample code is shown below.
> I have jsMath mode turned on by default, not the usual "default" setting
> for math equations.
> 
> Any clues are welcome,
> brew
> 
> ==============================================================
> <problem>
> <script type="loncapa/perl">#Enter the computations here
> $mass = &random (1e5,4e5,0.25e5);
> $right=&prettyprint($mass ,"2e");
> </script>
> 
> ....
> <startouttext />The answer is $right <endouttext />
> 
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> 


Ray Batchelor
Senior Lecturer
Department of Chemistry
Simon Fraser University
Burnaby, BC
V5A 1S6

604-291-5635