Diff for /loncom/xml/londefdef.pm between versions 1.357 and 1.358

version 1.357, 2007/03/09 17:10:33 version 1.358, 2007/03/13 13:35:39
Line 1925  sub start_table { Line 1925  sub start_table {
  if ($#Apache::londefdef::table==0) {   if ($#Apache::londefdef::table==0) {
     $textwidth=&recalc($env{'form.textwidth'}); #result is always in mm      $textwidth=&recalc($env{'form.textwidth'}); #result is always in mm
     $textwidth=~/(\d+\.?\d*)/;      $textwidth=~/(\d+\.?\d*)/;
     $textwidth=0.95*$1; #accounts "internal" LaTeX space for table frame      $textwidth=0.85*$1; #accounts "internal" LaTeX space for table frame
  } else {   } else {
     if ($Apache::londefdef::table[-2]{'TeXlen'}[$Apache::londefdef::table[-2]{'row_number'}][$Apache::londefdef::table[-2]{'counter_columns'}]=~/\d/) {      if ($Apache::londefdef::table[-2]{'TeXlen'}[$Apache::londefdef::table[-2]{'row_number'}][$Apache::londefdef::table[-2]{'counter_columns'}]=~/\d/) {
  #the maximum width of nested table is determined by LATeX width of parent cell   #the maximum width of nested table is determined by LATeX width of parent cell
Line 2028  sub end_table { Line 2028  sub end_table {
  $available_space=$available_space-$Apache::londefdef::table[-1]{'TeXlen'}[0][$jn];   $available_space=$available_space-$Apache::londefdef::table[-1]{'TeXlen'}[0][$jn];
     }      }
  }   }
   
         #boundaries for contents columns          #boundaries for contents columns
  my @min_len=();#columns can not be narrower    my @min_len=();#columns can not be narrower 
  my @max_len=();#maximum length of column   my @max_len=();#maximum length of column
Line 2219  sub end_table { Line 2220  sub end_table {
     $Apache::londefdef::table[-1]{'content'}=\@cleaned_table;      $Apache::londefdef::table[-1]{'content'}=\@cleaned_table;
     @fwidth=@cleaned_header;      @fwidth=@cleaned_header;
  }   }
    #  At this time we must be sure the table does not overhang the total width
    #  this can happen due to our 'average width' adjustment.
           #  Total the column widths and see if they are larger than the avail width;
    #  If so scale them down in proportion to their percentage of total width.
   
    my $current_total_width = 0;
    for (my $col = 0; $col < $#fwidth; $col++) {
       $current_total_width = $current_total_width + $fwidth[$col];
    }
   
  #construct header of the table   #construct header of the table
  my $header_of_table = '{'.$Apache::londefdef::table[-1]{'vvinc'};   my $header_of_table = '{'.$Apache::londefdef::table[-1]{'vvinc'};
  for (my $in=0;$in<=$#fwidth;$in++) {   for (my $in=0;$in<=$#fwidth;$in++) {

Removed from v.1.357  
changed lines
  Added in v.1.358


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