Return to londefdef.pm CVS log | Up to [LON-CAPA] / loncom / xml |
version 1.37, 2001/12/28 20:41:01 | version 1.40, 2002/01/17 17:42:34 |
---|---|
Line 45 package Apache::londefdef; | Line 45 package Apache::londefdef; |
use strict; | use strict; |
use Apache::lonxml; | use Apache::lonxml; |
sub BEGIN { | BEGIN { |
&Apache::lonxml::register('Apache::londefdef',('m','html','head','map','select','option','input','textarea','form','meta','title','body','center','b','strong','table','dt','h1','h2','h3','h4','h5','h6','cite','i','address','dd','dl','dir','ol','ul','menu','dfn','kbd','tt','code','em','q','p','br','big','small','basefont','font','s','sub','strike','sup','hr','a','li','u','output','param','applet','img','embed','tr','td','allow','frameset')); | &Apache::lonxml::register('Apache::londefdef',('m','html','head','map','select','option','input','textarea','form','meta','title','body','center','b','strong','table','dt','h1','h2','h3','h4','h5','h6','cite','i','address','dd','dl','dir','ol','ul','menu','dfn','kbd','tt','code','em','q','p','br','big','small','basefont','font','s','sub','strike','sup','hr','a','li','u','output','param','applet','img','embed','tr','td','allow','frameset')); |
Line 101 sub end_m { | Line 101 sub end_m { |
#-- <html> tag | #-- <html> tag |
sub start_html { | sub start_html { |
my ($target,$token) = @_; | my ($target,$token) = @_; |
my $currentstring = ''; | my $currentstring = ''; |
if ($ENV{'browser.mathml'}) { | |
&tth::ttminit(); | |
} else { | |
&tth::tthinit(); | |
} | |
if ($target eq 'web') { | if ($target eq 'web') { |
$currentstring = &Apache::lonxml::xmlbegin(). | $currentstring = &Apache::lonxml::xmlbegin(). |
&Apache::lonxml::fontsettings(); | &Apache::lonxml::fontsettings(); |
Line 346 sub end_m { | Line 351 sub end_m { |
$currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"'; | $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"'; |
} | } |
$currentstring.='>'; | $currentstring.='>'; |
if ($ENV{'request.state'} ne 'published') { | |
$currentstring.=(<<EDITBUTTON); | |
<form method="post"> | |
<input type="submit" name="showmode" value="Edit" /> | |
</form> | |
EDITBUTTON | |
} | |
} elsif ($target eq 'tex') { | } elsif ($target eq 'tex') { |
$currentstring = '\begin{document}'; | $currentstring = '\begin{document}'; |
} | } |