--- loncom/interface/lonprintout.pm 2006/07/31 10:30:52 1.468 +++ loncom/interface/lonprintout.pm 2006/07/31 22:53:07 1.471 @@ -1,7 +1,8 @@ +# # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.468 2006/07/31 10:30:52 foxr Exp $ +# $Id: lonprintout.pm,v 1.471 2006/07/31 22:53:07 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3029,9 +3030,16 @@ sub render { } } - $result .= <How should each column be formatted?

@@ -3073,7 +3081,7 @@ ELEMENTHTML return $result; } -# If the user didn't select 1 column, skip this state. + sub preprocess { my $self = shift; my $helper = Apache::lonhelper::getHelper(); @@ -3106,9 +3114,7 @@ sub preprocess { foreach my $dim ('width', 'height', 'lmargin') { my ($value, $units) = split(/ /, $size{$dim}); - - &Apache::lonnet::logthis("$dim : $value : $units"); - + $helper->{VARS}->{"$var.".$dim} = $value; $helper->{VARS}->{"$var.".$dim.'unit'} = $units; @@ -3148,6 +3154,14 @@ sub postprocess { } if ($lmargin !~ /^-?[0-9]*(\.[0-9]*)?$/) { $error .= "Invalid left margin; please type only a number.
\n"; + } else { + # Adjust for LaTeX 1.0 inch margin: + + if ($env{"form.${var}.lmarginunit"} eq "in") { + $helper->{VARS}->{$var.'.lmargin'} = $lmargin - 1; + } else { + $helper->{VARS}->{$var.'.lmargin'} = $lmargin - 2.54; + } } if (!$error) {