--- loncom/xml/londefdef.pm 2006/11/06 23:06:19 1.342 +++ loncom/xml/londefdef.pm 2006/11/06 23:45:00 1.343 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.342 2006/11/06 23:06:19 foxr Exp $ +# $Id: londefdef.pm,v 1.343 2006/11/06 23:45:00 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -2860,9 +2860,7 @@ sub start_img { my ($height_param,$width_param)= &image_size($origsrc,0.3,$parstack,$safeeval); my $destpath = $path; - $destpath =~ s/ /\_/g; # Spaces in path cause LaTex to vomit. my $destfile = $file; - $destfile =~ s/ /\_/g; my $size; if ($width_param) { $size.='width='.$width_param.' mm,'; } if ($height_param) { $size.='height='.$height_param.' mm]'; } @@ -4245,7 +4243,6 @@ sub get_eps_image { $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); &Apache::lonxml::debug("Filelocation gives: $src"); if (! -e $src) { - # &Apache::lonnet::logthis("$src does not exist...repcopying"); &Apache::lonxml::debug("$src does not exist"); if (&Apache::lonnet::repcopy($src) ne 'ok' ) { &Apache::lonxml::debug("Repcopy of $src failed (1)"); @@ -4257,7 +4254,6 @@ sub get_eps_image { &Apache::lonxml::debug("repcopy of $src ... $didrepcopy"); if ( (not -e $src) || ($didrepcopy ne 'ok')) { - # &Apache::lonnet::logthis("queuing $orig_src for dynamic eps gen"); &Apache::lonxml::debug("Failed to find or replicate $src"); #if replication failed try to produce eps file dynamically @@ -4276,10 +4272,9 @@ sub get_eps_image { } } + } } else { -# &Apache::lonnet::logthis("$src exists. queueing for copy."); -# &Apache::lonnet::logthis("Got eps already.. queue for copy"); # If the postscript file has spaces in its name, # LaTeX will gratuitiously vomit. Therefore # queue such files for copy with " " replaced by "_". @@ -4287,13 +4282,13 @@ sub get_eps_image { my $newsrc = $orig_src; $newsrc =~ s|(.*)/res/|/home/httpd/html/res/|; open(FILE,">>/home/httpd/prtspool/$env{'user.name'}_$env{'user.domain'}_printout.dat"); -# &Apache::lonnet::logthis("Queueing $newsrc for copy"); - print FILE "$newsrc\n"; + print FILE "$src\n"; close FILE; $src=~s|/home/httpd/html/res|/home/httpd/prtspool|; $src=~s|/home/([^/]*)/public_html/|/home/httpd/prtspool/$1/|; } my ($path,$file)=($src=~m|(.*)/([^/]*)$|); + $file =~ s/ /\_/g; &Apache::lonxml::debug("get_eps_image returning: $path / $file
"); return ($path.'/',$file); }