--- loncom/xml/londefdef.pm 2003/07/31 21:00:55 1.157 +++ loncom/xml/londefdef.pm 2003/08/22 16:47:44 1.158.4.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.157 2003/07/31 21:00:55 sakharuk Exp $ +# $Id: londefdef.pm,v 1.158.4.1 2003/08/22 16:47:44 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -394,7 +394,7 @@ sub start_meta { } sub end_meta { - my ($target,$token,$tagstack,$parstack,$parser) = @_; + my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; if ($target eq 'web') { my $args=''; @@ -403,8 +403,11 @@ sub end_meta { $currentstring = $token->[4]; } } elsif ($target eq 'tex') { - $currentstring=&Apache::lonxml::endredirection(); - $currentstring=''; + my $content=&Apache::lonxml::get_param('content',$parstack,$safeeval); + my $name=&Apache::lonxml::get_param('name',$parstack,$safeeval); + if ((not defined $content) && (not defined $name)) { + &Apache::lonxml::startredirection(); + } } return $currentstring; } @@ -1084,7 +1087,7 @@ sub start_p { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { my $signal=1; - foreach my $tag (@$tagstack) {if ($tag eq 'b') {$signal=0;}} + foreach my $tag (@$tagstack) {if (lc($tag) eq 'b') {$signal=0;}} if ($signal) {$currentstring .= '\par ';} } return $currentstring; @@ -1971,10 +1974,9 @@ sub start_img { my $width_param = ''; my $height_param = ''; my $scaling = .3; - if ($target eq 'web') { if ($ENV{'browser.imagesuppress'} ne 'on') { - $currentstring = $token->[4]; + $currentstring.= $token->[4]; } else { my $alttag= &Apache::lonxml::get_param ('alt',$parstack,$safeeval,undef,1); @@ -1982,12 +1984,11 @@ sub start_img { $alttag=&Apache::lonmeta::alttag ($Apache::lonxml::pwd[-1],$src); } - $currentstring='[IMAGE: '.$alttag.']'; + $currentstring.='[IMAGE: '.$alttag.']'; } } elsif ($target eq 'tex') { $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); &image_replication($src); - #if original gif/jpg/png file exist do following: if (-e $src) { #defines the default size of image