Diff for /loncom/interface/lonprintout.pm between versions 1.469 and 1.470

version 1.469, 2006/07/31 10:32:00 version 1.470, 2006/07/31 22:19:21
Line 3030  sub render { Line 3030  sub render {
  }   }
     }      }
   
     $result .= <<ELEMENTHTML;      # Adjust margin for LaTeX margin: .. requires units == cm or in.
   
       if ($size{'margin_unit'} eq 'in') {
    $size{'margin'} += 1;
       }  else {
    $size{'margin'} += 2.54;
       }
       $result .= <<ELEMENTHTML;
   
     
   
 <p>How should each column be formatted?</p>  <p>How should each column be formatted?</p>
   
Line 3074  ELEMENTHTML Line 3081  ELEMENTHTML
     return $result;      return $result;
 }  }
   
 # If the user didn't select 1 column, skip this state.  
 sub preprocess {  sub preprocess {
     my $self = shift;      my $self = shift;
     my $helper = Apache::lonhelper::getHelper();      my $helper = Apache::lonhelper::getHelper();
Line 3107  sub preprocess { Line 3114  sub preprocess {
   
  foreach my $dim ('width', 'height', 'lmargin') {   foreach my $dim ('width', 'height', 'lmargin') {
     my ($value, $units) = split(/ /, $size{$dim});      my ($value, $units) = split(/ /, $size{$dim});
               
     &Apache::lonnet::logthis("$dim : $value : $units");      &Apache::lonnet::logthis("$dim : $value : $units");
           
     $helper->{VARS}->{"$var.".$dim}      = $value;      $helper->{VARS}->{"$var.".$dim}      = $value;
Line 3149  sub postprocess { Line 3156  sub postprocess {
     }      }
     if ($lmargin !~  /^-?[0-9]*(\.[0-9]*)?$/) {      if ($lmargin !~  /^-?[0-9]*(\.[0-9]*)?$/) {
         $error .= "Invalid left margin; please type only a number.<br />\n";          $error .= "Invalid left margin; please type only a number.<br />\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) {      if (!$error) {

Removed from v.1.469  
changed lines
  Added in v.1.470


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>