Diff for /loncom/xml/lontexconvert.pm between versions 1.70 and 1.75

version 1.70, 2006/03/24 18:09:23 version 1.75, 2006/05/30 12:47:53
Line 42  package Apache::lontexconvert; Line 42  package Apache::lontexconvert;
 use strict;  use strict;
 use tth();  use tth();
 use vars qw($errorstring);  use vars qw($errorstring);
 use Apache();  #use Apache::lonxml();
 use Apache::lonmsg();  
 use Apache::lonxml();  
 use Apache::lonmenu();  
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonnet;  use Apache::lonnet;
   use lib '/home/httpd/lib/perl/';
   use LONCAPA;
    
   
 # ====================================================================== Header  # ====================================================================== Header
   
 sub init_tth {  sub init_tth {
     my $options=$env{'course.'.$env{'request.course.id'}.'.tthoptions'};      my $options=$env{'course.'.$env{'request.course.id'}.'.tthoptions'};
       if ($options =~ /\S/) {
    $options = ' '.$options;
       } else {
    undef($options);
       }
     if ($env{'browser.mathml'}) {      if ($env{'browser.mathml'}) {
  &tth::ttminit();   &tth::ttminit();
  if ($env{'browser.unicode'}) {   if ($env{'browser.unicode'}) {
     &tth::ttmoptions('-L -u1 '.$options);      &tth::ttmoptions('-L -u1'.$options);
  } else {   } else {
     &tth::ttmoptions('-L -u0 '.$options);      &tth::ttmoptions('-L -u0'.$options);
  }   }
     } else {      } else {
  &tth::tthinit();   &tth::tthinit();
  if ($env{'browser.unicode'}) {   if ($env{'browser.unicode'}) {
     &tth::tthoptions('-L -u1 '.$options);      &tth::tthoptions('-L -u1'.$options);
  } else {   } else {
     &tth::tthoptions('-L -u0 '.$options);      &tth::tthoptions('-L -u0'.$options);
  }   }
     }      }
 }  }
Line 182  sub jsMath_converted { Line 187  sub jsMath_converted {
             '<script type="text/javascript">              '<script type="text/javascript">
                      function NoFontMessage () {}                       function NoFontMessage () {}
                    </script>'."\n".                     </script>'."\n".
     '<script src="/adm/jsMath/jsMath.js"></script>'."\n";      '<script type="text/javascript" src="/adm/jsMath/jsMath.js"></script>'."\n";
     }      }
     sub jsMath_process {      sub jsMath_process {
  return '' if !$jsMath_sent_header;   return '' if !$jsMath_sent_header;
Line 190  sub jsMath_converted { Line 195  sub jsMath_converted {
     }      }
 }  }
   
   sub init_math_support {
       &init_tth();
       &Apache::lontexconvert::jsMath_reset();
       if ($env{'environment.texengine'} eq 'jsMath' ||
    $env{'form.texengine'}        eq 'jsMath' ) {
    return &Apache::lontexconvert::jsMath_header();
       }
       return;
   }
   
 sub mimetex_converted {  sub mimetex_converted {
     my $texstring=shift;      my $texstring=shift;
     my $displaystyle=&displaystyle($texstring);      my $displaystyle=&displaystyle($texstring);
Line 199  sub mimetex_converted { Line 214  sub mimetex_converted {
     if ($displaystyle) {      if ($displaystyle) {
  $$texstring='\\displaystyle \\Large '.$$texstring;   $$texstring='\\displaystyle \\Large '.$$texstring;
     }      }
     my $result='<img src="/cgi-bin/mimetex.cgi?'.&Apache::lonnet::escape($$texstring).'" />';      my $result='<img src="/cgi-bin/mimetex.cgi?'.&escape($$texstring).'" />';
     if ($displaystyle) {      if ($displaystyle) {
  $result='<center>'.$result.'</center>';   $result='<center>'.$result.'</center>';
     }      }

Removed from v.1.70  
changed lines
  Added in v.1.75


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