Diff for /loncom/xml/londefdef.pm between versions 1.363 and 1.364

version 1.363, 2007/04/06 10:33:37 version 1.364, 2007/04/06 10:41:45
Line 1985  sub start_table { Line 1985  sub start_table {
     } else {       } else { 
  $TeXwidth = $textwidth;   $TeXwidth = $textwidth;
     }      }
  } else {   }
     $Apache::londefdef::table[-1]{'forcedtablewidth'} = 1;   # if the width is specified as a % it is converted to an absolute width.
         }   # otherwise.. just plugged right in the hash
  # This stuff looks a bit hokey..  
  # Percentage width is actually given as an absolute width..  
  # so what's the difference?  
  #  
  if ($TeXwidth=~/%/) {   if ($TeXwidth=~/%/) {
     $Apache::londefdef::table[-1]{'percent'}=1;  
     $TeXwidth=~/(\d+)/;      $TeXwidth=~/(\d+)/;
             $Apache::londefdef::table[-1]{'width'}=$1*$textwidth/100;              $Apache::londefdef::table[-1]{'width'}=$1*$textwidth/100;
  } else {   } else {
     $Apache::londefdef::table[-1]{'forcedtablewidth'} = 1; #  may or may not need this?  
     $Apache::londefdef::table[-1]{'width'}=$TeXwidth;      $Apache::londefdef::table[-1]{'width'}=$TeXwidth;
  }   }
         #  In the end, however the table width cannot be wider than $textwidth...          #  In the end, however the table width cannot be wider than $textwidth...
Line 2229  sub end_table { Line 2224  sub end_table {
  }   }
     }      }
  }   }
         #use all available width if it is defined in % or as TeXwidth          # use all available width or specified width as if not specified,
         if (($Apache::londefdef::table[-1]{'percent'}==1) || ($Apache::londefdef::table[-1]{'forcedtablewidth'}==1)) {   # the specified width gets defaulted to the available width.
     my $current=0;   
     for (my $i=0;$i<=$#fwidth;$i++) {     my $current=0; 
  $current+=$fwidth[$i];   for (my $i=0;$i<=$#fwidth;$i++) {  
     }      $current+=$fwidth[$i];
     my $coef=$Apache::londefdef::table[-1]{'width'}/$current;   }
     for (my $i=0;$i<=$#fwidth;$i++) {     my $coef=$Apache::londefdef::table[-1]{'width'}/$current;
  $fwidth[$i]*=$coef;   for (my $i=0;$i<=$#fwidth;$i++) {  
     }      $fwidth[$i]*=$coef;
  }   }
         #removing of empty columns if allowed          #removing of empty columns if allowed
         my $permission=&Apache::lonxml::get_param('TeXDropEmptyColumns',$parstack,$safeeval,undef,0);          my $permission=&Apache::lonxml::get_param('TeXDropEmptyColumns',$parstack,$safeeval,undef,0);

Removed from v.1.363  
changed lines
  Added in v.1.364


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