diff options
author | Fred Drake <fdrake@acm.org> | 1999-04-28 13:54:30 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-04-28 13:54:30 (GMT) |
commit | 79189b5fd50977700910ca0c9a6627684690d7bd (patch) | |
tree | 1b202034a696290dbfdd3ce5fec6bcd2434dd9ef /Doc/perl | |
parent | 630b811676c24bd3c15df9484c3e73c500fbf746 (diff) | |
download | cpython-79189b5fd50977700910ca0c9a6627684690d7bd.zip cpython-79189b5fd50977700910ca0c9a6627684690d7bd.tar.gz cpython-79189b5fd50977700910ca0c9a6627684690d7bd.tar.bz2 |
do_cmd_seetext(): Clean up so we get proper nesting of <div>s. This
fixes a rendering problem on IE5.
General adjustments to the table* environments, including using
<thead> and <tbody>. 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).
Diffstat (limited to 'Doc/perl')
-rw-r--r-- | Doc/perl/python.perl | 46 |
1 files 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 = '<th>'; + if ($a eq 'l') + { $r = '<th align=left>'; } + elsif (substr($a, 0, 1) eq 'p') + { $r = '<th align=left>'; } + elsif ($a eq 'r') + { $r = '<th align=right>'; } + 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') ? '<td align=center>' : '<td>'); $col_aligns[2] = (($a3 eq 'c') ? '<td align=center>' : '<td>'); $col_aligns[3] = (($a4 eq 'c') ? '<td align=center>' : '<td>'); - # return the aligned header start tags; only used for \begin{tableiii?} - $th1 = (($a1 eq 'l') ? '<th align=left>' - : ($a1 eq 'r' ? '<th align=right>' : '<th>')); - $th2 = (($a2 eq 'l') ? '<th align=left>' - : ($a2 eq 'r' ? '<th align=right>' : '<th>')); - $th3 = (($a3 eq 'l') ? '<th align=left>' - : ($a3 eq 'r' ? '<th align=right>' : '<th>')); - $th4 = (($a4 eq 'l') ? '<th align=left>' - : ($a4 eq 'r' ? '<th align=right>' : '<th>')); - 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 '<table border align=center>' + return '<table border align=center><thead>' . "\n <tr$TABLE_HEADER_BGCOLOR>" . "\n $th1<b>$h1</b></th>" . "\n $th2<b>$h2</b></th>" + . "\n</thead>" + . "\n<tbody valign=baseline>" . $_ - . "\n</table>"; + . "\n</tbody></table>"; } sub do_cmd_lineii{ @@ -839,13 +845,15 @@ sub do_env_tableiii{ $font = '' if ($font eq 'textrm'); $globals{'lineifont'} = $font; - return '<table border align=center>' + return '<table border align=center><thead>' . "\n <tr$TABLE_HEADER_BGCOLOR>" . "\n $th1<b>$h1</b></th>" . "\n $th2<b>$h2</b></th>" . "\n $th3<b>$h3</b></th>" + . "\n</thead>" + . "\n<tbody valign=baseline>" . $_ - . "\n</table>"; + . "\n</tbody></table>"; } sub do_cmd_lineiii{ @@ -876,14 +884,16 @@ sub do_env_tableiv{ $font = '' if ($font eq 'textrm'); $globals{'lineifont'} = $font; - return '<table border align=center>' + return '<table border align=center><thead>' . "\n <tr$TABLE_HEADER_BGCOLOR>" . "\n $th1<b>$h1</b></th>" . "\n $th2<b>$h2</b></th>" . "\n $th3<b>$h3</b></th>" . "\n $th4<b>$h4</b></th>" + . "\n</thead>" + . "\n<tbody valign=baseline>" . $_ - . "\n</table>"; + . "\n</tbody></table>"; } sub do_cmd_lineiv{ @@ -1056,7 +1066,9 @@ sub do_cmd_seemodule{ } sub do_cmd_seetext{ - return '<div class=seetext><p>' . @_[0] . '</div>'; + local($_) = @_; + my $content = next_argument(); + return '<div class=seetext><p>' . $content . '</div>' . $_; } |