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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Tue, 26 Jun 2007 01:20:38 -0000


albertel		Mon Jun 25 21:20:38 2007 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  - neeed -> need
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.369 loncom/xml/londefdef.pm:1.370
--- loncom/xml/londefdef.pm:1.369	Thu Jun 21 20:11:32 2007
+++ loncom/xml/londefdef.pm	Mon Jun 25 21:20:35 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.369 2007/06/22 00:11:32 albertel Exp $
+# $Id: londefdef.pm,v 1.370 2007/06/26 01:20:35 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -2162,11 +2162,11 @@
 	my @fwidth=@{$Apache::londefdef::table[-1]{'TeXlen'}[0]};#final width array
 	my @adjust=();
         #step 1. adjustment by maximum value
-	my $space_neeeded=0;
+	my $space_needed=0;
 	for (my $jn=0;$jn<=$#max_len;$jn++) {
-	    $space_neeeded=$space_neeeded+$max_len[$jn];
+	    $space_needed=$space_needed+$max_len[$jn];
 	}
-	if ($space_neeeded<=$available_space) {
+	if ($space_needed<=$available_space) {
 
 	    for (my $jn=0;$jn<=$#max_len;$jn++) {
 		if ($fwidth[$jn]==0) {
@@ -2175,11 +2175,11 @@
 	    }
 	} else {
         #step 2. adjustment by minimum value (estimation)
-	    $space_neeeded=0;
+	    $space_needed=0;
 	    for (my $jn=0;$jn<=$#min_len;$jn++) {
-		$space_neeeded+=$min_len[$jn];
+		$space_needed+=$min_len[$jn];
 	    }
-	    if ($space_neeeded>$available_space) {
+	    if ($space_needed>$available_space) {
 		$WARNING=' \textbf{NOT ENOUGH SPACE FOR TABLE} ';
 		for (my $jn=0;$jn<=$#max_len;$jn++) {
 		    if ($fwidth[$jn]==0) {
@@ -2196,7 +2196,7 @@
 		    }
 		}
 		if ($how_many_to_scale>0) {
-		    my $space_to_adjust=($space_neeeded-$available_space)/$how_many_to_scale;
+		    my $space_to_adjust=($space_needed-$available_space)/$how_many_to_scale;
 		    foreach my $jn (@to_scale) {
 			for (my $in=0;$in<=$Apache::londefdef::table[-1]{'row_number'};$in++) {
 			    $Apache::londefdef::table[-1]{'content'}[$in][$jn]=~m/width\s*=\s*(\d+\.?\d*\s*(mm|cm|in|pc|pt)*)/;
@@ -2218,7 +2218,7 @@
 		}
 	    } else {
 	      #step 3. adjustment over minimal + corrections
-		my $enlarge_coef=$available_space/$space_neeeded;
+		my $enlarge_coef=$available_space/$space_needed;
 		my $acsessive=0;
 		for (my $jn=0;$jn<=$#min_len;$jn++) {
 		    $adjust[$jn]=$min_len[$jn]*$enlarge_coef;