--- loncom/xml/lontexconvert.pm 2005/03/01 03:21:05 1.64 +++ loncom/xml/lontexconvert.pm 2005/04/07 06:56:27 1.65 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # TeX Conversion Module # -# $Id: lontexconvert.pm,v 1.64 2005/03/01 03:21:05 albertel Exp $ +# $Id: lontexconvert.pm,v 1.65 2005/04/07 06:56:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -47,21 +47,22 @@ use Apache::lonmsg(); use Apache::lonxml(); use Apache::lonmenu(); use Apache::lonlocal; +use Apache::lonnet; # ====================================================================== Header sub init_tth { - my $options=$ENV{'course.'.$ENV{'request.course.id'}.'.tthoptions'}; - if ($ENV{'browser.mathml'}) { + my $options=$env{'course.'.$env{'request.course.id'}.'.tthoptions'}; + if ($env{'browser.mathml'}) { &tth::ttminit(); - if ($ENV{'browser.unicode'}) { + if ($env{'browser.unicode'}) { &tth::ttmoptions('-L -u1 '.$options); } else { &tth::ttmoptions('-L -u0 '.$options); } } else { &tth::tthinit(); - if ($ENV{'browser.unicode'}) { + if ($env{'browser.unicode'}) { &tth::tthoptions('-L -u1 '.$options); } else { &tth::tthoptions('-L -u0 '.$options); @@ -99,7 +100,7 @@ sub convert_real { die &mt("TeX unconverted due to errors"); }; &Apache::lonxml::start_alarm(); - if ($ENV{'browser.mathml'}) { + if ($env{'browser.mathml'}) { $xmlstring=&tth::ttm($$texstring); $xmlstring=~s/\/\/g; $xmlstring=~s/\/\/g; @@ -184,11 +185,11 @@ sub mimetex_converted { } sub converted { - if ($ENV{'environment.texengine'} eq 'tth') { + if ($env{'environment.texengine'} eq 'tth') { return &tth_converted; - } elsif ($ENV{'environment.texengine'} eq 'jsMath') { + } elsif ($env{'environment.texengine'} eq 'jsMath') { return &jsMath_converted; - } elsif ($ENV{'environment.texengine'} eq 'mimetex') { + } elsif ($env{'environment.texengine'} eq 'mimetex') { return &mimetex_converted; } return &tth_converted; @@ -198,10 +199,10 @@ sub converted { sub footer { my $xmlstring=''; - if ($ENV{'request.state'} eq 'construct') { + if ($env{'request.state'} eq 'construct') { $xmlstring.='
'.$errorstring.'
'; } else { - &Apache::lonmsg::author_res_msg($ENV{'request.filename'},$errorstring); + &Apache::lonmsg::author_res_msg($env{'request.filename'},$errorstring); } # -------------------------------------------------------------------- End Body $xmlstring.=&Apache::lonxml::xmlend(); @@ -220,7 +221,7 @@ sub to_convert { sub smiley { my $expression=shift; - if ($ENV{'browser.imagesuppress'} eq 'on') { return $expression; } + if ($env{'browser.imagesuppress'} eq 'on') { return $expression; } my %smileys=('\:\-\)' => 'smiley', '8\-\)' => 'coolsmile', '8\-(I|\|)' => 'coolindiff',