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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 04 Jan 2006 22:30:51 -0000


albertel		Wed Jan  4 17:30:51 2006 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  - if both width and TeXwidth were unset, was getting a table of 0mm in width
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.307 loncom/xml/londefdef.pm:1.308
--- loncom/xml/londefdef.pm:1.307	Tue Jan  3 18:41:52 2006
+++ loncom/xml/londefdef.pm	Wed Jan  4 17:30:50 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.307 2006/01/03 23:41:52 foxr Exp $
+# $Id: londefdef.pm,v 1.308 2006/01/04 22:30:50 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1946,9 +1946,9 @@
 	# in either case it can be a percentage or absolute width.
 
 	my $TeXwidth = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0);
-	if (not defined $TeXwidth) {
+	if (!defined($TeXwidth)) {
 	    $TeXwidth = &Apache::lonxml::get_param('width',$parstack,$safeeval,undef,1);
-
+	    if (!defined($TeXwidth)) { $TeXwidth = $textwidth; }
 	} else {
 	    $Apache::londefdef::table[-1]{'forcedtablewidth'} = 1;
 	}