--- loncom/xml/londefdef.pm 2003/07/25 10:44:36 1.155 +++ loncom/xml/londefdef.pm 2003/07/31 21:00:55 1.157 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.155 2003/07/25 10:44:36 www Exp $ +# $Id: londefdef.pm,v 1.157 2003/07/31 21:00:55 sakharuk Exp $ # # # Copyright Michigan State University Board of Trustees @@ -25,8 +25,7 @@ # /home/httpd/html/adm/gpl.txt # # http://www.lon-capa.org/ -# -# Copyright for TtHfunc and TtMfunc by Ian Hutchinson. +## Copyright for TtHfunc and TtMfunc by Ian Hutchinson. # TtHfunc and TtMfunc (the "Code") may be compiled and linked into # binary executable programs or libraries distributed by the # Michigan State University (the "Licensee"), but any binaries so @@ -1079,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 ($tag eq 'b') {$signal=0;}} + if ($signal) {$currentstring .= '\par ';} } return $currentstring; } @@ -2011,6 +2012,7 @@ sub start_img { } elsif ($width ne '') { $width_param = $width*$scaling; } + if ($width_param > $ENV{'form.textwidth'}) {$width_param =0.95*$ENV{'form.textwidth'}} my $file; my $path; if ($src =~ m!(.*)/([^/]*)$!) {