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

droeschl lon-capa-cvs-allow@mail.lon-capa.org
Wed, 10 Sep 2008 19:45:23 -0000


droeschl		Wed Sep 10 15:45:23 2008 EDT

  Modified files:              
    /loncom/xml	lontexconvert.pm scripttag.pm 
  Log:
  Bug #5770: Added display attribute for algebra tag.
  
  
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.88 loncom/xml/lontexconvert.pm:1.89
--- loncom/xml/lontexconvert.pm:1.88	Fri Jul 18 09:09:33 2008
+++ loncom/xml/lontexconvert.pm	Wed Sep 10 15:45:23 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # TeX Conversion Module
 #
-# $Id: lontexconvert.pm,v 1.88 2008/07/18 13:09:33 raeburn Exp $
+# $Id: lontexconvert.pm,v 1.89 2008/09/10 19:45:23 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -353,7 +353,7 @@
 sub algebra {
     use AlgParser;
 
-    my ($string,$target,$style)=@_;
+    my ($string,$target,$style,$parstack,$safeeval)=@_;
     my $parser = new AlgParserWithImplicitExpand;
     $string=&prepare_algebra($string);
     my $ret = $parser->parse($string);
@@ -370,7 +370,9 @@
 	    $latex='\\ensuremath{'.$latex.'}';
 	}
 	if ($target eq 'web' || $target eq 'analyze') {
-	    $result = &converted(\$latex);
+            my $display=&Apache::lonxml::get_param('display',$parstack,$safeeval);
+            $result = &converted(\$latex,$display);
+#	    $result = &converted(\$latex);
 	} else {
 	    $result = $latex;
 	}
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.147 loncom/xml/scripttag.pm:1.148
--- loncom/xml/scripttag.pm:1.147	Fri Nov 16 20:51:11 2007
+++ loncom/xml/scripttag.pm	Wed Sep 10 15:45:23 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # <script> definiton
 #
-# $Id: scripttag.pm,v 1.147 2007/11/17 01:51:11 albertel Exp $
+# $Id: scripttag.pm,v 1.148 2008/09/10 19:45:23 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -621,7 +621,7 @@
 	$inside = &Apache::run::evaluate($inside,$safeeval,$$parstack[-1]);
 	if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') {
 	    my $style=&Apache::lonxml::get_param('style',$parstack,$safeeval);
-	    $result=&Apache::lontexconvert::algebra($inside,$target,$style);
+	    $result=&Apache::lontexconvert::algebra($inside,$target,$style,$parstack,$safeeval);
 	}
 	$Apache::lonxml::post_evaluate=0;
     }