version 1.126, 2003/04/16 17:59:01
|
version 1.127, 2003/04/16 19:20:51
|
Line 1696 sub end_dd {
|
Line 1696 sub end_dd {
|
#-- <table> tag |
#-- <table> tag |
sub start_table { |
sub start_table { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; |
my $textwidth=&recalc($ENV{'form.textwidth'}); |
my $textwidth; |
$textwidth=~/(\d+)/; |
if ($#Apache::londefdef::table==0) { |
$textwidth=$1; |
$textwidth=&recalc($ENV{'form.textwidth'}); |
|
$textwidth=~/(\d+)/; |
|
$textwidth=$1; |
|
} else { |
|
$textwidth=&Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0); |
|
} |
my $currentstring = ''; |
my $currentstring = ''; |
if ($target eq 'web') { |
if ($target eq 'web') { |
$currentstring = $token->[4]; |
$currentstring = $token->[4]; |
Line 1784 sub end_table {
|
Line 1789 sub end_table {
|
} |
} |
} |
} |
$needed=$#length_row_final-$needed+1; |
$needed=$#length_row_final-$needed+1; |
$currentstring.=' SSSSS '.$needed.' EEEEE \\\\'; |
|
$currentstring.=' SSSSS '.$available_length.' EEEEE \\\\'; |
|
for (my $jn=0;$jn<=$#length_row_final;$jn++) { |
for (my $jn=0;$jn<=$#length_row_final;$jn++) { |
if ($length_row_final[$jn]==0) { |
if ($length_row_final[$jn]==0) { |
if ($length_raw_row[$jn]<$available_length/3) { |
if ($length_raw_row[$jn]<$available_length/3) { |
Line 1800 sub end_table {
|
Line 1803 sub end_table {
|
$length_row_final[$jn]=0.9*$available_length/$needed; |
$length_row_final[$jn]=0.9*$available_length/$needed; |
} |
} |
} |
} |
for (my $jn=0;$jn<=$#length_row_final;$jn++) { |
|
$currentstring.=' SSSSS '.$length_row_final[$jn].' EEEEE \\\\'; |
|
$currentstring.=' JJJJJJJ '.$length_raw_row[$jn].' HHHHHHH \\\\'; |
|
} |
|
#fill the table |
#fill the table |
for (my $in=0;$in<=$Apache::londefdef::table[-1]{'row_number'};$in++) { |
for (my $in=0;$in<=$Apache::londefdef::table[-1]{'row_number'};$in++) { |
for (my $jn=0;$jn<=$#length_row_final;$jn++) { |
for (my $jn=0;$jn<=$#length_row_final;$jn++) { |
Line 1815 sub end_table {
|
Line 1814 sub end_table {
|
$output .= ' \\\\ '; |
$output .= ' \\\\ '; |
} |
} |
$Apache::londefdef::table[-1]{'output'} .= $header_of_table.$output.$Apache::londefdef::table[-1]{'hinc'}.'\end{tabular}\vskip 0 mm '; |
$Apache::londefdef::table[-1]{'output'} .= $header_of_table.$output.$Apache::londefdef::table[-1]{'hinc'}.'\end{tabular}\vskip 0 mm '; |
$currentstring .= $Apache::londefdef::table[-1]{'output'}; |
if ($#Apache::londefdef::table > 0) { |
|
my $inmemory = $Apache::londefdef::table[-1]{'output'}; |
|
pop @Apache::londefdef::table; |
|
$Apache::londefdef::table[-1]{'rowdata'}[$Apache::londefdef::table[-1]{'row_number'}] .= $inmemory; ###Need to work with (wrong place to add) |
|
|
|
} else { |
|
$currentstring .= $Apache::londefdef::table[-1]{'output'}; |
|
pop @Apache::londefdef::table; |
|
} |
} |
} |
return $currentstring; |
return $currentstring; |
} |
} |
Line 1902 sub end_td {
|
Line 1909 sub end_td {
|
$Apache::londefdef::table[-1]{'TeXlength'} .= '0,'; |
$Apache::londefdef::table[-1]{'TeXlength'} .= '0,'; |
} |
} |
} |
} |
@{ $Apache::londefdef::table[-1]{'rowdata'} }[$current_row] .= '\parbox{TOBECHANGEDONNUMBER}{'.$data.'} '. |
$data='\parbox{TOBECHANGEDONNUMBER}{'.$data.'} '.$Apache::londefdef::table[-1]{'vinc'}; |
$Apache::londefdef::table[-1]{'vinc'}; |
@{ $Apache::londefdef::table[-1]{'rowdata'} }[$current_row] .= $data; |
} |
} |
return $currentstring; |
return $currentstring; |
} |
} |