--- loncom/interface/printout.pl 2005/03/14 23:51:20 1.73 +++ loncom/interface/printout.pl 2005/03/15 11:19:28 1.74 @@ -1,7 +1,7 @@ #!/usr/bin/perl # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc. # -# $Id: printout.pl,v 1.73 2005/03/14 23:51:20 foxr Exp $ +# $Id: printout.pl,v 1.74 2005/03/15 11:19:28 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -114,12 +114,14 @@ END $eps_f=~/$Apache::lonnet::perlvar{'lonUsersDir'}\/([^\/]+)\/\w\/\w\/\w\/(.+)/; $eps_f = '/home/httpd/prtspool/'.$1.'/'.$2; } + $eps_f =~ s/ /\_/g; # Spaces are problematic for system commands and LaTeX. my $path=$eps_f; - $path=~s/\/([^\/]+)\.eps$//; + $path =~ s/\/([^\/]+)\.eps$//; # print "Final file path: $path "; # Debugging File::Path::mkpath($path,0,0777); $not_eps =~ s/^\s+//; $not_eps =~ s/\s+$//; + $not_eps =~ s/ /\\ /g; if ( exists($done_conversion{$not_eps})) { next; } if ($adv) { my $prettyname=$not_eps; @@ -141,7 +143,9 @@ END } } } - if ($adv) { &Apache::lonhtmlcommon::Close_PrgWin('',\%prog_state); } + if ($adv) { + &Apache::lonhtmlcommon::Close_PrgWin('',\%prog_state); + } unlink($figfile); } #print "$texfile\n"; #name of the tex file for debugging only