--- loncom/interface/printout.pl 2004/08/18 18:56:46 1.67 +++ loncom/interface/printout.pl 2004/09/09 15:30:49 1.69 @@ -1,7 +1,7 @@ #!/usr/bin/perl # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc. # -# $Id: printout.pl,v 1.67 2004/08/18 18:56:46 sakharuk Exp $ +# $Id: printout.pl,v 1.69 2004/09/09 15:30:49 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -86,7 +86,7 @@ END #do we have figures? if (-e $figfile) { my %done_conversion; - my $temporary_file=IO::File->new($figfile) || die "Couldn't open file for reading: $!\n"; + my $temporary_file=IO::File->new($figfile) || die "Couldn't open fig file $figfile for reading: $!\n"; my @content_of_file = <$temporary_file>; close $temporary_file; my $noteps; @@ -210,7 +210,7 @@ foreach $texfile (@texfile) { } #to create index #Do we have a latex error in the log file? my $logfilename = $texfile; $logfilename =~ s/\.tex$/\.log/; - my $temporary_file=IO::File->new($logfilename) || die "Couldn't open file for reading: $!\n"; + my $temporary_file=IO::File->new($logfilename) || die "Couldn't open log file $logfilename for reading: $!\n"; my @content_of_file = <$temporary_file>; close $temporary_file; my $body_log_file = join(' ',@content_of_file); @@ -245,7 +245,7 @@ foreach $texfile (@texfile) { print "Your log file "; print "\n"; #link tooriginal LaTeX file (included according Michael Hamlin desire) - my $tex_temporary_file=IO::File->new($texfile) || die "Couldn't open file for reading: $!\n"; + my $tex_temporary_file=IO::File->new($texfile) || die "Couldn't open tex file $texfile for reading: $!\n"; my @tex_content_of_file = <$tex_temporary_file>; close $tex_temporary_file; my $body_tex_file = join(' ',@tex_content_of_file); @@ -325,7 +325,7 @@ foreach $texfile (@texfile) { print "Your log file "; print "\n"; #link tooriginal LaTeX file (included according Michael Hamlin desire) - my $tex_temporary_file=IO::File->new($texfile) || die "Couldn't open file for reading: $!\n"; + my $tex_temporary_file=IO::File->new($texfile) || die "Couldn't open tex file $texfile for reading: $!\n"; my @tex_content_of_file = <$tex_temporary_file>; close $tex_temporary_file; my $body_tex_file = join(' ',@tex_content_of_file); @@ -380,9 +380,9 @@ foreach $texfile (@texfile) { 'a6'=>'<< /PageSize [298.75 421.1] >> setpagedevice', }; if ($paper ne 'letter') { - open(FFH,'<',$ps_file) || die "Couldn't open file for reading: $!\n"; + open(FFH,'<',$ps_file) || die "Couldn't open ps file $ps_file for reading: $!\n"; my $new_ps_file='new'.$ps_file; - open(FFHS,'>',$new_ps_file) || die "Couldn't open file for reading: $!\n"; + open(FFHS,'>',$new_ps_file) || die "Couldn't open new ps file $new_ps_file for reading: $!\n"; print FFHS $addtoPSfile->{$paper}."\n"; while () { print FFHS $_; @@ -406,7 +406,7 @@ foreach $texfile (@texfile) { my @garb = ($texlog,$texaux,$texdvi,$texps); # unlink @garb; unlink $duefile; - print "$link_text"; + print "$link_text - click here to download pdf"; print "\n"; } }