Diff for /loncom/xml/londefdef.pm between versions 1.242 and 1.243

version 1.242, 2004/10/12 22:55:22 version 1.243, 2004/10/18 22:02:02
Line 63  sub initialize_londefdef { Line 63  sub initialize_londefdef {
     $Apache::londefdef::TD_redirection=0;      $Apache::londefdef::TD_redirection=0;
     @Apache::londefdef::table = ();      @Apache::londefdef::table = ();
     $Apache::londefdef::select=0;      $Apache::londefdef::select=0;
     @Apache::londefdef::description=();      undef(@Apache::londefdef::description);
     $Apache::londefdef::DD_redirection=0;      @Apache::londefdef::DD=(0);
     $Apache::londefdef::DT_redirection=0;      @Apache::londefdef::DT=(0);
     $Apache::londefdef::list_index=0;      $Apache::londefdef::list_index=0;
 }  }
   
Line 1697  sub start_dl { Line 1697  sub start_dl {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $currentstring = '\begin{description}';   $currentstring = '\begin{description}';
  @Apache::londefdef::description=();   $Apache::londefdef::DL++;
  $Apache::londefdef::DD_redirection=0;   push(@Apache::londefdef::description,[]);
  $Apache::londefdef::DT_redirection=0;   $Apache::londefdef::DD[$Apache::londefdef::DL]=0;
    $Apache::londefdef::DT[$Apache::londefdef::DL]=0;
     }       } 
     return $currentstring;      return $currentstring;
 }  }
Line 1710  sub end_dl { Line 1711  sub end_dl {
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring = $token->[2];        $currentstring = $token->[2];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  if ($Apache::londefdef::DT_redirection) {   if ($Apache::londefdef::DT[-1]) { &end_dt(@_); }
     my $data=&item_cleanup;   if ($Apache::londefdef::DD[-1]) { &end_dd(@_); }
     push @Apache::londefdef::description,'\item['.$data.']';   foreach my $element (@{$Apache::londefdef::description[-1]}) {
     $Apache::londefdef::DT_redirection=0;  
  } elsif ($Apache::londefdef::DD_redirection) {  
     $Apache::londefdef::description[-1].=&Apache::lonxml::endredirection();  
  }  
  foreach my $element (@Apache::londefdef::description) {  
     $currentstring.=' '.$element.' ';      $currentstring.=' '.$element.' ';
  }   }
  @Apache::londefdef::description=();   pop(@Apache::londefdef::description);
  $currentstring.='\end{description}';     $currentstring.='\end{description}';  
    delete($Apache::londefdef::DD[$Apache::londefdef::DL]);
    delete($Apache::londefdef::DT[$Apache::londefdef::DL]);
    $Apache::londefdef::DL--;
     }       } 
     return $currentstring;      return $currentstring;
 }  }
Line 1733  sub start_dt { Line 1732  sub start_dt {
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  if ($Apache::londefdef::DT_redirection) {   if ($Apache::londefdef::DT[-1]) { &end_dt(@_); }
     my $data=&item_cleanup;   if ($Apache::londefdef::DD[-1]) { &end_dd(@_); }
     push @Apache::londefdef::description,'\item['.$data.']';  
     $Apache::londefdef::DT_redirection=0;  
  } elsif ($Apache::londefdef::DD_redirection) {  
     $Apache::londefdef::description[-1].=&Apache::lonxml::endredirection();  
     $Apache::londefdef::DD_redirection=0;  
  }  
  &Apache::lonxml::startredirection();   &Apache::lonxml::startredirection();
  $Apache::londefdef::DT_redirection=1;   $Apache::londefdef::DT[-1]++;
     }       } 
     return $currentstring;      return $currentstring;
 }  }
Line 1753  sub end_dt { Line 1746  sub end_dt {
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring = $token->[2];       $currentstring = $token->[2];    
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  my $data=&item_cleanup;   if ($Apache::londefdef::DT[-1]) {
  push @Apache::londefdef::description,'\item['.$data.']';      my $data=&item_cleanup();
  $Apache::londefdef::DT_redirection=0;      push(@{$Apache::londefdef::description[-1]},'\item['.$data.']');
       $Apache::londefdef::DT[-1]--;
    }
     }       } 
     return $currentstring;      return $currentstring;
 }  }
Line 1774  sub start_dd { Line 1769  sub start_dd {
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  if ($Apache::londefdef::DT_redirection) {   if ($Apache::londefdef::DT[-1]) { &end_dt(@_); }
     my $data=&item_cleanup;   if ($Apache::londefdef::DD[-1]) { &end_dd(@_);}
     push @Apache::londefdef::description,'\item['.$data.']';   push(@{$Apache::londefdef::description[-1]},'');
     $Apache::londefdef::DT_redirection=0;   $Apache::londefdef::description[-1]->[-1].=' \strut ';
  }   $Apache::londefdef::DD[-1]++;
  $Apache::londefdef::DD_redirection=1;  
  &Apache::lonxml::startredirection();   &Apache::lonxml::startredirection();
     }       } 
     return $currentstring;      return $currentstring;
Line 1791  sub end_dd { Line 1785  sub end_dd {
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring = $token->[2];       $currentstring = $token->[2];    
     }  elsif ($target eq 'tex') {      }  elsif ($target eq 'tex') {
  $Apache::londefdef::description[-1].=&Apache::lonxml::endredirection();   $Apache::londefdef::description[-1]->[-1].=
  $Apache::londefdef::DD_redirection=0;      &Apache::lonxml::endredirection().' \vskip 0mm ';
    $Apache::londefdef::DD[-1]--;
     }      }
     return $currentstring;      return $currentstring;
 }  }

Removed from v.1.242  
changed lines
  Added in v.1.243


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