version 1.21, 2003/03/31 16:34:08
|
version 1.24, 2003/06/23 21:28:59
|
Line 83 sub converted {
|
Line 83 sub converted {
|
my $texstring=shift; |
my $texstring=shift; |
my $xmlstring='[UNDISPLAYABLE]'; |
my $xmlstring='[UNDISPLAYABLE]'; |
if ($Apache::lontexconvert::messedup) { |
if ($Apache::lontexconvert::messedup) { |
return '[Uncoverted Due To Previous Errors]'; |
return '[TeX Uncoverted Due To Previous Errors]'; |
} |
} |
eval(<<'ENDCONV'); |
eval(<<'ENDCONV'); |
{ |
{ |
Line 98 sub converted {
|
Line 98 sub converted {
|
$xmlstring=&tth::tth($$texstring); |
$xmlstring=&tth::tth($$texstring); |
$errorstring.=&tth::ttherror(); |
$errorstring.=&tth::ttherror(); |
} |
} |
|
$xmlstring=~s/^\s*//; |
|
$xmlstring=~s/\s*$//; |
} |
} |
ENDCONV |
ENDCONV |
if ($Apache::lontexconvert::messedup || &tth::tthmessedup()) { |
if ($Apache::lontexconvert::messedup || &tth::tthmessedup()) { |
Line 127 sub footer {
|
Line 129 sub footer {
|
|
|
sub to_convert { |
sub to_convert { |
my ($string) = @_; |
my ($string) = @_; |
$string=~s/\<br\s*\/?\>/ /g; |
$string=~s/\<br\s*\/?\>/ /gs; |
|
$string=~s/\s/ /gs; |
$string=&HTML::Entities::decode($string); |
$string=&HTML::Entities::decode($string); |
return &converted(\$string); |
return &converted(\$string); |
} |
} |
Line 174 sub msgtexconverted {
|
Line 177 sub msgtexconverted {
|
&tth::tthoptions('-L -u0'); |
&tth::tthoptions('-L -u0'); |
} |
} |
} |
} |
$message=~s/(\$\$.+?\$\$)/&to_convert($1)/ge; |
$message=~s/(\$\$.+?\$\$)/&to_convert($1)/gse; |
$message=~s/(\$.+?\$)/&to_convert($1)/ge; |
$message=~s/(\$.+?\$)/&to_convert($1)/gse; |
$message=~s/(\\\(.+?\\\))/&to_convert($1)/ge; |
$message=~s/(\\\(.+?\\\))/&to_convert($1)/gse; |
$message=~s/(\\\[.+?\\\])/&to_convert($1)/ge; |
$message=~s/(\\\[.+?\\\])/&to_convert($1)/gse; |
return &smiley($message).$errorstring; |
if (wantarray) { |
|
return (&smiley($message),$errorstring); |
|
} else { |
|
return &smiley($message).$errorstring; |
|
} |
} |
} |
|
|
1; |
1; |