Diff for /loncom/xml/londefdef.pm between versions 1.237 and 1.238

version 1.237, 2004/08/25 19:08:32 version 1.238, 2004/08/25 19:57:27
Line 66  sub initialize_londefdef { Line 66  sub initialize_londefdef {
     @Apache::londefdef::description=();      @Apache::londefdef::description=();
     $Apache::londefdef::DD_redirection=0;      $Apache::londefdef::DD_redirection=0;
     $Apache::londefdef::DT_redirection=0;      $Apache::londefdef::DT_redirection=0;
     @Apache::londefdef::alphabit=('A'..'Z');      $Apache::londefdef::list_index=0;
     $Apache::londefdef::alphabit_index=0;  
 }  }
   
 #======================= TAG SUBROUTINES =====================  #======================= TAG SUBROUTINES =====================
Line 1489  sub start_li { Line 1488  sub start_li {
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0);   my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0);
  my $value=&Apache::lonxml::get_param('value',$parstack,$safeeval,undef,0);   my $value=&Apache::lonxml::get_param('value',$parstack,$safeeval,undef,0);
  if ($type=~/circle/) {   #FIXME need to support types i and I 
     $currentstring .= ' \item[o] ';   if ($type=~/disc/) {
       $currentstring .= ' \item[$\bullet$] ';
    } elsif ($type=~/circle/) {
       $currentstring .= ' \item[$\circ$] ';
  } elsif ($type=~/square/) {   } elsif ($type=~/square/) {
     $currentstring .= ' \item[$\Box$] ';      $currentstring .= ' \item[$\diamond$] ';
    } elsif ($type eq '1') {
       $currentstring .= ' \item['.($Apache::londefdef::list_index+1).'.]';
  } elsif ($type eq 'A') {   } elsif ($type eq 'A') {
     $currentstring .= ' \item['.$Apache::londefdef::alphabit[$Apache::londefdef::alphabit_index].']';      $currentstring .= ' \item['.('A'..'Z')[$Apache::londefdef::list_index].'.]';
     $Apache::londefdef::alphabit_index++;  
  } elsif ($type eq 'a') {   } elsif ($type eq 'a') {
     my $lower_case=lc $Apache::londefdef::alphabit[$Apache::londefdef::alphabit_index];      $currentstring .= ' \item['.('a'..'z')[$Apache::londefdef::list_index].'.]';
     $currentstring .= ' \item['.$lower_case.']';  
     $Apache::londefdef::alphabit_index++;  
  } elsif ($value ne '') {   } elsif ($value ne '') {
     $currentstring .= ' \item['.$value.'] ';      $currentstring .= ' \item['.$value.'] ';
  } else {   } else {
     $currentstring .= ' \item ';      $currentstring .= ' \item ';
  }     }  
     }    $Apache::londefdef::list_index++;
       }
     return $currentstring;      return $currentstring;
 }  }
   
Line 1552  sub start_ul { Line 1554  sub start_ul {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  my $TeXtype=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0);   my $TeXtype=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0);
    $Apache::londefdef::list_index=0;
  if ($TeXtype eq 'disc') {   if ($TeXtype eq 'disc') {
     $currentstring .= '\renewcommand{\labelitemi}{$\bullet$}'.      $currentstring .= '\renewcommand{\labelitemi}{$\bullet$}'.
                               '\renewcommand{\labelitemii}{$\bullet$}'.                                 '\renewcommand{\labelitemii}{$\bullet$}'. 
Line 1640  sub start_ol { Line 1643  sub start_ol {
     if ($target eq 'web') {      if ($target eq 'web') {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  $Apache::londefdef::alpabit_index=0;   $Apache::londefdef::list_index=0;
  my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0);   my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0);
  if ($type eq '1') {   if ($type eq '1') {
     $currentstring .= '\renewcommand{\labelenumi}{\arabic{enumi}.}'.      $currentstring .= '\renewcommand{\labelenumi}{\arabic{enumi}.}'.

Removed from v.1.237  
changed lines
  Added in v.1.238


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