version 1.354, 2007/02/01 10:49:27
|
version 1.356, 2007/03/09 00:08:02
|
Line 1227 sub start_br {
|
Line 1227 sub start_br {
|
} |
} |
if ($signal eq 1) { |
if ($signal eq 1) { |
$currentstring .= ' \vskip 0 mm '; |
$currentstring .= ' \vskip 0 mm '; |
} elsif ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') { |
} else { |
$currentstring .= '\strut \\\\ \strut '; |
$currentstring .= '\strut \\\\ \strut '; |
} else { # Honor break in simple <sup></sup> |
|
$currentstring .= '}} \strut \\\\ \strut \ensuremath{^{'; |
|
} |
} |
|
|
} |
} |
return $currentstring; |
return $currentstring; |
} |
} |
Line 1413 sub start_sub {
|
Line 1412 sub start_sub {
|
if ($target eq 'web' || $target eq 'webgrade') { |
if ($target eq 'web' || $target eq 'webgrade') { |
$currentstring .= $token->[4]; |
$currentstring .= $token->[4]; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
$currentstring .= '\ensuremath{_{'; |
$currentstring .= '\raisebox{-\smallskipamount}{\scriptsize{'; |
} |
} |
return $currentstring; |
return $currentstring; |
} |
} |
Line 1436 sub start_sup {
|
Line 1435 sub start_sup {
|
if ($target eq 'web' || $target eq 'webgrade') { |
if ($target eq 'web' || $target eq 'webgrade') { |
$currentstring .= $token->[4]; |
$currentstring .= $token->[4]; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
$currentstring .= '\ensuremath{^{'; |
$currentstring .= '\raisebox{\smallskipamount}{\scriptsize{'; |
} |
} |
return $currentstring; |
return $currentstring; |
} |
} |
Line 1994 sub start_table {
|
Line 1993 sub start_table {
|
$Apache::londefdef::table[-1]{'minlen'}=[]; |
$Apache::londefdef::table[-1]{'minlen'}=[]; |
$Apache::londefdef::table[-1]{'content'}=[]; |
$Apache::londefdef::table[-1]{'content'}=[]; |
$Apache::londefdef::table[-1]{'align'}=[]; |
$Apache::londefdef::table[-1]{'align'}=[]; |
if (&is_inside_of($tagstack, 'sup')) { |
|
$currentstring .= '}} \\\\ \ensuremath{^{ '; |
|
} |
|
if (&is_inside_of($tagstack, 'sub')) { |
|
$currentstring .= '}} \\\\ \ensuremath{_{ '; |
|
} |
|
$currentstring.=' \keephidden{NEW TABLE ENTRY}'; |
$currentstring.=' \keephidden{NEW TABLE ENTRY}'; |
|
|
|
|
Line 2208 sub end_table {
|
Line 2201 sub end_table {
|
# single rowspan, columspan and combined row/colspans will |
# single rowspan, columspan and combined row/colspans will |
# work correctly. LaTeX is delicate here. |
# work correctly. LaTeX is delicate here. |
# RF. |
# RF. |
|
|
# Start a rowspan if necessary: |
# Start a rowspan if necessary: |
|
|
|
my $primary_col_width = $fwidth[$jn]; # Width of primary column. |
my $rowspan = $Apache::londefdef::table[-1]{'rowspan'}[$in][$jn]; |
my $rowspan = $Apache::londefdef::table[-1]{'rowspan'}[$in][$jn]; |
my $colspan = $Apache::londefdef::table[-1]{'colspan'}[$in][$jn]; |
my $colspan = $Apache::londefdef::table[-1]{'colspan'}[$in][$jn]; |
# |
# |
# Do the appropriate magic if this has a colspan |
# Do the appropriate magic if this has a colspan |
# |
# |
|
|
|
my $spanwidth = 0; |
if ($colspan > 1) { |
if ($colspan > 1) { |
my $spanwidth = 0; |
|
for (my $spancol = $jn; $spancol < $jn + $colspan; $spancol++) { |
for (my $spancol = $jn; $spancol < $jn + $colspan; $spancol++) { |
$spanwidth += $fwidth[$spancol]; |
$spanwidth += $fwidth[$spancol]; |
} |
} |
Line 2233 sub end_table {
|
Line 2227 sub end_table {
|
else { |
else { |
$output .= "{|p{$spanwidth mm}|}{"; |
$output .= "{|p{$spanwidth mm}|}{"; |
} |
} |
|
|
|
} else { |
|
$spanwidth = $primary_col_width; # If no span width will be just colwidth |
} |
} |
|
|
# Rowspan... if colspan is 1, and there's an alignment we'll need |
# Rowspan... if colspan is 1, and there's an alignment we'll need |
Line 2253 sub end_table {
|
Line 2249 sub end_table {
|
} |
} |
} |
} |
$have_rowspan++; |
$have_rowspan++; |
$output .= '\multirow{'.$rowspan.'}[0]{*}{'; |
if ($multirow_aligned) { |
|
$output .= '\multirow{'.$rowspan.'}[0]{*}{'; |
|
} else { |
|
$output .= '\multirow{'.$rowspan."}[0]{$spanwidth mm}{"; |
|
} |
|
|
$Apache::londefdef::table[-1]{'content'}[$in][$jn] =~ |
$Apache::londefdef::table[-1]{'content'}[$in][$jn] =~ |
s{^\s*\\par\s*}{}; |
s{^\s*\\par\s*}{}; |
$Apache::londefdef::table[-1]{'content'}[$in][$jn] =~ |
$Apache::londefdef::table[-1]{'content'}[$in][$jn] =~ |
s{\s*\\vskip\s*0pt\s*$}{}; |
s{\s*\\vskip\s*0pt\s*$}{}; |
|
|
# |
# |
# If we did not throw in a multicolumn to align, then add |
# If we did not throw in a multicolumn to align, then add |
# an extra { |
# an extra { |
Line 2273 sub end_table {
|
Line 2273 sub end_table {
|
if (($rowspan eq '^') || ($rowspan eq '_')) { |
if (($rowspan eq '^') || ($rowspan eq '_')) { |
$have_rowspan++; |
$have_rowspan++; |
} |
} |
#-------------------------------------------------------------- |
#-------------------------------------------------------------- |
|
|
|
|
# For right and center alignment of single cells. |
# For right and center alignment of single cells. |