--- loncom/xml/londefdef.pm 2003/06/27 14:01:19 1.145 +++ loncom/xml/londefdef.pm 2003/06/27 16:12:39 1.146 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.145 2003/06/27 14:01:19 albertel Exp $ +# $Id: londefdef.pm,v 1.146 2003/06/27 16:12:39 sakharuk Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1357,40 +1357,33 @@ sub start_a { } sub end_a { - my ($target,$token,$tagstack,$stackref) = @_; + my ($target,$token,$tagstack,$parstack,$safeeval) = @_; my $currentstring = ''; if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { - my $tempor_var = $stackref->[$#$stackref]; - if (index($tempor_var,'name') != -1 ) { - $tempor_var =~ s/name=([^,]*),/$1/g; - } elsif (index($tempor_var,'href') != -1 ) { - $tempor_var =~ s/href=([^,]*),/$1/g; - $currentstring .= " \\ref{$tempor_var}"; - } + my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); + $currentstring .= '\ref{'.$href.'}'; } return $currentstring; } #--
  • tag sub start_li { - my ($target,$token,$tagstack,$stackref) = @_; + my ($target,$token,$tagstack,$parstack,$safeeval) = @_; my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { - my $tempor_var = $stackref->[$#$stackref]; - if (index($tempor_var,'circle') != -1 ) { - $currentstring .= " \\item[o] "; - } elsif (index($tempor_var,'square') != -1 ) { - $currentstring .= " \\item[$\Box$] "; - } elsif ($tempor_var ne '') { - $_ = $tempor_var; - m/my\s*([^=]*)=/; - $currentstring .= " \\item[$1] "; + my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,1); + if ($type=~/circle/) { + $currentstring .= ' \item[o] '; + } elsif ($type=~/square/) { + $currentstring .= ' \item[$\Box$] '; + } elsif ($type ne '') { + $currentstring .= ' \item['.$type.'] '; } else { - $currentstring .= " \\item "; + $currentstring .= ' \item '; } } return $currentstring; @@ -1831,6 +1824,9 @@ sub end_td { } elsif ($target eq 'tex') { my $current_row = $Apache::londefdef::table[-1]{'row_number'}; my $data=&Apache::lonxml::endredirection(); + + $currentstring.=' SSSS '.$data.' FFFF '; + my $TeXwidth=&Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0); if (defined $TeXwidth) { my $current_length=&recalc($TeXwidth);