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

version 1.243, 2004/10/18 22:02:02 version 1.244, 2004/11/13 08:56:53
Line 66  sub initialize_londefdef { Line 66  sub initialize_londefdef {
     undef(@Apache::londefdef::description);      undef(@Apache::londefdef::description);
     @Apache::londefdef::DD=(0);      @Apache::londefdef::DD=(0);
     @Apache::londefdef::DT=(0);      @Apache::londefdef::DT=(0);
       @Apache::londefdef::seenDT=(0);
     $Apache::londefdef::list_index=0;      $Apache::londefdef::list_index=0;
 }  }
   
Line 478  sub end_accessrule { Line 479  sub end_accessrule {
 sub start_body {  sub start_body {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
     my $currentstring = '';      my $currentstring = '';
   
     if ($target eq 'web') {      if ($target eq 'web') {
  if ($Apache::lonhomework::parsing_a_problem) {   if ($Apache::lonhomework::parsing_a_problem) {
     &Apache::lonxml::warning("<body> tag found inside of <problem> tag this can cause problems.");      &Apache::lonxml::warning("<body> tag found inside of <problem> tag this can cause problems.");
Line 1701  sub start_dl { Line 1703  sub start_dl {
  push(@Apache::londefdef::description,[]);   push(@Apache::londefdef::description,[]);
  $Apache::londefdef::DD[$Apache::londefdef::DL]=0;   $Apache::londefdef::DD[$Apache::londefdef::DL]=0;
  $Apache::londefdef::DT[$Apache::londefdef::DL]=0;   $Apache::londefdef::DT[$Apache::londefdef::DL]=0;
    $Apache::londefdef::seenDT[$Apache::londefdef::DL]=0;
     }       } 
     return $currentstring;      return $currentstring;
 }  }
Line 1720  sub end_dl { Line 1723  sub end_dl {
  $currentstring.='\end{description}';     $currentstring.='\end{description}';  
  delete($Apache::londefdef::DD[$Apache::londefdef::DL]);   delete($Apache::londefdef::DD[$Apache::londefdef::DL]);
  delete($Apache::londefdef::DT[$Apache::londefdef::DL]);   delete($Apache::londefdef::DT[$Apache::londefdef::DL]);
    delete($Apache::londefdef::seenDT[$Apache::londefdef::DL]);
  $Apache::londefdef::DL--;   $Apache::londefdef::DL--;
     }       } 
     return $currentstring;      return $currentstring;
Line 1736  sub start_dt { Line 1740  sub start_dt {
  if ($Apache::londefdef::DD[-1]) { &end_dd(@_); }   if ($Apache::londefdef::DD[-1]) { &end_dd(@_); }
  &Apache::lonxml::startredirection();   &Apache::lonxml::startredirection();
  $Apache::londefdef::DT[-1]++;   $Apache::londefdef::DT[-1]++;
    $Apache::londefdef::seenDT[-1]=1;
     }       } 
     return $currentstring;      return $currentstring;
 }  }
Line 1748  sub end_dt { Line 1753  sub end_dt {
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  if ($Apache::londefdef::DT[-1]) {   if ($Apache::londefdef::DT[-1]) {
     my $data=&item_cleanup();      my $data=&item_cleanup();
     push(@{$Apache::londefdef::description[-1]},'\item['.$data.']');      push(@{$Apache::londefdef::description[-1]},'\item['.$data.'] \strut \vskip 0mm');
     $Apache::londefdef::DT[-1]--;      $Apache::londefdef::DT[-1]--;
  }   }
     }       } 
Line 1771  sub start_dd { Line 1776  sub start_dd {
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  if ($Apache::londefdef::DT[-1]) { &end_dt(@_); }   if ($Apache::londefdef::DT[-1]) { &end_dt(@_); }
  if ($Apache::londefdef::DD[-1]) { &end_dd(@_);}   if ($Apache::londefdef::DD[-1]) { &end_dd(@_);}
    if (!$Apache::londefdef::seenDT[-1]) {
       push(@{$Apache::londefdef::description[-1]},'\item[\strut] \strut \vskip 0mm ');
    }
  push(@{$Apache::londefdef::description[-1]},'');   push(@{$Apache::londefdef::description[-1]},'');
  $Apache::londefdef::description[-1]->[-1].=' \strut ';   $Apache::londefdef::description[-1]->[-1].=' \strut ';
  $Apache::londefdef::DD[-1]++;   $Apache::londefdef::DD[-1]++;

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


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