--- loncom/xml/lonxml.pm 2002/09/04 04:55:13 1.191 +++ loncom/xml/lonxml.pm 2002/09/04 21:01:33 1.193 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.191 2002/09/04 04:55:13 albertel Exp $ +# $Id: lonxml.pm,v 1.193 2002/09/04 21:01:33 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -541,19 +541,17 @@ sub htmlclean { 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 ($metamode<1) { my $text=$token->[1]; - if ($token->[0] eq 'C') { + if ($token->[0] eq 'C' && $target eq 'tex') { $text = '%'.$text; $text =~ s/[\n\r]//g; }