--- loncom/xml/lontexconvert.pm 2005/02/28 19:08:11 1.62
+++ loncom/xml/lontexconvert.pm 2006/03/27 20:40:42 1.71
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# TeX Conversion Module
#
-# $Id: lontexconvert.pm,v 1.62 2005/02/28 19:08:11 albertel Exp $
+# $Id: lontexconvert.pm,v 1.71 2006/03/27 20:40:42 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);
@@ -69,17 +70,6 @@ sub init_tth {
}
}
-sub header {
- $errorstring='';
- my $time=time;
- &init_tth();
- return &Apache::lonxml::xmlbegin().
- "\n
\n".
- &Apache::lonxml::fontsettings().
- &Apache::lonmenu::registerurl(undef,'tex').
- "\n\n";
-}
-
# ================================================================== Conversion
$Apache::lontexconvert::messedup=0;
@@ -98,8 +88,8 @@ sub convert_real {
$Apache::lontexconvert::messedup=1;
die &mt("TeX unconverted due to errors");
};
- alarm($Apache::lonnet::perlvar{'lonScriptTimeout'});
- if ($ENV{'browser.mathml'}) {
+ &Apache::lonxml::start_alarm();
+ if ($env{'browser.mathml'}) {
$xmlstring=&tth::ttm($$texstring);
$xmlstring=~s/\