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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 19 Jun 2003 14:58:39 -0000


sakharuk		Thu Jun 19 10:58:39 2003 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  Very important change in the calculation of the table width. Till now I used only integer number (in mm) and the use of any fraction lead to unpredictable result. After this correction the final output for the tables has to be better. Nevertheless I stillhave to find the better way for taking into account the "internal" size of any table's element (any vertical line for the separation of columns -no matter real or not shown). 
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.138 loncom/xml/londefdef.pm:1.139
--- loncom/xml/londefdef.pm:1.138	Tue Jun 10 21:22:32 2003
+++ loncom/xml/londefdef.pm	Thu Jun 19 10:58:39 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.138 2003/06/11 01:22:32 www Exp $
+# $Id: londefdef.pm,v 1.139 2003/06/19 14:58:39 sakharuk Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1703,8 +1703,8 @@
     my $textwidth;
     if (not defined @Apache::londefdef::table) {
 	$textwidth=&recalc($ENV{'form.textwidth'});
-	$textwidth=~/(\d+)/;
-	$textwidth=$1;
+	$textwidth=~/(\d+\.?\d*)/;
+	$textwidth=0.95*$1;
     } else {
 	$textwidth=&Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0);
     }