--- loncom/interface/printout.pl 2002/05/09 15:46:01 1.7
+++ loncom/interface/printout.pl 2002/07/11 20:06:37 1.9
@@ -6,7 +6,9 @@ print "
\n";
print "OUTPUT is in the PDF FILE (see link below)
\n";
my ($texfile,$laystyle) = split(/&/,$ENV{'QUERY_STRING'});
my $figfile = $texfile;
-$figfile =~ s/\.tex/\.dat/;
+$figfile =~ s/^([^\.]+printout)[^t]+\.tex/$1\.dat/;
+my $duefile = $figfile;
+$duefile =~ s/\.dat$/\.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>;
@@ -64,7 +66,7 @@ $texdvi =~ s/\.tex/\.dvi/;
$texps =~ s/\.tex/\.ps/;
my @garb = ($texlog,$texaux,$texdvi,$texps);
unlink @garb;
-
+unlink $duefile;
print "Your PDF document\n";
print "\n";