--- loncom/xml/lonxml.pm 2002/09/04 03:57:18 1.190 +++ loncom/xml/lonxml.pm 2002/09/04 06:55:27 1.192 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.190 2002/09/04 03:57:18 albertel Exp $ +# $Id: lonxml.pm,v 1.192 2002/09/04 06:55:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -539,21 +539,19 @@ sub htmlclean { return $output; } -sub latex_special_sumbols { +sub latex_special_symbols { my ($current_token,$stack,$parstack)=@_; - my @temp_array = @$stack; - if ($temp_array[-1] ne 'tt') { - if ($current_token=~m/\^/) {$current_token=~s/\^/\\verb|\^|/g;} - } else { - if ($current_token=~m/\^/) {$current_token=~s/\^/}\\verb|\^|{/g;} - } - if ($current_token=~m/>/) {$current_token=~s/>/\$>\$/g;} #more - if ($current_token=~m//\$>\$/g; #more + $current_token=~s/[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) { if ($target eq 'tex') { - $result=&latex_special_sumbols($result,$stack,$parstack); + $result=&latex_special_symbols($result,$stack,$parstack); } }