[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Fri, 18 Apr 2003 15:08:29 -0000
sakharuk Fri Apr 18 11:08:29 2003 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
The second limitation (only one of nested table in the cell of parent table) is removed completely - now you can put as many tables as you wish. More over, the depth of nesting is arbitrary (you just have to care about how it will looks like on the paper). By the way, I've forgotten to mention that I completely changed algorithm to determine the width of each cell and the table itself.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.128 loncom/xml/londefdef.pm:1.129
--- loncom/xml/londefdef.pm:1.128 Fri Apr 18 10:55:40 2003
+++ loncom/xml/londefdef.pm Fri Apr 18 11:08:29 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.128 2003/04/18 14:55:40 sakharuk Exp $
+# $Id: londefdef.pm,v 1.129 2003/04/18 15:08:29 sakharuk Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -1761,8 +1761,6 @@
$header_of_table .= $Apache::londefdef::table[-1]{'columns'}[$in].$Apache::londefdef::table[-1]{'vvinc'};
}
$header_of_table .= '}';
-
-
#define the length of the table cells
#always starts with TeXwidth (if defined everything else is ignored)
my @length_row_final = split(/,/,$Apache::londefdef::table[-1]{'TeXlengthrow'}[0]);
@@ -1818,7 +1816,7 @@
if ($#Apache::londefdef::table > 0) {
my $inmemory = $Apache::londefdef::table[-1]{'output'};
pop @Apache::londefdef::table;
- $Apache::londefdef::table[-1]{'include'}=$inmemory;
+ push @{$Apache::londefdef::table[-1]{'include'}}, $inmemory;
} else {
$currentstring .= $Apache::londefdef::table[-1]{'output'};
pop @Apache::londefdef::table;
@@ -1908,8 +1906,10 @@
$Apache::londefdef::table[-1]{'length'} .= $current_length.',';
$Apache::londefdef::table[-1]{'TeXlength'} .= '0,';
}
- }
- $data=~s/\\keephidden\{NEW TABLE ENTRY\}/$Apache::londefdef::table[-1]{'include'}/;
+ }
+ for (my $in=0; $in<=$#{$Apache::londefdef::table[-1]{'include'}};$in++) {
+ $data=~s/\\keephidden\{NEW TABLE ENTRY\}/$Apache::londefdef::table[-1]{'include'}[$in]/;
+ }
@{ $Apache::londefdef::table[-1]{'rowdata'} }[$current_row] .= '\parbox{TOBECHANGEDONNUMBER}{'.$data.'} '.$Apache::londefdef::table[-1]{'vinc'};
}
return $currentstring;