[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Tue, 24 Jun 2003 14:56:16 -0000
sakharuk Tue Jun 24 10:56:16 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Single column printing is restored for portrait layout. Couple of bugs about this are fixed.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.194 loncom/interface/lonprintout.pm:1.195
--- loncom/interface/lonprintout.pm:1.194 Tue Jun 24 10:07:27 2003
+++ loncom/interface/lonprintout.pm Tue Jun 24 10:56:16 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.194 2003/06/24 14:07:27 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.195 2003/06/24 14:56:16 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -761,12 +761,12 @@
$result = &page_format_transformation($papersize,$laystyle,$numberofcolumns,$helper->{'VARS'}->{'PRINT_TYPE'},$result,$helper->{VARS}->{'assignment'});
$result = &latex_corrections($number_of_columns,$result);
#changes page's parameters for the one column output
-# if ($numberofcolumns == 1) {
-# $result =~ s/\\textwidth= 9cm/\\textwidth= $ENV{'form.width'}/;
-# $result =~ s/\\textheight 25\.9cm/\\textheight $ENV{'form.height'}/;
-# $result =~ s/\\evensidemargin = -0\.57in/\\evensidemargin= $ENV{'form.leftmargin'}/;
-# $result =~ s/\\oddsidemargin = -0\.57in/\\oddsidemargin= $ENV{'form.leftmargin'}/;
-# }
+ if ($numberofcolumns == 1) {
+ $result =~ s/\\textwidth= 9cm/\\textwidth= $helper->{'VARS'}->{'pagesize.width'} $helper->{'VARS'}->{'pagesize.widthunit'} /;
+ $result =~ s/\\textheight 25\.9cm/\\textheight $helper->{'VARS'}->{'pagesize.height'} $helper->{'VARS'}->{'pagesize.heightunit'} /;
+ $result =~ s/\\evensidemargin = -0\.57in/\\evensidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
+ $result =~ s/\\oddsidemargin = -0\.57in/\\oddsidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
+ }
#-- writing .tex file in prtspool
my $temp_file;
my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout_".time."_".rand(10000000).".tex";