--- loncom/xml/londefdef.pm 2003/07/28 19:18:02 1.156 +++ loncom/xml/londefdef.pm 2003/08/01 13:35:20 1.158 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.156 2003/07/28 19:18:02 sakharuk Exp $ +# $Id: londefdef.pm,v 1.158 2003/08/01 13:35:20 sakharuk Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1078,12 +1078,14 @@ sub end_q { #--

tag sub start_p { - my ($target,$token) = @_; + my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { - $currentstring .= '\par '; + my $signal=1; + foreach my $tag (@$tagstack) {if (lc($tag) eq 'b') {$signal=0;}} + if ($signal) {$currentstring .= '\par ';} } return $currentstring; } @@ -1969,10 +1971,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); @@ -1980,12 +1981,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