Diff for /loncom/xml/lonxml.pm between versions 1.395 and 1.396

version 1.395, 2006/01/13 10:33:25 version 1.396, 2006/02/04 22:11:42
Line 149  $Apache::lonxml::post_evaluate=1; Line 149  $Apache::lonxml::post_evaluate=1;
 #a header message to emit in the case of any generated warning or errors  #a header message to emit in the case of any generated warning or errors
 $Apache::lonxml::warnings_error_header='';  $Apache::lonxml::warnings_error_header='';
   
   #  Control whether or not LaTeX symbols should be substituted for their
   #  \ style equivalents...this may be turned off e.g. in an verbatim
   #  environment.
   
   $Apache::lonxml::substitute_LaTeX_symbols = 1; # Starts out on.
   
   sub enable_LaTeX_substitutions {
       $Apache::lonxml::substitute_LaTeX_symbols = 1;
   }
   sub disable_LaTeX_substitutions {
       $Apache::lonxml::substitute_LaTeX_symbols = 0;
   }
   
 sub xmlbegin {  sub xmlbegin {
     my ($style)=@_;      my ($style)=@_;
     my $output='';      my $output='';
Line 382  sub xmlparse { Line 395  sub xmlparse {
   
 sub latex_special_symbols {  sub latex_special_symbols {
     my ($string,$where)=@_;      my ($string,$where)=@_;
       #
       #  If e.g. in verbatim mode, then don't substitute.
       #  but return original string.
       #
       if (!($Apache::lonxml::substitute_LaTeX_symbols)) {
    return $string;
       }
     if ($where eq 'header') {      if ($where eq 'header') {
  $string =~ s/(\\|_|\^)/ /g;   $string =~ s/(\\|_|\^)/ /g;
  $string =~ s/(\$|%|\{|\})/\\$1/g;   $string =~ s/(\$|%|\{|\})/\\$1/g;

Removed from v.1.395  
changed lines
  Added in v.1.396


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>