version 1.2, 2001/05/03 22:54:12
|
version 1.3, 2001/05/04 17:38:22
|
Line 3
|
Line 3
|
# |
# |
# 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 |
# 05/03/2001 Scott Harrison |
|
# 5/4 Gerd Kortemeyer |
|
|
package Apache::lontexconvert; |
package Apache::lontexconvert; |
|
|
Line 10 use strict;
|
Line 11 use strict;
|
use tth; |
use tth; |
use vars qw($errorstring); |
use vars qw($errorstring); |
use Apache::lonmsg; |
use Apache::lonmsg; |
|
use Apache::lonxml; |
|
|
# ====================================================================== Header |
# ====================================================================== Header |
|
|
sub header { |
sub header { |
$errorstring=''; |
$errorstring=''; |
my $time=time; |
my $time=time; |
my $addhead=<<END; |
|
<script language="JavaScript"> |
|
if (window.location.pathname!="/res/adm/pages/menu.html") { |
|
menu=window.open("","LONCAPAmenu"); |
|
menu.currentURL=window.location.pathname; |
|
} |
|
</script> |
|
END |
|
if ($ENV{'browser.mathml'}) { |
if ($ENV{'browser.mathml'}) { |
&tth::ttminit(); |
&tth::ttminit(); |
return '<?xml version="1.0"?>' |
|
.'<?xml-stylesheet type="text/css" href="/adm/MathML/mathml.css"?>' |
|
.'<!DOCTYPE html SYSTEM "/adm/MathML/mathml.dtd" ' |
|
.'[<!ENTITY mathns "http://www.w3.org/1998/Math/MathML">]>' |
|
.'<html xmlns:math="http://www.w3.org/1998/Math/MathML" ' |
|
.'xmlns="http://www.w3.org/TR/REC-html40">' |
|
."<head>$addhead</head>" |
|
."\n"; |
|
} else { |
} else { |
&tth::tthinit(); |
&tth::tthinit(); |
my $headerstring='<html>'; |
|
if ($ENV{'browser.os'} eq 'mac') { |
|
$headerstring.="<head>\n" |
|
.'<meta Content-Type="text/html; charset=x-mac-roman">' |
|
."\n$addhead</head>\n"; |
|
} |
|
else { |
|
$headerstring.="<head>$addhead</head>"; |
|
} |
|
return $headerstring."\n"; |
|
} |
} |
|
return &Apache::lonxml::xmlbegin(). |
|
&Apache::lonxml::fontsettings(). |
|
"\n<head>\n". |
|
&Apache::lonxml::registerurl(). |
|
"\n</head>\n"; |
} |
} |
|
|
# ================================================================== Conversion |
# ================================================================== Conversion |
Line 77 sub footer {
|
Line 58 sub footer {
|
&Apache::lonmsg::author_res_msg($ENV{'request.filename'},$errorstring); |
&Apache::lonmsg::author_res_msg($ENV{'request.filename'},$errorstring); |
} |
} |
# -------------------------------------------------------------------- End Body |
# -------------------------------------------------------------------- End Body |
$xmlstring.='</html>'; |
$xmlstring.=&Apache::lonxml::xmlend(); |
return $xmlstring; |
return $xmlstring; |
} |
} |
|
|