[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 06 Apr 2007 10:33:38 -0000
foxr Fri Apr 6 06:33:38 2007 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
Beginning to understand what happened. It all comes down to a typo
where 'forcedtablewidth' was then checked as 'forcetablewidth'..
but again since percentages get changed to absolute widths.. and it
looks like the intent was to enforce widths one way or the other I think
there's big potential for cleanup... this is just another working
version archived in case I screw up along the way of the cleanup.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.362 loncom/xml/londefdef.pm:1.363
--- loncom/xml/londefdef.pm:1.362 Fri Apr 6 06:23:46 2007
+++ loncom/xml/londefdef.pm Fri Apr 6 06:33:37 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.362 2007/04/06 10:23:46 foxr Exp $
+# $Id: londefdef.pm,v 1.363 2007/04/06 10:33:37 foxr Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -1990,16 +1990,14 @@
}
# This stuff looks a bit hokey..
# Percentage width is actually given as an absolute width..
- # but it appears that unless the 'percent' flag is set,
- # The table is just allowed to go to its natural width
- # for now let's always claim 'percent' is set..
+ # so what's the difference?
#
if ($TeXwidth=~/%/) {
$Apache::londefdef::table[-1]{'percent'}=1;
$TeXwidth=~/(\d+)/;
$Apache::londefdef::table[-1]{'width'}=$1*$textwidth/100;
} 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;
}
# In the end, however the table width cannot be wider than $textwidth...
@@ -2232,7 +2230,7 @@
}
}
#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;
for (my $i=0;$i<=$#fwidth;$i++) {
$current+=$fwidth[$i];