--- loncom/xml/londefdef.pm 2003/11/15 12:46:41 1.191 +++ loncom/xml/londefdef.pm 2004/01/12 15:44:30 1.193 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.191 2003/11/15 12:46:41 albertel Exp $ +# $Id: londefdef.pm,v 1.193 2004/01/12 15:44:30 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -84,8 +84,7 @@ sub end_output { sub start_m { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; my $currentstring = ''; - my $inside = &Apache::lonxml::get_all_text("/m",$parser,$style); - $inside=~s---g; + my $inside = &Apache::lonxml::get_all_text_unbalanced("/m",$parser); if ($target eq 'web' || $target eq 'analyze') { $Apache::lonxml::prevent_entity_encode++; $inside ='\\documentstyle{article}'.$inside; @@ -2118,7 +2117,7 @@ sub start_img { $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); &image_replication($src); #if original gif/jpg/png file exist do following: - if (-e $src) { + if (-e $src) { #defines the default size of image my $image = Image::Magick->new; my $current_figure = $image->Read($src); @@ -2173,6 +2172,8 @@ sub start_img { $temp_file = Apache::File->new('>>'.$filename); print $temp_file "$src\n"; $newsrc=~s/\/home\/httpd\/html\/res//; + $newsrc=~s/\/home\/([^\/]*)\/public_html\//\/$1\//; + $newsrc=~s/\/\.\//\//; $newsrc=~s/\/([^\/]+)\.(ps|eps)/\//; $currentstring .= '\vskip 1 mm \graphicspath{{/home/httpd/prtspool'.$newsrc.'}}\includegraphics[width='.$width_param.' mm]{'.$file.'} '; }