version 1.6, 2002/07/29 22:06:38
|
version 1.10, 2002/10/25 13:37:00
|
Line 99 sub footer {
|
Line 99 sub footer {
|
|
|
# ------------------------------------------------------------ Message display |
# ------------------------------------------------------------ Message display |
|
|
|
sub to_convert { |
|
my ($string) = @_; |
|
$string=~s/\<br\s*\/*\>//g; |
|
return &converted(\$string); |
|
} |
|
|
sub msgtexconverted { |
sub msgtexconverted { |
my $message=shift; |
my $message=shift; |
|
|
|
#FIXME this crap needs to go but right now the -L option might be |
|
#ignored if this isn;t the first time the tth engine is used |
|
#thus the \\document class crap, it makes sure we init the LaTeX stuff |
if ($ENV{'browser.mathml'}) { |
if ($ENV{'browser.mathml'}) { |
&tth::ttminit(); |
&tth::ttminit(); |
|
&tth::ttmoptions("-L"); |
} else { |
} else { |
&tth::tthinit(); |
&tth::tthinit(); |
|
&tth::tthoptions("-L"); |
} |
} |
$message=~s/(\$[^\$]+\$)/&converted(\$1)/ge; |
$message=~s/(\$\$.+?\$\$)/&to_convert("\\documentclass{article}".$1)/ge; |
$message=~s/(\\\[[^\]]+\])/&converted(\$1)/ge; |
$message=~s/(\$.+?\$)/&to_convert("\\documentclass{article}".$1)/ge; |
return $message; |
$message=~s/(\\\(.+?\\\))/&to_convert("\\documentclass{article}".$1)/ge; |
|
$message=~s/(\\\[.+?\\\])/&to_convert("\\documentclass{article}".$1)/ge; |
|
return $message.$errorstring; |
} |
} |
|
|
1; |
1; |