[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm

foxr lon-capa-cvs@mail.lon-capa.org
Tue, 15 Mar 2005 11:26:34 -0000


foxr		Tue Mar 15 06:26:34 2005 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  Defect 3058 - need to also transmogrify spaces in the filename itself.
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.262 loncom/xml/londefdef.pm:1.263
--- loncom/xml/londefdef.pm:1.262	Tue Mar 15 06:20:49 2005
+++ loncom/xml/londefdef.pm	Tue Mar 15 06:26:34 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.262 2005/03/15 11:20:49 foxr Exp $
+# $Id: londefdef.pm,v 1.263 2005/03/15 11:26:34 foxr Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -2506,9 +2506,11 @@
 	    my ($height_param,$width_param)=
 		&image_size($src,0.3,$parstack,$safeeval);
 	    my $destpath = $path;
-	    $destpath    =~ s/ /\_/; # Spaces in path cause LaTex to vomit.
+	    $destpath    =~ s/ /\_/g; # Spaces in path cause LaTex to vomit.
+	    my $destfile = $file;
+	    $destfile    =~ s/ /\_/g;
 	    $currentstring .= '\graphicspath{{'.$destpath.'}}'
-		.'\includegraphics[width='.$width_param.' mm,height='.$height_param.'mm]{'.$file.'} ';
+		.'\includegraphics[width='.$width_param.' mm,height='.$height_param.'mm]{'.$destfile.'} ';
 
 	    #    If there's an alignment specification we need to honor it here.
 	    #    For the horizontal alignments, we will also honor the