tag (end tag optional)
sub start_tr {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
@@ -1866,7 +1909,7 @@ sub end_tr {
return $currentstring;
}
-#-- tag
+#-- | tag (end tag optional)
sub start_td {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
@@ -1925,9 +1968,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,';
}
@@ -1951,7 +2009,7 @@ sub end_td {
return $currentstring;
}
-#-- | tag
+#-- | tag (end tag optional)
sub start_th {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
@@ -3105,7 +3163,7 @@ sub end_tbody {
return $currentstring;
}
-#-- |