--- loncom/interface/lonprintout.pm 2006/07/31 10:32:00 1.469 +++ loncom/interface/lonprintout.pm 2006/07/31 22:19:21 1.470 @@ -2,7 +2,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.469 2006/07/31 10:32:00 foxr Exp $ +# $Id: lonprintout.pm,v 1.470 2006/07/31 22:19:21 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3030,9 +3030,16 @@ sub render { } } - $result .= <How should each column be formatted?

@@ -3074,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(); @@ -3107,7 +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; @@ -3149,6 +3156,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) {