[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Mon, 30 Jun 2003 15:05:54 -0000
sakharuk Mon Jun 30 11:05:54 2003 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
Very important changes in <td> tag - I earlier never seen really complicated tables(such as in bio course) so I did the simplest calculations for the cell width
and incorrectly cleaned up the content of the cell. Now it has to work more reasonably.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.147 loncom/xml/londefdef.pm:1.148
--- loncom/xml/londefdef.pm:1.147 Mon Jun 30 10:09:03 2003
+++ loncom/xml/londefdef.pm Mon Jun 30 11:05:54 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.147 2003/06/30 14:09:03 sakharuk Exp $
+# $Id: londefdef.pm,v 1.148 2003/06/30 15:05:54 sakharuk Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -1064,7 +1064,7 @@
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
if ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') {
- $currentstring .= '\vskip 0.2 mm';
+ $currentstring .= '\vskip 0.2 mm ';
}
}
return $currentstring;
@@ -1299,7 +1299,7 @@
$LaTeXwidth=($LaTeXwidth/100).'\textwidth';
}
} else {
- $LaTeXwidth ='0.95\textwidth';
+ $LaTeXwidth ='0.9\textwidth';
}
my ($pre,$post);
my $align=&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1);
@@ -1310,7 +1310,7 @@
} elsif ($align eq 'right') {
$pre=' \hfill \llap{'; $post='}';
}
- $currentstring .= ' \vskip 0 mm \noindent\makebox[\textwidth]{'.$pre.'\makebox['.
+ $currentstring .= ' \vskip 0 mm \noindent\makebox['.$LaTeXwidth.']{'.$pre.'\makebox['.
$LaTeXwidth.'][b]{\hrulefill}'.$post.'}\vskip 0 mm ';
}
return $currentstring;
@@ -1321,8 +1321,7 @@
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
- } elsif ($target eq 'tex') {
- }
+ }
return $currentstring;
}
@@ -1840,11 +1839,9 @@
$current_length=~/(\d+\.?\d*)/;
$Apache::londefdef::table[-1]{'TeXlength'} .= $1.',';
$Apache::londefdef::table[-1]{'length'} .= '0,';
- } else {
- $data=~/^\s*(\S.*)/;
- $data=$1;
- $data=~/(.*\S)\s*$/;
- $data=$1;
+ } else {
+ $data=~s/^\s+(\S.*)/$1/;
+ $data=~s/(.*\S)\s+$/$1/;
my $current_length=2*length($data);
$Apache::londefdef::table[-1]{'length'} .= $current_length.',';
$Apache::londefdef::table[-1]{'TeXlength'} .= '0,';