[LON-CAPA-cvs] cvs: loncom /xml lontexconvert.pm

faziophi faziophi@source.lon-capa.org
Mon, 26 Apr 2010 21:36:50 -0000


faziophi		Mon Apr 26 21:36:50 2010 EDT

  Modified files:              
    /loncom/xml	lontexconvert.pm 
  Log:
  I think this change had a purpose at some point. Maybe it still does.
  Maybe it doesn't anymore. Maybe I just want to be 3 lines closer to 
  developer of the month? I have no idea.
  
  
  
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.101 loncom/xml/lontexconvert.pm:1.102
--- loncom/xml/lontexconvert.pm:1.101	Tue Jan 26 01:16:30 2010
+++ loncom/xml/lontexconvert.pm	Mon Apr 26 21:36:50 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # TeX Conversion Module
 #
-# $Id: lontexconvert.pm,v 1.101 2010/01/26 01:16:30 faziophi Exp $
+# $Id: lontexconvert.pm,v 1.102 2010/04/26 21:36:50 faziophi Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -326,6 +326,7 @@
 
 sub to_convert {
     my ($string) = @_;
+    &init_tth();
     $string=~s/\<br\s*\/?\>/ /gs;
 #    $string=~s/\s/ /gs;
     $string=&HTML::Entities::decode($string);
@@ -373,7 +374,6 @@
 sub msgtexconverted {
     my ($message,$email) = @_;
     $errorstring='';
-    &init_tth();
     my $outmessage='';
     my $tex=0;
     foreach my $fragment (split(/(?:\&lt\;|\<)\/*m\s*(?:\&gt\;|\>)/i,$message)) {
@@ -415,7 +415,7 @@
 
 sub algebra {
     use AlgParser;
-
+    &init_tth();
     my ($string,$target,$style,$parstack,$safeeval)=@_;
     my $parser = new AlgParserWithImplicitExpand;
     $string=&prepare_algebra($string);