version 1.362, 2007/04/06 10:23:46
|
version 1.363, 2007/04/06 10:33:37
|
Line 1990 sub start_table {
|
Line 1990 sub start_table {
|
} |
} |
# This stuff looks a bit hokey.. |
# This stuff looks a bit hokey.. |
# Percentage width is actually given as an absolute width.. |
# Percentage width is actually given as an absolute width.. |
# but it appears that unless the 'percent' flag is set, |
# so what's the difference? |
# The table is just allowed to go to its natural width |
|
# for now let's always claim 'percent' is set.. |
|
# |
# |
if ($TeXwidth=~/%/) { |
if ($TeXwidth=~/%/) { |
$Apache::londefdef::table[-1]{'percent'}=1; |
$Apache::londefdef::table[-1]{'percent'}=1; |
$TeXwidth=~/(\d+)/; |
$TeXwidth=~/(\d+)/; |
$Apache::londefdef::table[-1]{'width'}=$1*$textwidth/100; |
$Apache::londefdef::table[-1]{'width'}=$1*$textwidth/100; |
} else { |
} else { |
$Apache::londefdef::table[-1]{'percent'} = 1; # kludge until we get the intent. |
$Apache::londefdef::table[-1]{'forcedtablewidth'} = 1; # may or may not need this? |
$Apache::londefdef::table[-1]{'width'}=$TeXwidth; |
$Apache::londefdef::table[-1]{'width'}=$TeXwidth; |
} |
} |
# In the end, however the table width cannot be wider than $textwidth... |
# In the end, however the table width cannot be wider than $textwidth... |
Line 2232 sub end_table {
|
Line 2230 sub end_table {
|
} |
} |
} |
} |
#use all available width if it is defined in % or as TeXwidth |
#use all available width if it is defined in % or as TeXwidth |
if (($Apache::londefdef::table[-1]{'percent'}==1) || ($Apache::londefdef::table[-1]{'forcetablewidth'}==1)) { |
if (($Apache::londefdef::table[-1]{'percent'}==1) || ($Apache::londefdef::table[-1]{'forcedtablewidth'}==1)) { |
my $current=0; |
my $current=0; |
for (my $i=0;$i<=$#fwidth;$i++) { |
for (my $i=0;$i<=$#fwidth;$i++) { |
$current+=$fwidth[$i]; |
$current+=$fwidth[$i]; |