version 1.8, 2005/08/16 16:31:14
|
version 1.10, 2006/04/10 22:30:11
|
Line 50 use tth;
|
Line 50 use tth;
|
|
|
# ================================================================ Main Handler |
# ================================================================ Main Handler |
|
|
|
sub footer { |
|
my ($errorstring) = @_; |
|
my $xmlstring=''; |
|
if ($env{'request.state'} eq 'construct') { |
|
$xmlstring.='<address>'. |
|
$Apache::lontexconvert::errorstring.'</address>'; |
|
} else { |
|
&Apache::lonmsg::author_res_msg($env{'request.filename'}, |
|
$Apache::lonxml::errorstring); |
|
} |
|
# -------------------------------------------------------------------- End Body |
|
$xmlstring.=&Apache::lonxml::xmlend(); |
|
return $xmlstring; |
|
} |
|
|
sub handler { |
sub handler { |
my $r=shift; |
my ($r)= @_; |
my @texcontents; |
my @texcontents; |
my $texstring; |
my $texstring; |
|
|
Line 77 sub handler {
|
Line 92 sub handler {
|
|
|
# --------------------------------------------------------------- Render Output |
# --------------------------------------------------------------- Render Output |
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['mode', |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
'buttons']); |
['texengine','inhibitmenu']); |
|
|
$r->print(&Apache::lontexconvert::header()); |
|
$r->print( |
&Apache::lontexconvert::init_tth(); |
'<body bgcolor="#FFFFFF" onLoad="'. |
|
&Apache::lonmenu::loadevents(). |
$r->print(&Apache::loncommon::start_page(undef,undef, |
'" onUnload="'. |
{'bgcolor' => '#FFFFFF', |
&Apache::lonmenu::unloadevents(). |
'force_register' => 1, |
'">'); |
'only_body' => |
if ($env{'form.buttons'} ne 'no') { |
($env{'form.inhibitmenu'} |
$r->print(&Apache::lonmenu::menubuttons(undef,'web',1)); |
eq 'yes'), })); |
} |
|
&Apache::lontexconvert::jsMath_reset(); |
$r->print(&Apache::lontexconvert::converted(\$texstring, |
if ($env{'form.mode'} eq 'jsMath') { |
$env{'form.texengine'})); |
$r->print(&Apache::lontexconvert::jsMath_header()); |
$r->print(&footer()); |
} |
|
$r->print(&Apache::lontexconvert::converted(\$texstring,$env{'form.mode'})); |
|
$r->print('</body>'); |
|
$r->print(&Apache::lontexconvert::footer()); |
|
|
|
return OK; |
return OK; |
} |
} |