--- loncom/xml/londefdef.pm 2005/03/14 23:48:57 1.261 +++ loncom/xml/londefdef.pm 2005/03/15 11:26:34 1.263 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.261 2005/03/14 23:48:57 foxr Exp $ +# $Id: londefdef.pm,v 1.263 2005/03/15 11:26:34 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -2505,8 +2505,12 @@ sub start_img { &Apache::lonxml::debug("$src exists"); my ($height_param,$width_param)= &image_size($src,0.3,$parstack,$safeeval); - $currentstring .= '\graphicspath{{'.$path.'}}' - .'\includegraphics[width='.$width_param.' mm,height='.$height_param.'mm]{'.$file.'} '; + my $destpath = $path; + $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]{'.$destfile.'} '; # If there's an alignment specification we need to honor it here. # For the horizontal alignments, we will also honor the