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

www lon-capa-cvs@mail.lon-capa.org
Tue, 30 Jul 2002 12:42:13 -0000


www		Tue Jul 30 08:42:13 2002 EDT

  Modified files:              
    /loncom/xml	lontexconvert.pm 
  Log:
  Attempt to get it into LaTeX mode for messages (apparently not working), and
  minimal matching in reg exp.
  
  
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.6 loncom/xml/lontexconvert.pm:1.7
--- loncom/xml/lontexconvert.pm:1.6	Mon Jul 29 18:06:38 2002
+++ loncom/xml/lontexconvert.pm	Tue Jul 30 08:42:13 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # TeX Conversion Module
 #
-# $Id: lontexconvert.pm,v 1.6 2002/07/29 22:06:38 www Exp $
+# $Id: lontexconvert.pm,v 1.7 2002/07/30 12:42:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -103,11 +103,13 @@
     my $message=shift;
     if ($ENV{'browser.mathml'}) {
       &tth::ttminit();
+      &tth::ttmoptions("-L");
     } else {
       &tth::tthinit();
+      &tth::tthoptions("-L");
     }
-    $message=~s/(\$[^\$]+\$)/&converted(\$1)/ge;
-    $message=~s/(\\\[[^\]]+\])/&converted(\$1)/ge;
+    $message=~s/(\$.+?\$)/&converted(\$1)/ge;
+    $message=~s/(\\\[.+?\\\])/&converted(\$1)/ge;
     return $message;
 }