[LON-CAPA-cvs] cvs: loncom /interface printout.pl

foxr lon-capa-cvs@mail.lon-capa.org
Tue, 19 Dec 2006 10:39:28 -0000


foxr		Tue Dec 19 05:39:28 2006 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  Re-fix typo on first unlink of missfonts.log and move the unlinks
  around so that the  missfonts.log file is removed even after latex
  regenerates them becuse it's looking for an exact match (while
  dvisp will accept a font match with different resolution).
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.118 loncom/interface/printout.pl:1.119
--- loncom/interface/printout.pl:1.118	Mon Dec 18 16:03:10 2006
+++ loncom/interface/printout.pl	Tue Dec 19 05:39:28 2006
@@ -559,7 +559,6 @@
 	      if (-e $missfonts_file) {
 		  #print("<br />Missing fonts file exists\n");
 		  &create_missing_fonts($missfonts_file);
-		  unlink($missfonts_file, \%prog_state);
 		  &busy_wait_command("$comma $name_file 1>/dev/null 2>/dev/null",
 				     "for $status_statement dvips generated missing fonts",
 				     \%prog_state, $new_name_file);
@@ -606,6 +605,8 @@
 #	  unlink @garb;
 	      unlink $duefile;
 	      print "<a href=\"/prtspool/$pdf_file\">Your PDF document</a>";
+	      unlink $missfonts_file;
+
 	  }
 	  if ($advanced_role) {  
 	      print "<br /><br />";
@@ -627,6 +628,7 @@
 	      print "<a href=\"$texfile\">Your original LaTeX file </a></big></b>";
 	      print "\n";
 	  }
+
       } else {
 	  #LaTeX successfully parsed tex file 
 	  $name_file =~ s/\.tex/\.dvi/;
@@ -668,7 +670,6 @@
 	  if (-e $missfonts_file) {
 	      #print("<br />Missing fonts file exists\n");
 	      &create_missing_fonts($missfonts_file);
-	      unlink($missfonts_file);
 	      &busy_wait_command("$comma $name_file 1>/dev/null 2>/dev/null",
 				 "for $status_statement dvips generated missing fonts",
 				 \%prog_state, $new_name_file);
@@ -759,6 +760,8 @@
 	      print "<a href=\"/prtspool/$pdf_file\">$link_text - click here to download pdf</a>";
 	      print "\n";
 	  }
+	  unlink $missfonts_file;
+
       }  
   } else {
       print "LaTeX file $texfile was not created successfully";