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

raeburn raeburn@source.lon-capa.org
Tue, 09 Nov 2010 21:28:21 -0000


raeburn		Tue Nov  9 21:28:21 2010 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/xml	londefdef.pm 
  Log:
  - Backport 1.425 (part).
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.415.4.1 loncom/xml/londefdef.pm:1.415.4.2
--- loncom/xml/londefdef.pm:1.415.4.1	Mon Aug 16 16:14:32 2010
+++ loncom/xml/londefdef.pm	Tue Nov  9 21:28:20 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.415.4.1 2010/08/16 16:14:32 raeburn Exp $
+# $Id: londefdef.pm,v 1.415.4.2 2010/11/09 21:28:20 raeburn Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -2732,7 +2732,7 @@
 #
 
 sub cell_config_hash {
-    my ($align, $rowspan, $colspan) = @_;
+    my ($align, $rowspan, $colspan, $width) = @_;
     my %config;
     if ($align ne '') {
 	$config{'halign'} = $align;
@@ -2743,6 +2743,9 @@
     if ($rowspan ne '') {
 	$config{'rowspan'} = $rowspan;
     }
+    if ($width ne '') {
+        $config{'width'} = $width;
+    }
     return \%config;
 }
  
@@ -2754,11 +2757,11 @@
     # attributes, but empty of text.  end_td_tex will
     # fetch the contents from the recursive parse and
     # fill the cell with them:
-    my $align   = &Apache::lonxml::get_param('align', $parstack, $safeeval, undef, 1);
-    my $rowspan = &Apache::lonxml::get_param('rowspan', $parstack, $safeeval, undef, 1);
-    my $colspan = &Apache::lonxml::get_param('colspan', $parstack, $safeeval, undef, 1);
-
-    my $config = &cell_config_hash($align, $rowspan, $colspan);
+    my $align   = &Apache::lonxml::get_param('align', $parstack, $safeeval);
+    my $rowspan = &Apache::lonxml::get_param('rowspan', $parstack, $safeeval);
+    my $colspan = &Apache::lonxml::get_param('colspan', $parstack, $safeeval);
+    my $width   = &Apache::lonxml::get_param('TeXwidth', $parstack, $safeeval);
+    my $config = &cell_config_hash($align, $rowspan, $colspan, $width);
 
     my $table = $Apache::londefdef::table[-1];
     $table->add_cell('', $config);