--- loncom/interface/printout.pl 2002/07/11 20:06:37 1.9 +++ loncom/interface/printout.pl 2002/08/01 18:09:27 1.13 @@ -7,8 +7,8 @@ print "

OUTPUT is in the PDF FILE (se my ($texfile,$laystyle) = split(/&/,$ENV{'QUERY_STRING'}); my $figfile = $texfile; $figfile =~ s/^([^\.]+printout)[^t]+\.tex/$1\.dat/; -my $duefile = $figfile; -$duefile =~ s/\.dat$/\.due/; +my $duefile = $texfile; +$duefile =~ s/^([^\.]+printout)[^t]+\.tex/$1\.due/; if (-e $figfile) { my $temporary_file=IO::File->new($figfile) || die "Couldn't open file for reading: $!\n"; my @content_of_file = <$temporary_file>; @@ -17,9 +17,9 @@ if (-e $figfile) { foreach $not_eps (@content_of_file) { if ($not_eps ne '') { my $eps_f = $not_eps; - $eps_f =~ s/\..*$/\.eps/; + $eps_f =~ s/\.[^.]*$/\.eps/i; $_ = $eps_f; - m/\/(\w+\.eps)/; + m/\/([^\/]+)$/; $eps_f = '/home/httpd/prtspool/'.$1; my $image = Image::Magick->new; $not_eps =~ s/^\s+//; @@ -67,7 +67,6 @@ $texps =~ s/\.tex/\.ps/; my @garb = ($texlog,$texaux,$texdvi,$texps); unlink @garb; unlink $duefile; - print "Your PDF document\n"; print "\n";