tag (end tag optional)
sub start_tr {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
@@ -1865,7 +1879,7 @@ sub end_tr {
return $currentstring;
}
-#-- tag
+#-- | tag (end tag optional)
sub start_td {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
@@ -1924,9 +1938,24 @@ sub end_td_tex {
$Apache::londefdef::table[-1]{'TeXlength'} .= $1.',';
$Apache::londefdef::table[-1]{'length'} .= '0,';
} else {
- $data=~s/^\s+(\S.*)/$1/;
+ $data=~s/^\s+(\S.*)/$1/;
$data=~s/(.*\S)\s+$/$1/;
- my $current_length=2*length($data);
+ $data=~s/(\s)+/$1/;
+ my $current_length=0;
+ if ($data=~/\\vskip/) {
+ my $newdata=$data;
+ $newdata=~s/\\vskip \d*\.?\d*\s*mm/THISISJUSTTEMPORARYSEPARATOR/g;
+ my @newdata=split(/THISISJUSTTEMPORARYSEPARATOR/,$newdata);
+ foreach my $elementdata (@newdata) {
+ $elementdata=~s/^\s+(\S.*)/$1/;
+ $elementdata=~s/(.*\S)\s+$/$1/;
+ $elementdata=~s/(\s)+/$1/;
+ my $lengthnewdata=1.8*length($elementdata);
+ if ($lengthnewdata>$current_length) {$current_length=$lengthnewdata;}
+ }
+ } else {
+ $current_length=1.8*length($data);
+ }
$Apache::londefdef::table[-1]{'length'} .= $current_length.',';
$Apache::londefdef::table[-1]{'TeXlength'} .= '0,';
}
@@ -1950,7 +1979,7 @@ sub end_td {
return $currentstring;
}
-#-- | tag
+#-- | tag (end tag optional)
sub start_th {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
@@ -3104,7 +3133,7 @@ sub end_tbody {
return $currentstring;
}
-#-- |