Diff for /loncom/xml/lontexconvert.pm between versions 1.27 and 1.29

version 1.27, 2003/10/18 15:53:00 version 1.29, 2004/01/28 17:16:27
Line 51  use Apache::lonmenu; Line 51  use Apache::lonmenu;
   
 # ====================================================================== Header  # ====================================================================== Header
   
   sub init_tth {
       my $options=$ENV{'course.'.$ENV{'request.course.id'}.'.tthoptions'};
       if ($ENV{'browser.mathml'}) {
    &tth::ttminit();
    if ($ENV{'browser.unicode'}) {
       &tth::ttmoptions('-L -u1 '.$options);
    } else {
       &tth::ttmoptions('-L -u0 '.$options);
    }
       } else {
    &tth::tthinit();
    if ($ENV{'browser.unicode'}) {
       &tth::tthoptions('-L -u1 '.$options);
    } else {
       &tth::tthoptions('-L -u0 '.$options);
    }
       }
       &Apache::lonnet::logthis("caled and use $options");
       &Apache::lonnet::logthis("caller ".join(':',caller(0)));
   
   }
   
 sub header {  sub header {
   $errorstring='';    $errorstring='';
   my $time=time;    my $time=time;
   if ($ENV{'browser.mathml'}) {    &init_tth();
       &tth::ttminit();  
       if ($ENV{'browser.unicode'}) {  
   &tth::ttmoptions('-L -u1');  
       } else {  
   &tth::ttmoptions('-L -u0');  
       }  
   } else {  
       &tth::tthinit();  
       if ($ENV{'browser.unicode'}) {  
   &tth::tthoptions('-L -u1');  
       } else {  
   &tth::tthoptions('-L -u0');  
       }  
   }  
   return &Apache::lonxml::xmlbegin().    return &Apache::lonxml::xmlbegin().
          &Apache::lonxml::fontsettings().           &Apache::lonxml::fontsettings().
          "\n<head>\n".           "\n<head>\n".
Line 97  sub converted { Line 105  sub converted {
     } else {      } else {
       $xmlstring=&tth::tth($$texstring);        $xmlstring=&tth::tth($$texstring);
       $errorstring.=&tth::ttherror();        $errorstring.=&tth::ttherror();
         $xmlstring=~s-</font(\s*)>-</font>-g;
     }      }
     $xmlstring=~s/^\s*//;      $xmlstring=~s/^\s*//;
     $xmlstring=~s/\s*$//;      $xmlstring=~s/\s*$//;
Line 163  sub msgtexconverted { Line 172  sub msgtexconverted {
     my $message=shift;      my $message=shift;
   
     $errorstring='';      $errorstring='';
     if ($ENV{'browser.mathml'}) {      &init_tth();
  &tth::ttminit();  
  if ($ENV{'browser.unicode'}) {  
     &tth::ttmoptions('-L -u1');  
  } else {  
     &tth::ttmoptions('-L -u0');  
  }  
     } else {  
  &tth::tthinit();  
  if ($ENV{'browser.unicode'}) {  
     &tth::tthoptions('-L -u1');  
  } else {  
     &tth::tthoptions('-L -u0');  
  }  
     }  
     my $outmessage='';      my $outmessage='';
     my $tex=0;      my $tex=0;
     foreach (split(/(?:\&lt\;|\<)\/*m\s*(?:\&gt\;|\>)/i,$message)) {      foreach (split(/(?:\&lt\;|\<)\/*m\s*(?:\&gt\;|\>)/i,$message)) {

Removed from v.1.27  
changed lines
  Added in v.1.29


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