version 1.12, 2002/10/28 20:40:25
|
version 1.15, 2003/02/05 22:50:44
|
Line 37
|
Line 37
|
# to any other parties under any circumstances. |
# to any other parties under any circumstances. |
# |
# |
# 05/29/00,05/30,10/11,10/20 Gerd Kortemeyer |
# 05/29/00,05/30,10/11,10/20 Gerd Kortemeyer |
# 05/03/2001 Scott Harrison |
|
# 5/4 Gerd Kortemeyer |
# 5/4 Gerd Kortemeyer |
|
|
package Apache::lontexconvert; |
package Apache::lontexconvert; |
Line 55 sub header {
|
Line 54 sub header {
|
my $time=time; |
my $time=time; |
if ($ENV{'browser.mathml'}) { |
if ($ENV{'browser.mathml'}) { |
&tth::ttminit(); |
&tth::ttminit(); |
|
if ($ENV{'browser.unicode'}) { |
|
&tth::ttmoptions('-L -u1'); |
|
} else { |
|
&tth::ttmoptions('-L -u0'); |
|
} |
} else { |
} else { |
&tth::tthinit(); |
&tth::tthinit(); |
|
if ($ENV{'browser.unicode'}) { |
|
&tth::tthoptions('-L -u1'); |
|
} else { |
|
&tth::tthoptions('-L -u0'); |
|
} |
} |
} |
return &Apache::lonxml::xmlbegin(). |
return &Apache::lonxml::xmlbegin(). |
&Apache::lonxml::fontsettings(). |
&Apache::lonxml::fontsettings(). |
Line 113 sub to_convert {
|
Line 122 sub to_convert {
|
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; |
} |
} |
|
|