--- loncom/xml/londefdef.pm 2003/09/25 15:52:57 1.172 +++ loncom/xml/londefdef.pm 2003/09/25 16:09:14 1.173 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.172 2003/09/25 15:52:57 sakharuk Exp $ +# $Id: londefdef.pm,v 1.173 2003/09/25 16:09:14 sakharuk Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1672,14 +1672,19 @@ sub end_dt { if ($target eq 'web') { $currentstring = $token->[2]; } elsif ($target eq 'tex') { - my $data=&Apache::lonxml::endredirection(); - $data=~s/\\begin{center}//g; - $data=~s/\\end{center}//g; + my $data=&item_cleanup; $currentstring.='\item['.$data.']'; } return $currentstring; } +sub item_cleanup { + my $item=&Apache::lonxml::endredirection();; + $item=~s/\\begin{center}//g; + $item=~s/\\end{center}//g; + return $item; +} + #--
tag sub start_dd { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; @@ -1688,7 +1693,8 @@ sub start_dd { $currentstring = $token->[4]; } elsif ($target eq 'tex') { if ($$tagstack[-2] eq 'dt') { - $currentstring.='\item['.&Apache::lonxml::endredirection().']'; + my $data=&item_cleanup; + $currentstring.='\item['.$data.']'; } } return $currentstring;