--- loncom/xml/lonxml.pm 2003/02/14 19:35:55 1.234 +++ loncom/xml/lonxml.pm 2003/02/17 20:10:08 1.235 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.234 2003/02/14 19:35:55 www Exp $ +# $Id: lonxml.pm,v 1.235 2003/02/17 20:10:08 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -457,10 +457,16 @@ sub htmlclean { sub latex_special_symbols { my ($current_token,$stack,$parstack,$where)=@_; - if ($where=='header') { + if ($where eq 'header') { + $current_token =~ s/\\/ /g; + $current_token =~ s/\{/\\\{/g; + $current_token =~ s/\}/\\\}/g; $current_token =~ s/_/ /g; $current_token =~ s/\^/ /g; $current_token =~ s/&/\\&/g; + $current_token =~ s/\#/\\\#/g; + $current_token =~ s/%/\\%/g; + $current_token =~ s/\$/\\\$/g; } else { $current_token=~s/\\ /\\char92 /g; $current_token=~s/\^/\\char94 /g;