--- loncom/xml/londefdef.pm 2008/05/28 01:32:59 1.389 +++ loncom/xml/londefdef.pm 2008/09/20 01:32:33 1.390.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.389 2008/05/28 01:32:59 www Exp $ +# $Id: londefdef.pm,v 1.390.2.1 2008/09/20 01:32:33 raeburn Exp $ # # # Copyright Michigan State University Board of Trustees @@ -113,7 +113,7 @@ sub start_m { my $display=&Apache::lonxml::get_param('display',$parstack,$safeeval); $currentstring = &Apache::lontexconvert::converted(\$inside,$display); if ($Apache::lontexconvert::errorstring) { - my $errormsg='
'.&HTML::Entities::encode($Apache::lontexconvert::errorstring,'<>&"').'
occured while attempting to convert this TeX:
';
+	    my $errormsg='
'.&HTML::Entities::encode($Apache::lontexconvert::errorstring,'<>&"').'
occurred while attempting to convert this TeX:
';
 	    $tex = &HTML::Entities::encode($tex,'<>&"');
 	    my ($linenumber) =
 		($Apache::lontexconvert::errorstring =~ /Line (\d+)/);
@@ -3016,7 +3016,7 @@ sub start_img {
 
 	# &Apache::lonxml::debug("LaTeX rendering = $latex_rendering image file: $src");
 
-	#if original gif/jpg/png file exist do following:
+	#if original bmp/gif/jpg/png file exist do following:
 	my $origsrc=$src;
 	my ($path,$file) = &get_eps_image($src);
 	# &Apache::lonnet::logthis("Image source: $src result: $path $file");
@@ -4417,8 +4417,8 @@ sub get_eps_image {
 	&Apache::lonnet::repcopy($orig_src); # Failure is not completely fatal.
     }
     &Apache::lonxml::debug("get_eps_image: Original image: $orig_src");
-    my ($spath, $sname, $sext) = &fileparse($src, qr/\.(gif|png|jpg|jpeg)/i);
-    $src=~s/\.(gif|png|jpg|jpeg)$/\.eps/i;
+    my ($spath, $sname, $sext) = &fileparse($src, qr/\.(bmp|gif|png|jpg|jpeg)/i);
+    $src=~s/\.(bmp|gif|png|jpg|jpeg)$/\.eps/i;
     $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
     &Apache::lonxml::debug("Filelocation gives: $src");
     if (! -e $src) {
@@ -4479,7 +4479,7 @@ sub eps_generation {
     my $temp_file = Apache::File->new('>>'.$filename); 
     print $temp_file "$src\n";
     my $newsrc = $src;
-    $newsrc =~ s/(\.gif|\.jpg|\.jpeg)$/\.eps/i;
+    $newsrc =~ s/(\.bmp|\.gif|\.jpg|\.jpeg)$/\.eps/i;
     $newsrc=~s{/home/httpd/html/res}{};
     $newsrc=~s{/home/($LONCAPA::username_re)/public_html/}{/$1/};
     $newsrc=~s{/\./}{/};