Diff for /loncom/xml/lontexconvert.pm between versions 1.4 and 1.11

version 1.4, 2001/11/29 19:03:58 version 1.11, 2002/10/25 15:08:09
Line 61  sub header { Line 61  sub header {
   return &Apache::lonxml::xmlbegin().    return &Apache::lonxml::xmlbegin().
          &Apache::lonxml::fontsettings().           &Apache::lonxml::fontsettings().
          "\n<head>\n".           "\n<head>\n".
          &Apache::lonxml::registerurl().           &Apache::lonxml::registerurl(undef,'tex').
  "\n</head>\n";   "\n</head>\n";
 }  }
   
Line 97  sub footer { Line 97  sub footer {
   return $xmlstring;    return $xmlstring;
 }  }
   
   # ------------------------------------------------------------ Message display
   
   sub to_convert {
       my ($string) = @_;
       $string=~s/\<br\s*\/?\>/ /g;
       return &converted(\$string);
   }
   
   sub msgtexconverted {
       my $message=shift;
   
       #FIXME this crap needs to go but right now the -L option might be
       #ignored if this isn;t the first time the tth engine is used
       #thus the \\document class crap, it makes sure we init the LaTeX stuff
       if ($ENV{'browser.mathml'}) {
         &tth::ttminit();
         &tth::ttmoptions("-L");
       } else {
         &tth::tthinit();
         &tth::tthoptions("-L");
       }
       $message=~s/(\$\$.+?\$\$)/&to_convert("\\documentclass{article}".$1)/ge;
       $message=~s/(\$.+?\$)/&to_convert("\\documentclass{article}".$1)/ge;
       $message=~s/(\\\(.+?\\\))/&to_convert("\\documentclass{article}".$1)/ge;
       $message=~s/(\\\[.+?\\\])/&to_convert("\\documentclass{article}".$1)/ge;
       return $message.$errorstring;
   }
   
 1;  1;
 __END__  __END__
   

Removed from v.1.4  
changed lines
  Added in v.1.11


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