Diff for /loncom/xml/londefdef.pm between versions 1.371 and 1.372

version 1.371, 2007/06/26 01:36:48 version 1.372, 2007/07/04 14:02:14
Line 2066  sub end_table { Line 2066  sub end_table {
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring = $token->[2];        $currentstring = $token->[2];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
    my $border =  &Apache::lonxml::get_param('border',$parstack,$safeeval);
  my $inmemory = '';   my $inmemory = '';
  my $output = '';   my $output = '';
  my $WARNING='';   my $WARNING='';
Line 2313  sub end_table { Line 2314  sub end_table {
  #  Do the appropriate magic if this has a colspan   #  Do the appropriate magic if this has a colspan
  #    # 
   
    my $border_char = "";
    if ($border) {
       $border_char = "|";
    }
  my $spanwidth = 0;   my $spanwidth = 0;
  if ($colspan > 1) {   if ($colspan > 1) {
     for (my $spancol = $jn; $spancol < $jn + $colspan; $spancol++) {      for (my $spancol = $jn; $spancol < $jn + $colspan; $spancol++) {
Line 2322  sub end_table { Line 2327  sub end_table {
  $colspan   $colspan
  ."}";   ."}";
     if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') {      if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') {
  $output .= '{|c|}{';   $output .= '{'.$border_char.'c'.$border_char.'}{';
     } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') {      } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') {
  $output .= '{|r|}{';   $output .= '{'.$border_char.'r'.$border_char.'}{';
     }      }
     else {      else {
  $output .= "{|p{$spanwidth mm}|}{";   $output .= '{'.$border_char."p{$spanwidth mm}".$border_char.'}{';
     }      }
           
  } else {   } else {
Line 2343  sub end_table { Line 2348  sub end_table {
  if ($rowspan > 1) {   if ($rowspan > 1) {
     if ($colspan == 1) {      if ($colspan == 1) {
  if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') {   if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') {
     $output .= '\multicolumn{1}{|c|}{';      $output .= '\multicolumn{1}{'.$border_char.'c'.$border_char.'}{';
     $multirow_aligned = 1;      $multirow_aligned = 1;
  } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') {   } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') {
     $output .= '\multicolumn{1}{|r|}{';      $output .= '\multicolumn{1}{'.$border_char.'r'.$border_char.'}{';
     $multirow_aligned = 1;      $multirow_aligned = 1;
  }   }
     }      }
Line 2383  sub end_table { Line 2388  sub end_table {
  #   #
  if ($colspan == 1  && $rowspan == 1) {   if ($colspan == 1  && $rowspan == 1) {
     if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') {      if ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'c') {
  $output .= '\multicolumn{1}{|c|}{';   $output .= '\multicolumn{1}{'.$border_char.'c'.$border_char.'}{';
     } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') {      } elsif ($Apache::londefdef::table[-1]{'align'}[$in][$jn] eq 'r') {
  $output .= '\multicolumn{1}{|r|}{';   $output .= '\multicolumn{1}{'.$border_char.'r'.$border_char.'}{';
     }      }
  }   }
   

Removed from v.1.371  
changed lines
  Added in v.1.372


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