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

foxr lon-capa-cvs@mail.lon-capa.org
Mon, 19 Jun 2006 22:30:17 -0000


foxr		Mon Jun 19 18:30:17 2006 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  \pagebreak is more reliable at breaking pages than \newpage
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.102 loncom/interface/printout.pl:1.103
--- loncom/interface/printout.pl:1.102	Mon Jun 19 17:40:29 2006
+++ loncom/interface/printout.pl	Mon Jun 19 18:30:15 2006
@@ -769,12 +769,15 @@
     close(PSFILE);
 
     #  If 2 columns, max_pages must go to an even number of columns:
+
+    &Apache::lonnet::logthis("Before 2 col adjust max-pages = $max_pages");
    
     if ($num_columns == 2) {
 	if ($max_pages % 2) {
 	    $max_pages++;
 	}
     }
+    &Apache::lonnet::logthis("after adjust: $max_pages");
     
     #  Now rewrite the LaTex file, substituting our \special
     #  with an appropriate number of \newpage directives.
@@ -795,8 +798,9 @@
 	    # End of student replace with 0 or more newpages.
 	    
 	    my $addlines = $max_pages - $pages_in_student[$student_number];
+	    &Apache::lonnet::logthis("student: $pages_in_student[$student_number] add: $addlines");
 	    while($addlines)  {
-		print LATEXOUT '\newpage';
+		print LATEXOUT '\pagebreak';
 		$addlines--;
 	    }