Diff for /loncom/xml/lonxml.pm between versions 1.236 and 1.237

version 1.236, 2003/02/19 14:55:27 version 1.237, 2003/02/19 15:20:35
Line 145  $Apache::lonxml::registered=0; Line 145  $Apache::lonxml::registered=0;
 $Apache::lonxml::request='';  $Apache::lonxml::request='';
   
 # a problem number counter, and check on ether it is used  # a problem number counter, and check on ether it is used
 $Apache::lonxml::counter=4;  $Apache::lonxml::counter=1;
 $Apache::lonxml::counter_changed=0;  $Apache::lonxml::counter_changed=0;
   
 #internal check on whether to look at style defs  #internal check on whether to look at style defs
Line 458  sub htmlclean { Line 458  sub htmlclean {
 sub latex_special_symbols {  sub latex_special_symbols {
     my ($current_token,$stack,$parstack,$where)=@_;      my ($current_token,$stack,$parstack,$where)=@_;
     if ($where eq 'header') {      if ($where eq 'header') {
       $current_token =~ s/\\/ /g;        $current_token =~ s/(\\|_|^)/ /g;
       $current_token =~ s/\{/\\\{/g;        $current_token =~ s/(\$|%|\#|&|\{|\})/\\$1/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 {      } else {
      $current_token=~s/\\ /\\char92 /g;       $current_token=~s/\\ /\\char92 /g;
      $current_token=~s/\^/\\char94 /g;       $current_token=~s/\^/\\char94 /g;
Line 475  sub latex_special_symbols { Line 468  sub latex_special_symbols {
      $current_token=~s/([^&])\#/$1\\#/g;       $current_token=~s/([^&])\#/$1\\#/g;
      $current_token=~s/(\$|_|{|})/\\$1/g;       $current_token=~s/(\$|_|{|})/\\$1/g;
      $current_token=~s/\\char92 /\\texttt{\\char92}/g;       $current_token=~s/\\char92 /\\texttt{\\char92}/g;
      $current_token=~s/>/\$>\$/g; #more       $current_token=~s/(>|<)/\$$1\$/g; #more or less
      $current_token=~s/</\$<\$/g; #less  
      if ($current_token=~m/\d%/) {$current_token =~ s/(\d)%/$1\\%/g;} #percent after digit       if ($current_token=~m/\d%/) {$current_token =~ s/(\d)%/$1\\%/g;} #percent after digit
      if ($current_token=~m/\s%/) {$current_token =~ s/(\s)%/$1\\%/g;} #persent after space       if ($current_token=~m/\s%/) {$current_token =~ s/(\s)%/$1\\%/g;} #persent after space
     }      }
Line 901  sub increment_counter { Line 893  sub increment_counter {
 sub init_counter {  sub init_counter {
     if (defined($ENV{'form.counter'})) {      if (defined($ENV{'form.counter'})) {
  $Apache::lonxml::counter=$ENV{'form.counter'};   $Apache::lonxml::counter=$ENV{'form.counter'};
     } elsif (not defined($Apache::lonxml::counter)) {      } else {
  $Apache::lonxml::counter=1;   $Apache::lonxml::counter=1;
  &store_counter();   &store_counter();
     }      }

Removed from v.1.236  
changed lines
  Added in v.1.237


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