diff options
author | Fred Drake <fdrake@acm.org> | 1998-04-02 20:14:04 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-04-02 20:14:04 (GMT) |
commit | 58b2bfd0bfeaad6bc0f0b7d4d0af6fd7194e3c3d (patch) | |
tree | 44f3b0930ec26a5d76a8378092b6c2be604f32d0 /Doc/perl | |
parent | 3a18f3ba38a817c17d11534a1681f3345df9e70f (diff) | |
download | cpython-58b2bfd0bfeaad6bc0f0b7d4d0af6fd7194e3c3d.zip cpython-58b2bfd0bfeaad6bc0f0b7d4d0af6fd7194e3c3d.tar.gz cpython-58b2bfd0bfeaad6bc0f0b7d4d0af6fd7194e3c3d.tar.bz2 |
This fixes a (minor) problem discovered by AMK when you don't want any
special markup for the first column of a table using {tableii} or {tableiii}.
In LaTeX, this requires using "textrm" as the formatting function, and this
is needed to remove the bogus "<textrm>" that gets generated otherwise.
There should probably be a more general mapping of specified markup to useful
markup, but that doesn't appear needed at the moment.
do_env_tableii(), do_env_tableiii(): If the markup for the first column is
\textrm, make it empty.
do_cmd_lineii(), do_cmd_lineiii(): If the markup for the first column is
empty, don't add markup around the text.
Diffstat (limited to 'Doc/perl')
-rw-r--r-- | Doc/perl/python.perl | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl index 19f5ee4..4c1f2f7 100644 --- a/Doc/perl/python.perl +++ b/Doc/perl/python.perl @@ -742,6 +742,8 @@ sub do_env_tableii{ "$next_pair_rx$any_next_pair_rx3$any_next_pair_rx5$any_next_pair_rx7"; if (/$tableiii_rx/o) { $font = $4; + $font = '' + if ($font eq 'textrm'); $h1 = $6; $h2 = $8; } @@ -758,10 +760,13 @@ sub do_cmd_lineii{ s/$next_pair_pr_rx//o; my $c1 = $2; s/$next_pair_pr_rx//o; - my $c2 = $2; - my $font = $globals{"lineifont"}; + my($c2,$font,$efont) = ($2, $globals{"lineifont"}, ''); + if ($font) { + $font = "<$font>"; + $efont = "</$font>"; + } my($c1align,$c2align) = @col_aligns[0,1]; - "<tr>$c1align<$font>$c1</$font></td>\n" + "<tr>$c1align$font$c1$efont</td>\n" . " $c2align$c2</td>$'"; } @@ -774,6 +779,8 @@ sub do_env_tableiii{ . "$any_next_pair_rx9"; if (/$tableiii_rx/o) { $font = $4; + $font = '' + if ($font eq 'textrm'); $h1 = $6; $h2 = $8; $h3 = $10; @@ -794,10 +801,13 @@ sub do_cmd_lineiii{ s/$next_pair_pr_rx//o; my $c2 = $2; s/$next_pair_pr_rx//o; - my $c3 = $2; - my $font = $globals{"lineifont"}; + my($c3,$font,$efont) = ($2, $globals{"lineifont"}, ''); + if ($font) { + $font = "<$font>"; + $efont = "</$font>"; + } my($c1align, $c2align, $c3align) = @col_aligns; - "<tr>$c1align<$font>$c1</$font></td>\n" + "<tr>$c1align$font$c1$efont</td>\n" . " $c2align$c2</td>\n" . " $c3align$c3</td>$'"; } |