Diff for /loncom/xml/lontexconvert.pm between versions 1.85 and 1.87

version 1.85, 2008/01/29 11:04:10 version 1.87, 2008/02/06 10:16:00
Line 85  $Apache::lontexconvert::messedup=0; Line 85  $Apache::lontexconvert::messedup=0;
 # into the safe space since opcode checks only occur at compile time  # into the safe space since opcode checks only occur at compile time
 sub convert_real {  sub convert_real {
     my ($texstring)=@_;      my ($texstring)=@_;
     &Apache::lonnet::logthis("convert_real converting '$$texstring");  
     my ($xmlstring,$errorstring);      my ($xmlstring,$errorstring);
     local $SIG{SEGV}=sub { $Apache::lontexconvert::messedup=1; die; };      local $SIG{SEGV}=sub { $Apache::lontexconvert::messedup=1; die; };
     local $SIG{ALRM}=sub {       local $SIG{ALRM}=sub { 
Line 96  sub convert_real { Line 95  sub convert_real {
     };      };
     &Apache::lonxml::start_alarm();      &Apache::lonxml::start_alarm();
     if ($env{'browser.mathml'}) {      if ($env{'browser.mathml'}) {
  &Apache::lonnet::logthis("mathml translation");  
  $xmlstring=&tth::ttm($$texstring);   $xmlstring=&tth::ttm($$texstring);
  $xmlstring=~s/\<math\>/\<math xmlns=\"\&mathns\;\"\>/g;   $xmlstring=~s/\<math\>/\<math xmlns=\"\&mathns\;\"\>/g;
  $xmlstring=~s/\<br\>/\<br\/\>/g;   $xmlstring=~s/\<br\>/\<br\/\>/g;
  $xmlstring=~s/\<p\>/\<p\>\<\/p\>/g;   $xmlstring=~s/\<p\>/\<p\>\<\/p\>/g;
  $errorstring.=&tth::ttmerror();   $errorstring.=&tth::ttmerror();
     } else {      } else {
  &Apache::lonnet::logthis("tth translation");  
  $xmlstring=&tth::tth($$texstring);   $xmlstring=&tth::tth($$texstring);
  $errorstring.=&tth::ttherror();   $errorstring.=&tth::ttherror();
  $xmlstring=~s-</font(\s*)>-</font>-g;   $xmlstring=~s-</font(\s*)>-</font>-g;
Line 116  sub convert_real { Line 113  sub convert_real {
     # reasonably well to &#8660;.  If we get many more of these,      # reasonably well to &#8660;.  If we get many more of these,
     # we're going to need to have a translation sub.      # we're going to need to have a translation sub.
     #      #
     $xmlstring=~s/\\rightleftharpoons/\&\#8660;/g;      my $lrharpoon = pack("U", 0x21cc);
       $xmlstring=~s/\\rightleftharpoons/$lrharpoon/g;
   
     &Apache::lonnet::logthis("Final result: $xmlstring");  
     &Apache::lonxml::end_alarm();      &Apache::lonxml::end_alarm();
     return ($xmlstring,$errorstring);      return ($xmlstring,$errorstring);
 }  }

Removed from v.1.85  
changed lines
  Added in v.1.87


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