--- loncom/interface/lonprintout.pm 2003/06/24 14:07:27 1.194 +++ loncom/interface/lonprintout.pm 2003/06/24 14:56:16 1.195 @@ -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 @@ ENDPART $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";