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

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 04 Jun 2005 20:48:34 -0000


albertel		Sat Jun  4 16:48:34 2005 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  - send the paper type to psnup so it gets it more righter
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.81 loncom/interface/printout.pl:1.82
--- loncom/interface/printout.pl:1.81	Mon May  9 05:54:02 2005
+++ loncom/interface/printout.pl	Sat Jun  4 16:48:33 2005
@@ -418,7 +418,10 @@
 	      my $ps_file = my $tempo_file = $1.'temporar.ps';
 	      my $pdf_file = $1.'.pdf';
 	      if ($laystyle eq 'album' and $numberofcolumns eq '2') {
-		  $comma = "psnup -2 -s1.0 $new_name_file";
+		  my $papera=$paper;
+                  if ($papera eq 'letter') {$papera='';}
+		  if ($papera ne '') {$papera='-p'.$papera;}
+		  $comma = "psnup $papera -2 -s1.0 $new_name_file";
 		  &busy_wait_command("$comma $tempo_file 1>/dev/null 2>/dev/null",
 				     "for $status_statement now Modifying PS layout",
 				     \%prog_state,$tempo_file); 
@@ -488,13 +491,13 @@
 	      $new_name_file =~ m/^(.*)\./;
 	      my $ps_file = my $tempo_file = $1.'temporar.ps';
 	      my $pdf_file = $1.'.pdf';
+	      $papera=~s/t/p/;
 	      if ($laystyle eq 'album' and $numberofcolumns eq '2') {
-		  $comma = "psnup -2 -s1.0 $new_name_file";
+		  $comma = "psnup $papera -2 -s1.0 $new_name_file";
 		  &busy_wait_command("$comma $tempo_file 1>/dev/null 2>/dev/null",
 				     "for $status_statement now Modifying PS layout",
 				     \%prog_state,$tempo_file);
 	      } elsif ($laystyle eq 'book' and $numberofcolumns eq '2') {
-		  $papera=~s/t/p/;
 		  $comma = 'pstops '.$papera.' "2:0+1(0.48w,0)"';
 		  &busy_wait_command("$comma $new_name_file $tempo_file 1>/dev/null 2>/dev/null",
 				     "for $status_statement now Modifying PS layout",