From 79189b5fd50977700910ca0c9a6627684690d7bd Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Wed, 28 Apr 1999 13:54:30 +0000 Subject: do_cmd_seetext(): Clean up so we get proper nesting of
s. This fixes a rendering problem on IE5. General adjustments to the table* environments, including using and . Attempt to adjust the vertical alignment of the table cells so that the baseline of the first cell matches the baseline of the remaining cells: When the first cell is small and the second cell of the same row is multi-line, the first cell was vertically centered by default. Specifying valign=baseline fixes the problem on IE, but Netscape seems to ignore both valign=top and valign=baseline (even though valign is NS's fault!). Make the horizontal alignment of 'p' columns left instead of center (for the headings). --- Doc/perl/python.perl | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index eb6dfdf..8eb4618 100644 --- a/Doc/perl/python.perl +++ b/Doc/perl/python.perl @@ -777,6 +777,18 @@ sub do_cmd_memberlineni{ $TABLE_HEADER_BGCOLOR = $NAV_BGCOLOR; +sub get_th{ + my $a = @_[0]; + my $r = ''; + if ($a eq 'l') + { $r = ''; } + elsif (substr($a, 0, 1) eq 'p') + { $r = ''; } + elsif ($a eq 'r') + { $r = ''; } + return $r; +} + sub setup_column_alignments{ local($_) = @_; my($a1,$a2,$a3,$a4) = split(/[|]/,$_); @@ -785,16 +797,8 @@ sub setup_column_alignments{ $col_aligns[1] = (($a2 eq 'c') ? '' : ''); $col_aligns[2] = (($a3 eq 'c') ? '' : ''); $col_aligns[3] = (($a4 eq 'c') ? '' : ''); - # return the aligned header start tags; only used for \begin{tableiii?} - $th1 = (($a1 eq 'l') ? '' - : ($a1 eq 'r' ? '' : '')); - $th2 = (($a2 eq 'l') ? '' - : ($a2 eq 'r' ? '' : '')); - $th3 = (($a3 eq 'l') ? '' - : ($a3 eq 'r' ? '' : '')); - $th4 = (($a4 eq 'l') ? '' - : ($a4 eq 'r' ? '' : '')); - return ($th1, $th2, $th3, $th4); + # return the aligned header start tags + return (get_th($a1), get_th($a2), get_th($a3), get_th($a4)); } sub do_env_tableii{ @@ -806,12 +810,14 @@ sub do_env_tableii{ $font = '' if ($font eq 'textrm'); $globals{'lineifont'} = $font; - return '' + return '
' . "\n " . "\n $th1$h1" . "\n $th2$h2" + . "\n" + . "\n" . $_ - . "\n
"; + . "\n"; } sub do_cmd_lineii{ @@ -839,13 +845,15 @@ sub do_env_tableiii{ $font = '' if ($font eq 'textrm'); $globals{'lineifont'} = $font; - return '' + return '
' . "\n " . "\n $th1$h1" . "\n $th2$h2" . "\n $th3$h3" + . "\n" + . "\n" . $_ - . "\n
"; + . "\n"; } sub do_cmd_lineiii{ @@ -876,14 +884,16 @@ sub do_env_tableiv{ $font = '' if ($font eq 'textrm'); $globals{'lineifont'} = $font; - return '' + return '
' . "\n " . "\n $th1$h1" . "\n $th2$h2" . "\n $th3$h3" . "\n $th4$h4" + . "\n" + . "\n" . $_ - . "\n
"; + . "\n"; } sub do_cmd_lineiv{ @@ -1056,7 +1066,9 @@ sub do_cmd_seemodule{ } sub do_cmd_seetext{ - return '

' . @_[0] . '

'; + local($_) = @_; + my $content = next_argument(); + return '

' . $content . '

' . $_; } -- cgit v0.12