--- loncom/interface/lonprintout.pm 2006/03/23 22:32:10 1.433
+++ loncom/interface/lonprintout.pm 2006/05/24 10:49:04 1.438
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.433 2006/03/23 22:32:10 albertel Exp $
+# $Id: lonprintout.pm,v 1.438 2006/05/24 10:49:04 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1322,7 +1322,6 @@ ENDPART
$resources_printed .= $urlp.':';
&Apache::lonxml::remember_problem_counter();
-
$texversion.=&Apache::lonnet::ssi($urlp,%form);
if ($urlp=~/\.page$/) {
($texversion,my $number_of_columns_page) = &page_cleanup($texversion);
@@ -1671,13 +1670,14 @@ ENDPART
$selectionmade,
$helper->{'VARS'}->{'ANSWER_TYPE'});
}
- #changes page's parameters for the one column output
- if ($numberofcolumns == 1) {
- $result =~ s/\\textwidth\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\textwidth= $helper->{'VARS'}->{'pagesize.width'} $helper->{'VARS'}->{'pagesize.widthunit'} /;
- $result =~ s/\\textheight\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\textheight $helper->{'VARS'}->{'pagesize.height'} $helper->{'VARS'}->{'pagesize.heightunit'} /;
- $result =~ s/\\evensidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\evensidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
- $result =~ s/\\oddsidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\oddsidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
- }
+ &Apache::lonnet::logthis("Resetting page e.g. height -> $helper->{'VARS'}->{'pagesize.height'}");
+ &Apache::lonnet::logthis("Before: $result \n--------------------------\n");
+ $result =~ s/\\textwidth\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\textwidth= $helper->{'VARS'}->{'pagesize.width'} $helper->{'VARS'}->{'pagesize.widthunit'} /;
+ $result =~ s/\\textheight\s*=?\s*-?\d*\.?\d*\s*(cm|mm|in)/\\textheight $helper->{'VARS'}->{'pagesize.height'} $helper->{'VARS'}->{'pagesize.heightunit'} /;
+ $result =~ s/\\evensidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\evensidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
+ $result =~ s/\\oddsidemargin\s*=\s*-?\d*\.?\d*\s*(cm|mm|in)/\\oddsidemargin= $helper->{'VARS'}->{'pagesize.lmargin'} $helper->{'VARS'}->{'pagesize.lmarginunit'} /;
+
+ &Apache::lonnet::logthis("After: $result \n----------------------------------\n");
#-- writing .tex file in prtspool
my $temp_file;
@@ -2234,7 +2234,6 @@ ALL_PROBLEMS
How should the results be printed?
How do you want assignments split into PDF files?
How do you want assignments split into PDF files?
' . $self->{ERROR_MSG} . '
';
}
+ my $width = 18;
+ my $format = $helper->{VARS}->{$self->{'formatvar'}};
+ if (substr($format, 2, 1) ne '1') {
+ $width = 9;
+ }
+
$result .= <
Width: | -+ |