Diff for /loncom/xml/londefdef.pm between versions 1.165 and 1.166

version 1.165, 2003/08/22 16:44:47 version 1.166, 2003/08/26 14:40:03
Line 323  sub start_title { Line 323  sub start_title {
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $currentstring .= '\keephidden{'    $currentstring .= '\keephidden{Title of the document:  ' 
     }      }
     if ($target eq 'meta') {      if ($target eq 'meta') {
  $currentstring='<title>';   $currentstring='<title>';
Line 1776  sub end_table { Line 1776  sub end_table {
     }      }
  }   }
  #continues trying estimate the width of raw data   #continues trying estimate the width of raw data
   # $currentstring.=' SSS '.$Apache::londefdef::table[-1]{'lengthrow'}[0].' FFF '; ####for test only
  my @length_raw_row = split(/,/,$Apache::londefdef::table[-1]{'lengthrow'}[0]);   my @length_raw_row = split(/,/,$Apache::londefdef::table[-1]{'lengthrow'}[0]);
  for (my $in=1;$in<=$Apache::londefdef::table[-1]{'row_number'};$in++) {   for (my $in=1;$in<=$Apache::londefdef::table[-1]{'row_number'};$in++) {
     my @length_row = split(/,/,$Apache::londefdef::table[-1]{'lengthrow'}[$in]);      my @length_row = split(/,/,$Apache::londefdef::table[-1]{'lengthrow'}[$in]);
   #    $currentstring.=' SSS '.$Apache::londefdef::table[-1]{'lengthrow'}[$in].' FFF '; ####for test only
     for (my $jn=0;$jn<=$#length_row;$jn++) {      for (my $jn=0;$jn<=$#length_row;$jn++) {
  if ($length_raw_row[$jn]<$length_row[$jn]) {$length_raw_row[$jn]=$length_row[$jn];}   if ($length_raw_row[$jn]<$length_row[$jn]) {$length_raw_row[$jn]=$length_row[$jn];}
     }      }
Line 1831  sub end_table { Line 1833  sub end_table {
     return $currentstring;      return $currentstring;
 }  }
   
 #-- <tr> tag  #-- <tr> tag (end tag optional)
 sub start_tr {  sub start_tr {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';      my $currentstring = '';
Line 1868  sub end_tr { Line 1870  sub end_tr {
     return $currentstring;      return $currentstring;
 }  }
   
 #-- <td> tag  #-- <td> tag (end tag optional)
 sub start_td {  sub start_td {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';      my $currentstring = '';
Line 1927  sub end_td_tex { Line 1929  sub end_td_tex {
     $Apache::londefdef::table[-1]{'TeXlength'} .= $1.',';      $Apache::londefdef::table[-1]{'TeXlength'} .= $1.',';
     $Apache::londefdef::table[-1]{'length'} .= '0,';      $Apache::londefdef::table[-1]{'length'} .= '0,';
  } else {     } else {  
     $data=~s/^\s+(\S.*)/$1/;      $data=~s/^\s+(\S.*)/$1/; 
     $data=~s/(.*\S)\s+$/$1/;      $data=~s/(.*\S)\s+$/$1/;
     my $current_length=2*length($data);      $data=~s/(\s)+/$1/;
       my $current_length=0;
       if ($data=~/\\vskip/) {
                   my $newdata=$data;
    $newdata=~s/\\vskip \d*\.?\d*\s*mm/THISISJUSTTEMPORARYSEPARATOR/g;
    my @newdata=split(/THISISJUSTTEMPORARYSEPARATOR/,$newdata);
    foreach my $elementdata (@newdata) {
       $elementdata=~s/^\s+(\S.*)/$1/; 
       $elementdata=~s/(.*\S)\s+$/$1/;
       $elementdata=~s/(\s)+/$1/;
       my $lengthnewdata=1.8*length($elementdata);
       if ($lengthnewdata>$current_length) {$current_length=$lengthnewdata;}
    }
       } else {
    $current_length=1.8*length($data);
       }
     $Apache::londefdef::table[-1]{'length'} .= $current_length.',';      $Apache::londefdef::table[-1]{'length'} .= $current_length.',';
     $Apache::londefdef::table[-1]{'TeXlength'} .= '0,';      $Apache::londefdef::table[-1]{'TeXlength'} .= '0,';
  }           }        
Line 1953  sub end_td { Line 1970  sub end_td {
     return $currentstring;      return $currentstring;
 }  }
   
 #-- <th> tag  #-- <th> tag (end tag optional)
 sub start_th {  sub start_th {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';      my $currentstring = '';
Line 3107  sub end_tbody { Line 3124  sub end_tbody {
     return $currentstring;      return $currentstring;
 }  }
   
 #-- <tfoot> tag  #-- <tfoot> tag (end tag optional)
 sub start_tfoot {  sub start_tfoot {
     my ($target,$token) = @_;      my ($target,$token) = @_;
     my $currentstring = '';      my $currentstring = '';
Line 3126  sub end_tfoot { Line 3143  sub end_tfoot {
     return $currentstring;      return $currentstring;
 }  }
   
 #-- <thead> tag  #-- <thead> tag (end tag optional)
 sub start_thead {  sub start_thead {
     my ($target,$token) = @_;      my ($target,$token) = @_;
     my $currentstring = '';      my $currentstring = '';

Removed from v.1.165  
changed lines
  Added in v.1.166


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