version 1.14, 2003/02/03 18:03:53
|
version 1.15.2.1, 2003/03/17 16:52:28
|
Line 116 sub footer {
|
Line 116 sub footer {
|
sub to_convert { |
sub to_convert { |
my ($string) = @_; |
my ($string) = @_; |
$string=~s/\<br\s*\/?\>/ /g; |
$string=~s/\<br\s*\/?\>/ /g; |
|
$string=&HTML::Entities::decode($string); |
return &converted(\$string); |
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"); |
if ($ENV{'browser.unicode'}) { |
|
&tth::ttmoptions('-L -u1'); |
|
} else { |
|
&tth::ttmoptions('-L -u0'); |
|
} |
} else { |
} else { |
&tth::tthinit(); |
&tth::tthinit(); |
&tth::tthoptions("-L"); |
if ($ENV{'browser.unicode'}) { |
|
&tth::tthoptions('-L -u1'); |
|
} else { |
|
&tth::tthoptions('-L -u0'); |
|
} |
} |
} |
$message=~s/(\$\$.+?\$\$)/&to_convert("\\documentclass{article}".$1)/ge; |
$message=~s/(\$\$.+?\$\$)/&to_convert($1)/ge; |
$message=~s/(\$.+?\$)/&to_convert("\\documentclass{article}".$1)/ge; |
$message=~s/(\$.+?\$)/&to_convert($1)/ge; |
$message=~s/(\\\(.+?\\\))/&to_convert("\\documentclass{article}".$1)/ge; |
$message=~s/(\\\(.+?\\\))/&to_convert($1)/ge; |
$message=~s/(\\\[.+?\\\])/&to_convert("\\documentclass{article}".$1)/ge; |
$message=~s/(\\\[.+?\\\])/&to_convert($1)/ge; |
return $message.$errorstring; |
return $message.$errorstring; |
} |
} |
|
|