version 1.31, 2004/03/04 15:40:22
|
version 1.33, 2004/03/04 15:46:43
|
Line 42
|
Line 42
|
package Apache::lontexconvert; |
package Apache::lontexconvert; |
|
|
use strict; |
use strict; |
use tth; |
use tth(); |
use vars qw($errorstring); |
use vars qw($errorstring); |
use Apache(); |
use Apache(); |
use Apache::lonmsg; |
use Apache::lonmsg(); |
use Apache::lonxml; |
use Apache::lonxml(); |
use Apache::lonmenu; |
use Apache::lonmenu(); |
|
use Apache::lonlocal; |
|
|
# ====================================================================== Header |
# ====================================================================== Header |
|
|
Line 86 sub header {
|
Line 87 sub header {
|
$Apache::lontexconvert::messedup=0; |
$Apache::lontexconvert::messedup=0; |
sub converted { |
sub converted { |
my $texstring=shift; |
my $texstring=shift; |
my $xmlstring='[UNDISPLAYABLE]'; |
my $xmlstring=&mt('[UNDISPLAYABLE]'); |
if ($Apache::lontexconvert::messedup) { |
if ($Apache::lontexconvert::messedup) { |
return '[TeX Unconverted Due To Previous Errors]'; |
return &mt('[TeX Unconverted Due To Previous Errors]'); |
} |
} |
eval(<<'ENDCONV'); |
eval(<<'ENDCONV'); |
{ |
{ |
Line 108 sub converted {
|
Line 109 sub converted {
|
$xmlstring=~s/\s*$//; |
$xmlstring=~s/\s*$//; |
} |
} |
ENDCONV |
ENDCONV |
|
if ($@) { |
|
$errorstring.=&mt("Evaluation Error ").$@; |
|
$Apache::lontexconvert::messedup=1; |
|
} |
if ($Apache::lontexconvert::messedup || &tth::tthmessedup()) { |
if ($Apache::lontexconvert::messedup || &tth::tthmessedup()) { |
&Apache::lonnet::logthis("Trying to kill myself"); |
&Apache::lonnet::logthis("Trying to kill myself"); |
$Apache::lontexconvert::messedup=1; |
$Apache::lontexconvert::messedup=1; |