[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 10 Jan 2005 18:42:21 -0000


albertel		Mon Jan 10 13:42:21 2005 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
   some places use \ensuremath{} instead around the entire quantity, BUG#3815
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.159 loncom/homework/caparesponse/caparesponse.pm:1.160
--- loncom/homework/caparesponse/caparesponse.pm:1.159	Sat Jan  8 01:10:38 2005
+++ loncom/homework/caparesponse/caparesponse.pm	Mon Jan 10 13:42:21 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.159 2005/01/08 06:10:38 albertel Exp $
+# $Id: caparesponse.pm,v 1.160 2005/01/10 18:42:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -401,7 +401,7 @@
     my $cell_width=0;
     foreach my $member (@$rbubble_values) {
 	my $cell_width_real=0;
-	if ($member=~/(\+|-)?(\d*)\.?(\d*)\s*\$\\times\s*10\^{(\+|-)?(\d+)}\$/) {
+	if ($member=~/(\+|-)?(\d*)\.?(\d*)\s*\$?\\times\s*10\^{(\+|-)?(\d+)}\$?/) {
 	    $cell_width_real=(length($2)+length($3)+length($5)+7)*$scale;
 	} elsif ($member=~/(\d*)\.?(\d*)(E|e)(\+|-)?(\d*)/) {
 	    $cell_width_real=(length($1)+length($2)+length($5)+9)*$scale;