Diff for /loncom/xml/lonxml.pm between versions 1.309 and 1.310

version 1.309, 2004/03/09 20:37:58 version 1.310, 2004/03/12 17:26:29
Line 404  sub latex_special_symbols { Line 404  sub latex_special_symbols {
  $string =~ s/(\$|%|\#|&|\{|\})/\\$1/g;   $string =~ s/(\$|%|\#|&|\{|\})/\\$1/g;
  $string =~ s/_/ /g;   $string =~ s/_/ /g;
     } else {      } else {
  $string=~s/\\ /\\char92 /g;   $string=~s/([^\\])\%/$1\\\%/g;
  $string=~s/\^/\\\^\\strut /g;   $string=~s/([^\\])(\$|_)/$1\\$2/g;
  $string=~s/\~/\\char126 /g;   $string=~s/\$\$/\$\\\$/g;
  #fixup & if it doesn't look like          $string=~s/([^\\])\&/$1\\\&/g;
         # { or α          $string=~s/([^\\])\#/$1\\\#/g;
  $string=~s/(&(?!((\#[0-9]+)|([a-z][a-z0-9]*));))/\\$1/gi;   $string=~s/\#\#/\#\\\#/g;
         $string=~s/([^&\\])\#/$1\\#/g;          $string=~s/([^\\])(\~|\^)/$1\\$2\\strut /g;
  $string=~s/\#\#/\#\\#/g;   $string=~s/(>|<)/\\ensuremath\{$1\}/g; #more or less
  $string=~s/(\$|_|{|})/\\$1/g;  #single { or } How to escape?
  $string=~s/\\char92 /\\texttt{\\char92}/g;  
  $string=~s/(>|<)/\$$1\$/g; #more or less  
  if ($string=~m/\d%/) {$string =~ s/(\d)%/$1\\%/g;} #percent after digit  
  if ($string=~m/\s%/) {$string =~ s/(\s)%/$1\\%/g;} #percent after space  
  if ($string eq '%.') {$string = '\%.';} #percent at the end of statement  
     }      }
     return $string;      return $string;
 }  }
Line 511  sub inner_xmlparse { Line 506  sub inner_xmlparse {
       if (($token->[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) {        if (($token->[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) {
   #Style file definitions should be correct    #Style file definitions should be correct
   if ($target eq 'tex' && ($Apache::lonxml::usestyle)) {    if ($target eq 'tex' && ($Apache::lonxml::usestyle)) {
       $result=&latex_special_symbols($result);        $result=&latex_special_symbols(&Apache::lonprintout::character_chart($result));
   }    }
       }        }
   

Removed from v.1.309  
changed lines
  Added in v.1.310


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