--- loncom/xml/londefdef.pm 2002/10/08 15:35:22 1.91 +++ loncom/xml/londefdef.pm 2002/10/28 19:20:15 1.96 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.91 2002/10/08 15:35:22 sakharuk Exp $ +# $Id: londefdef.pm,v 1.96 2002/10/28 19:20:15 sakharuk Exp $ # # # Copyright Michigan State University Board of Trustees @@ -330,7 +330,6 @@ sub end_m { #--
tag sub start_body { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; -# my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { if (!$Apache::lonxml::registered) { @@ -846,7 +845,7 @@ EDITBUTTON $currentstring .= $token->[4]; } elsif ($target eq 'tex') { if ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') { - $currentstring .= '\vskip 0 mm'; + $currentstring .= '\vskip 0.2 mm'; } } elsif ($target eq 'latexsource') { $currentstring .= '\\'; @@ -1413,7 +1412,7 @@ sub start_table { if ($signature) { my $NumberEmptyLength = $how_many_columns - $filled_columns; my $SpacePerColumn = '(\textwidth '.$available_space.')/'.$NumberEmptyLength; - $output =~ s/\$SpacePerColumn/$SpacePerColumn/g; + $output =~ s/\$SpacePerColumn/$SpacePerColumn - 4 mm/g; } $Apache::londefdef::table[-1]{'output'} .= $header_of_table.$output.$Apache::londefdef::table[-1]{'hinc'}.'\end{tabular}\vskip 0 mm '; if ($#Apache::londefdef::table > 0) { @@ -1553,7 +1552,8 @@ sub start_table { if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { - my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval); + my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval); + &image_replication($src); $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); #if original gif/jpg file exist do following: if (-e $src) { @@ -1591,7 +1591,7 @@ sub start_table { if (-e $newsrc) { #eps counterpart for image exist if ($path) { - $currentstring .= '\noindent\graphicspath{{'.$path.'}}\fbox{\includegraphics[width='.$width_param.' mm]{'.$file.'}} '; + $currentstring .= '\vskip 1 mm \noindent\graphicspath{{'.$path.'}}\fbox{\includegraphics[width='.$width_param.' mm]{'.$file.'}} '; } } else { #there is no eps counterpart for image - check for ps one @@ -1600,7 +1600,7 @@ sub start_table { #ps counterpart for image exist $file =~ s/\.eps$/\.ps/; if ($path) { - $currentstring .= '\noindent\graphicspath{{'.$path.'}}\fbox{\includegraphics[width='.$width_param.' mm]{'.$file.'}} '; + $currentstring .= '\vskip 1 mm \noindent\graphicspath{{'.$path.'}}\fbox{\includegraphics[width='.$width_param.' mm]{'.$file.'}} '; } } else { #there aren't eps or ps - so create eps @@ -1608,7 +1608,7 @@ sub start_table { my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout.dat"; $temp_file = Apache::File->new('>>'.$filename); print $temp_file "$src\n"; - $currentstring .= '\graphicspath{{/home/httpd/prtspool/}}\fbox{\includegraphics[width='.$width_param.' mm]{'.$file.'}} '; + $currentstring .= '\vskip 1 mm \graphicspath{{/home/httpd/prtspool/}}\fbox{\includegraphics[width='.$width_param.' mm]{'.$file.'}} '; } } } else { @@ -1617,8 +1617,7 @@ sub start_table { if ($alt) { $currentstring .= ' '.$alt.' '; } else { - #there are no image and alt attribute - $currentstring .= ' THE ORIGINAL PROBLEM CONTAINS EMPTY IMG TAG WITHOUT IMAGE AND ALT ATTRIBUTE '; + #